Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Transforming Locally Declared Namespaces into Globally Declared Namespaces

From: "Winchel \"Todd\" Vincent III" <winchel@-------------->
To:
Date: 7/1/2004 5:33:00 AM
I would be grateful for any tips on the following issue:

I have two types of XML instances that I wish to transform into a third
type.  All of the instances validate against the same schema.  All instances
uses multiple namespaces.  I am calling these three types:

- Simple XML (Local)
- Complex XML (Local)
- Complex XML (Global)

Simple XML (Local) is XML with multiple namespaces declared *locally* on
elements *without* namespace prefixs.  For example:

<a xmlns="urn:a">
    <b xmlns="urn:b">
           <b>text</b>
           <b>text</b>
    </b>
    <c xmlns="urn:c">text</c>
<a>

Complex XML (Local) is XML with multiple namespaces declared *locally* on
elements *with* namespace prefixs.  For example:

<a:a xmlns:a="urn:a">
    <b:b xmlns:b="urn:b">
           <b:b>text</b:b>
           <b:b>text</b:b>
    </b:b>
    <c:c xmlns:c="urn:c">text</c>
<a>

Complex XML (Global) is XML with multiple namespaces declared *globally* on
the root element *with* namespace prefixes.

<a:a xmlns:a="urn:a" xmlns:b="urn:b" xmlns:c="urn:c">
    <b:b>
           <b:b>text</b:b>
             <b:b>text</b:b>
    </b:b>
    <c:c>text</c>
<a>

I prefer Complex XML (Global) because it is easy to read without the
namespaces cluttering the XML.  It is easy to tranform Complex XML (Global)
into Complex XML (Local) or Simple XML (Local).  However, I am looking to:

1. Transform Simple XML (Local) to Complex XML (Local) and/or to Complex XML
(Global), and

2. Transform Complex XML (Local) to Complex XML (Global).

Any thoughts on this would be appreciated.

Thanks,

Todd


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent