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


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

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

Subject: Re: Use of QNames

Eric van der Vlist wrote:

> > - SAX 2 (startPrefixMapping and endPrefixMapping methods on
> > ContentHandler)
> But still, what's coming ready for use in a startElement is the
> namespace URI while you have to analyze the QName to extract the
> prefix...

But it's not any easier if you invent your own syntax to bind prefixes
to namespace URIs.

> > - DOM Level 2 (namespace declarations appear as attributes)
> Here again, getAttributeNodeNS gives you a local name and a URI and to
> use getElementsByTagNameNS you need to provide a local name and a URI
> while to get the prefix you need to handle it by yourself.

Same point.

> > - XPath/XSLT (namespace axis provides *exactly* this information)
> The namespace axis is very weak compared to the other axis (you can't
> apply templates on it and you can't easily replace a prefix by another
> one) and it would be much easier to manipulate the syntax I have
> proposed than a syntax based on namespaces declarations.

I disagree: in some ways it's easier using namespace declarations than
using a new syntax, because if you use namespace declarations XSLT/XPath
handles inheritance for you, and automatically ensures that the
appropriate namespace declarations are copied over and generated as


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

Powered by eList eXpress LLC