OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] SAX for Binary Encodings (preserving investment) (ASN.1and

[ Lists Home | Date Index | Thread Index ]

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS