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

Transforming Locally Declared Namespaces into Globally Decla

Subject: Transforming Locally Declared Namespaces into Globally Declared Namespaces
From: "Winchel \"Todd\" Vincent III" <winchel@xxxxxxxxxxxxxx>
Date: Thu, 1 Jul 2004 09:33:09 -0400
decla
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



Current Thread

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