[Home] [By Thread] [By Date] [Recent Entries]


Bob Wyman wrote:

[typed SAX]

> 	The ideal would be to allow better support for the types found
> in binary encodings without changing anything for folk or code who
> deal only with textual data or wish to view the world as text only.

SAX with typed data would not just be handy to people using binary 
encodings... people who are transporting, say, dates in XML need to 
write their own code in the SAX handler that says "Oooh, it's the 
element <taxPoint> within a <purchase> element? Then pass the string 
content through the DateParser I've configured to handle the format of 
date we use in order to convert it to a java.util.Date object for 
processing". This means that your code ends up containing a hard coded 
'schema' that associates types with all the elements and attributes.

Making that data-driven by passing it in a formally written schema and 
then it passing you the elements and attributes in correctly parsed form 
would save development time (since the written schema is more likely to 
already exist than the skeleton SAX handler that does all the parsing), 
would increase maintainability (clearer code in the SAX handler), and so 
on...

 > As
> Amelia has said elsewhere, string is the "ur-type of XML" and that
> must be respected. Fortunately, since ASN.1 defines a textual value
> type and mappings to/from it, I think that everything that an ASN.1
> defined encoding system can carry can, in fact, be represented
> usefully as a string.

Yep.

> 
> 		bob wyman
 >

ABS


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member