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

Re: Partyin' like it's 1999


mozilla innerxml
Joshua Allen wrote:


> No way for a parser to return a single attribute value without parsing
> all the way to the end of the start tag.  For example, if you have:
> 
> <foo x:id="a" y:id="a" ...insert a bajillion attributes here...
> xmlns:x="foo" xmlns:y="foo">
> 
> You have malformed XML right at the beginning, but the parser doesn't
> know to throw (and cannot even accurately report the first or second
> attribute) until it has parsed a bajillion other attributes first.  Why
> is it allowed for the xmlns to come *after* the first use of the prefix
> anyway (order of attributes doesn't matter, so to hell with perf)


This doesn't arise in practice. It's a corner case. Tool vendors need to 
handle it, but honestly the API complexity of allowing streaming 
attributes argues against this approach, even if it were possible to 
implement.

> What if the xmlns declaration is on an ancestor node, and you call
> .InnerXml on DOM from a child node.  Should the .InnerXml represent the
> text content of the subtree, in which case it would lose the namespace
> decl if written to text, or should it insert an extra xmlns decl?  You
> get into all sorts of crazy situations; dumping entire set of NS decls
> in scope on XSLT output, generating bogus prefixes on output.

InnerXml is an ugly, non-standard Microsoft hack. Eliminate it. Problem 
solved. Don't blame XML for your own mistakes.

-- 
Elliotte Rusty Harold  elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

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.