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

Re: [Sax-devel] SAX namespace handling underspecified?

  • From: David Brownell <david-b@p...>
  • To: Elliotte Rusty Harold <elharo@m...>, xml-dev@l...
  • Date: Thu, 23 Aug 2001 11:09:18 -0700

sax namespace
Hmm, complication:

    <!DOCTYPE foo [
    <!ENTITY base "http://www.example.com/namespaces/">
    ]>
    <foo xmlns="&base;FOO" xmlns:bar="&base;BAR"
        bar:barian="heathen" bar:sinister="left" />

I think that either of these event sequences should be legal (leaving
out many events); I think there are SAX2 parsers with each behavior
(and certainly could be, if there aren't).

First example, declarations reported as they're parsed:

    ...
    startEntity ("base")
    endEntity ("base")
    startPrefixMapping ("", http://www.example.com/namespaces/FOO)
    startEntity ("base")
    endEntity ("base")
    startPrefixMapping ("bar", http://www.example.com/namespaces/BAR)
    startElement (...)
    ...

Second example, there's a delayed action effect:

    ...
    startEntity ("base")
    endEntity ("base")
    startEntity ("base")
    endEntity ("base")
    startPrefixMapping ("", http://www.example.com/namespaces/FOO)
    startPrefixMapping ("bar", http://www.example.com/namespaces/BAR)
    startElement (...)
    ...

Similar examples can be constructed without a DTD; just put another
attribute between the ns decls, like name="at&amp;t".

Comments?  That is, "immediately" isn't quite right ... it's more like
any startPrefixMapping call matches the next startElement, and
endPrefixMapping matches the previous endElement.

- Dave


----- Original Message ----- 
From: "David Brownell" <david-b@p...>
To: "Elliotte Rusty Harold" <elharo@m...>; <xml-dev@l...>
Cc: <sax-devel@l...>
Sent: Monday, August 20, 2001 6:50 AM
Subject: Re: [Sax-devel] SAX namespace handling underspecified?


> > I think this is just a documentation fix to make it clear that the
> > startPrefixMapping() must be invoked immediately before the
> > corresponding startElement() method, possibly with other relevant
> > startPrefixMapping() methods intervening but no other methods. 
> > Comments? Thoughts? If there anything I've missed here? 
> 
> Sounds about right to me.  Fix to the doc looks like it is just
> adding that one word, "immediately":  immediately before,
> immediately after.  (And adjusting a plural...)
> 
> For the record, I'm viewing the javadoc as the authoritative
> text for the API spec.
> 
> - Dave
> 
> 


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.