|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [Sax-devel] SAX namespace handling underspecified?
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&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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








