Next in thread → Next in month →

Re: [xml-dev] Remove Nodes But Keep Children

From
nico <>
To
Date
2009-02-23T11:16:56Z
ID
<>
Thread
Re: [xml-dev] Remove Nodes But Keep Children
Hello

Do you use XSLT ?
There is a simple way of doing that with XSLT (not tested) :

<xsl:template match="*|text()|@*[namespace-uri()='']">
    <xsl:copy>
        <xsl:apply-templates select="@*"/>
        <xsl:apply-templates/>
    </xsl:copy>
</xsl:template>

<xsl:template match="*[namespace-uri()='xfl_namespace']">
     <xsl:apply-templates/>
</xsl:template>

I think behaviour by default for attributes with prefix xfl: is to do nothing.
Here it uses priority of templates between * and *[namespace-uri()='xfl_namespace']. There are more expert peoples here on XSLT.

Regards
Nico
http://debeissat.nicolas.free.fr/


2009/2/22 David <[email protected]>
Appologies, forgot to link to the paste:

http://pastebin.com/f4895468f


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: [email protected]
subscribe: [email protected]
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


Next in thread → Next in month →