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

Re: Declaring the XML namespace


xml namespaceuri
[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!

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.