[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: FW: RFC for XML Object Parsing

  • From: Amelia A Lewis <amyzing@talsever.com>
  • To: Brian Aberle <xmlboss@live.com>
  • Date: Mon, 24 Mar 2014 16:23:52 -0400

Re: FW:  RFC for XML Object Parsing
On Mon, 24 Mar 2014 14:03:02 -0600, Brian Aberle wrote:
> You said, 
>> You do realize that this means "this is not XML"?
>> 
>> You can't even guarantee attribute order in SAX. Suggesting that 
>> attribute order matters is pretty baffling, altogether.
>
> While Reading via SAX the attribute order will be detectable.

No. They. Won't.

See: http://www.saxproject.org/apidoc/org/xml/sax/Attributes.html

"The order of attributes in the list is unspecified, and will vary from 
implementation to implementation."

See also: 
http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)

> While 
> Writing via SAX - I don't know, does that depend on parser 
> implementation?  Can anyone answer this? It could conceptually be XML 
> 2.0(100% backward compatible), or it could conceptually be "a 
> protocol", this is mostly a matter of view. 

I do not understand why you insist that it must be the first attribute, 
anyway. Just treat it specially. The collection of attributes is 
well-represented by an abstraction (in any programming language) that 
represents a set or a map, though the possibility of namespaced 
attributes complicates the construction of the key.

For your specific purpose, I cannot see why you don't just define 
ba:oid (where xmlns:ba="uri:something-that-you-own") and done. Then the 
specialized faster processing can check whether there's a ba:oid 
attribute on a particular element (or subtree) and treat it 
appropriately. Nothing terribly exciting to see, there.

No doubt I'm missing something. :-)

Amy!
-- 
Amelia A. Lewis                    amyzing {at} talsever.com
And now someone's on the telephone, desperate in his pain; 
someone's on the bathroom floor, doing her cocaine; 
someone's got his finger on the button in some room--
no one can convince me we aren't gluttons for our doom.
                -- Indigo Girls


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.