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


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Declaring the XML namespace

[ Lists Home | Date Index | Thread Index ]

[Uche Ogbuji]
[Tom P]
> > I do not know how most parsers handle it, though.  I remember hacking
> > or 4xpath (I think it was) once because it insisted on having the
> > supplied and generally it is not supplied  that in practice.
> ???
> Either this was full eons ago, or you managed to trigger a bug far in the
corner somewhere.  At any rate, neither a search on the mailing lists or
SourceForge turns up a bug report from you on this.
> Do you have any more detail?

It was a while ago.  I can't find what I was remembering - it may have gone
away when my computer died, and not made it over to the new one.  Here is
one fix I made (4Suite 0.11, I think), in xslt\StylesheetReader.py - nothing
to do with the subject of this thread, though:

# Replaced
        #if prefix == '#default': prefix = ''
# with
#                if prefix == '#default': prefix = None

This was after we changed from '' to None for a null prefix, and I had some
document fail because of it.

I also found a change I made to xml\dom\Document.py in this area (version
0.7) (of coures, this is not 4Suite):

In     ### DOM Level 2 Methods ###

    def createAttributeNS(self, namespaceURI, qualifiedName):

#        if prefix == 'xml' and namespaceURI != XML_NAMESPACE:
        if prefix == 'xml' and not namespaceURI in (None, XML_NAMESPACE):
            raise NamespaceErr()
        if prefix=='xml' and not namespaceURI: ##Added by tbp 2-23-02
        if localName == 'xmlns':
#            if namespaceURI != XMLNS_NAMESPACE:
            if not namespaceURI in (None,XMLNS_NAMESPACE):

Again, this was triggered by a failure to process a document that other
processors handled.  As you can see, I coerced the xml namespace to be the
predefined value if it had not been supplied (the same for the namespace

I don't remember if I sent this in or not.


Tom P


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS