[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Declaring the XML namespace
[Uche Ogbuji] [Tom P] > > I do not know how most parsers handle it, though. I remember hacking 4xslt > > or 4xpath (I think it was) once because it insisted on having the namespace > > 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 namespaceURI=XML_NAMESPACE 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 uri). I don't remember if I sent this in or not. Cheers, Tom P
|
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
|