[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

How do i remove namespaces?

Manolis Mylonakis mylonos at otenet.gr
Thu Jan 12 20:28:47 PST 2006


inurl 001060.html
Hello,

 

i have the following xml file:

 

 

<Mpeg7 xmlns="urn:mpeg:mpeg7:schema:2001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Description xsi:type="SemanticDescriptionType">

<Semantics>

<AbstractionLevel dimension="0"/>

<Label>

<Name>Soccer Agent Example</Name>

</Label>

<Property>

<Name>Ontology</Name>

<Definition>socceragents</Definition>

</Property>

<SemanticBase xsi:type="AgentObjectType" id="Moras">

<AbstractionLevel dimension="0"/>

<Label>

<Name>Moras</Name>

</Label>

<Definition>

<FreeTextAnnotation>Vaggelis Moras</FreeTextAnnotation>

</Definition>

<Agent xsi:type="PersonType">

<Name>

<FamilyName initial="M">Moras</FamilyName>

<GivenName>Vaggelis</GivenName>

</Name>

<ElectronicAddress>

<Email>http://xquery.com/mailman/listinfo/talk</Email>

</ElectronicAddress>

</Agent>

</SemanticBase>

</Semantics>

<Semantics>

<AbstractionLevel dimension="0"/>

<Label>

<Name>Soccer Agent Example</Name>

</Label>

<Property>

<Name>teacher </Name>

<Definition>university teacher</Definition>

</Property>

<SemanticBase xsi:type="AgentObjectType" id="Moras">

<AbstractionLevel dimension="0"/>

<Label>

<Name>Dolas</Name>

</Label>

<Definition>

<FreeTextAnnotation>Apostolos Dolas</FreeTextAnnotation>

</Definition>

<Agent xsi:type="PersonType">

<Name>

<FamilyName initial="M">Dolas</FamilyName>

<GivenName>Apostolos</GivenName>

</Name>

<ElectronicAddress>

<Email>http://xquery.com/mailman/listinfo/talk</Email>

</ElectronicAddress>

</Agent>

</SemanticBase>

</Semantics>

</Description>

</Mpeg7>

 

 

 

 

And my xquery is :

 

declare namespace Mpeg7="urn:mpeg:mpeg7:schema:2001";

for $x in doc("myPersons.xml")//Mpeg7:Agent

return $x

 

 

One of my results is the following :

<Agent xsi:type="PersonType" xmlns="urn:mpeg:mpeg7:schema:2001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Name xmlns="urn:mpeg:mpeg7:schema:2001">

<FamilyName initial="M">Moras</FamilyName>

<GivenName>Vaggelis</GivenName>

</Name>

<ElectronicAddress>

<Email xmlns="urn:mpeg:mpeg7:schema:2001">http://xquery.com/mailman/listinfo/talk</Email>

</ElectronicAddress>

</Agent>

 

 

I am looking for a way ro remove the namespaces

for example i want to my results looks like the following :

 

 

<Agent type="PersonType">

<Name>

<FamilyName initial="M">Moras</FamilyName>

<GivenName>Vaggelis</GivenName>

</Name>

<ElectronicAddress>

<Email>http://xquery.com/mailman/listinfo/talk</Email>

</ElectronicAddress>

</Agent>

 

Could any body help me please?

Thanks in advance 

Manolis

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xquery.com/pipermail/talk/attachments/20060112/c20e9ea5/attachment-0001.htm


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
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-2007 All Rights Reserved.