[MOBY-l] To access moby service using Java

Paul Gordon gordonp at cbr.nrc.ca
Wed Feb 4 16:46:47 UTC 2004


We should be careful.  The example below includes a complete xml 
document (albeit with no xml namespace for the data).  What would 
normally be an XML declaration on the first line of a file turns out to 
be an XML processing instruction (<?xml...) in the middle.  This 
document will not be well-formed, because the BNF definition of a 
well-formed XML document's processing instructions in the XML 1.0 
standard excludes "xml" as a PI target:


	|PI| 	   ::=    	|'<?' PITarget 
<http://www.w3.org/TR/2004/REC-xml-20040204/#NT-PITarget> (S 
<http://www.w3.org/TR/2004/REC-xml-20040204/#NT-S> (Char 
<http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char>* - (Char 
<http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char>* '?>' Char 
<http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char>*)))? '?>'|

	|PITarget| 	   ::=    	|Name 
<http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Name> - (('X' | 'x') 
('M' | 'm') ('L' | 'l'))|


So I guess my point is that there are basically two options:

1. Wrap the moby:text-xml contents in a CDATA section so no payload 
syntax will mess up the well-formed nature of the moby document
2. Make sure we don't send xml declarations and other potentially 
dangerous data down the pipe.

The advantage to the 1st method is a guaranteed clean MOBY document 
every time.  But this also requires everyone to agree that when they see 
a moby:text-xml element, they will consider that the contents needs to 
be unescaped (i.e. the structure of the payload is not accessible from 
the MOBY document DOM, it will have to be parsed separately).  The 
second option allows the payload data and its logical partitions to be 
accessible from the MOBY DOM, but if the contents are not valid, the 
MOBY message as a whole is invalid.

The second option is convenient, but I'm leaning towards a clean 
separation of the whole thing into three layers:  SOAP network 
transport, MOBY transaction envelope, application XML contents.

My CDN$0.02.  Anyone agree, disagree, not care?

Ken Steube wrote:

>><moby:MOBY xmlns:moby="http://www.biomoby.org/moby">
>>    <moby:Response moby:authority="http://mips.gsf.de">
>>        <moby:queryResponse queryID="">
>>            <Simple>
>>                <moby:text-xml namespace="Global_Keyword" id="431260"
>>articleName="odata1">
>><?xml version="1.0 encoding="UTF-8"?><element
>>id="10"><desc>431260</desc></element>
>>                </moby:text-xml>
>>            </Simple>
>>        </moby:queryResponse>
>>    </moby:Response>
>></moby:MOBY>
>>
>>If you have worked with "text-xml" object(moby specific) types , kindly
>>correct me.
>>
>>Thanks
>>Viji
>>
>>_______________________________________________
>>moby-l mailing list
>>moby-l at biomoby.org
>>http://biomoby.org/mailman/listinfo/moby-l
>>
>>    
>>
>
>  
>





More information about the moby-l mailing list