xsl-list
[Top] [All Lists]

[xsl] How do I force the XSLT processor to retain a namespace declaration despite an ancestor element having that same namespace declaration?

2011-07-25 12:05:14
Hi Folks,

When this is evaluated:

    <test xmlns:xs="http://www.w3.org/2001/XMLSchema";>
        <inner xmlns:xs="http://www.w3.org/2001/XMLSchema"; type="xs:string" />
    </test>

The output is this: 

    <test xmlns:xs="http://www.w3.org/2001/XMLSchema";>
        <inner type="xs:string" />
    </test>

Notice that the namespace declaration on <inner> is gone.

How do I force the XSLT processor to retain that namespace declaration and not 
discard it? (I am passing the <inner> element to other functions that don't 
have access to its surrounding elements, so I need that namespace declaration 
retained.)

/Roger

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--