XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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 <david@semlabs.co.uk>
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: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS