qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qexo-general] namespace in extracted xml


From: Víctor Torres Padrosa
Subject: [Qexo-general] namespace in extracted xml
Date: Thu, 25 Mar 2004 13:57:39 +0100

Dear Peer,

I'm using Kawa 1.7.9. It seems it has a problem when extracting parts of xml files

Given the file:

<?xml version="1.0" encoding="UTF-8"?>

<didl:DIDL xmlns:didl="urn:mpeg:mpeg21:2002:01-DIDL-NS" xmlns:dii="urn:mpeg:mpeg21:2002:01-DII-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:mpeg21:2002:01-DIDL-NS ../Schemas/DIDL-AMD1.xsd

urn:mpeg:mpeg21:2002:01-DII-NS ../Schemas/dii.xsd">

<didl:Item>

<didl:Descriptor>

<didl:Statement mimeType="text/xml">

<r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:sx="urn:mpeg:mpeg21:2003:01-REL-SX-NS" xmlns:mx="urn:mpeg:mpeg21:2003:01-REL-MX-NS" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:mpeg21:2003:01-REL-MX-NS ../Schemas/rel-mx.xsd urn:mpeg:mpeg21:2003:01-REL-SX-NS ../Schemas/rel-sx.xsd urn:mpeg:mpeg21:2003:01-REL-R-NS ../Schemas/rel-r.xsd">

...

<r:grant>

<mx:diReference>

<mx:identifier>urn:grid:a1-abcde-2468013579-f</mx:identifier>

</mx:diReference>

</r:grant>

</r:license>

</didl:Statement>

</didl:Descriptor>

</didl:Item>

</didl:DIDL>

And the Query:
 
for $c in document("file:///C:\file.xml")//*:Statement
where ($c//*:grant/*:diReference/*:identifier/text()="urn:grid:a1-abcde-2468013579-f")
return $c//*:license

I get:

<r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:sx="urn:mpeg:mpeg21:2003:01-REL-SX-NS" xmlns:mx="urn:mpeg:mpeg21:2003:01-REL-MX-NS" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:didl="urn:mpeg:mpeg21:2002:01-DIDL-NS" xmlns:dii="urn:mpeg:mpeg21:2002:01-DII-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:mpeg21:2002:01-DIDL-NS ../schemas/DIDL-AMD1.xsd urn:mpeg:mpeg21:2002:01-DII-NS ../Schemas/dii.xsd urn:mpeg:mpeg21:2003:01-REL-MX-NS ../Schemas/rel-mx.xsd urn:mpeg:mpeg21:2003:01-REL-SX-NS ../Schemas/rel-sx.xsd urn:mpeg:mpeg21:2003:01-REL-R-NS ../Schemas/rel-r.xsd">
 
...
 
</r:license>
 
 
Although the source file is valid, the result is not valid, since it has the xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance attribute twice.
 
Best Regards,
 
Víctor
 
 
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]