[4suite] Question on namespace and amara

Werner F. Bruhin werner.bruhin at free.fr
Fri Jul 6 13:47:25 MDT 2007


Hi,

Werner F. Bruhin wrote:
> I am trying to do some query to a wine related web site using xml which 
> needs the following in the xml string.
>
> <?xml version="1.0" encoding="utf-8"?>
> <query xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns="http://www.vinoxml.org/XMLschema">
>     <querycreator>
> ...etc...
>
> I create the doc with:
> doc = binderytools.bind_string(doc_header)
>
> doc_header contains the above plus whatever else is needed,  but when I 
> do doc.xml() the namespace (is this the right name) stuff is dropped.
>
>   
I am nearly there, doing this:
vinoxml_NSS = {
    u'xsd': u'http://www.w3.org/2001/XMLSchema',
    u'xsi': u'http://www.w3.org/2001/XMLSchema-instance',
    u'': u'http://www.vinoxml.org/XMLschema',
    }

doc = binderytools.bind_string(vinoxmlquery, prefixes=vinoxml_NSS)
doc.xml()

This gives me the default "blank" namespace but the others are dropped, 
is this due to be expected?

Werner


More information about the 4suite mailing list