|
Subject: Re: [xsl] copy-of too powerful or wrong From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 09 Aug 2004 17:04:37 -0400 |
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>Cheers, Wendell
I'd like to be able to do something like this
<xsl:template match="/"> <xsl:copy-of select="@*|node()"/> </xsl:template>
<!--SUMMARY - this comments out the Summary chunk-->
<xsl:template match="/chunk/chunk[chunk-meta/title[(text()='Summary')]]"/>
<!--INSIGHTS commented out-->
<xsl:template match="/chunk/chunk[chunk-meta/title[(text()='Insights')]]"/>
<!--KEYTERMS commented out-->
<xsl:template match="/chunk/chunk[@differentiation='keyterms']"/>
<!--REVIEW QUESTIONS commented out-->
<xsl:template match="/chunk/chunk[@differentiation='review-questions']"/>
<!--INSIGHTS commented out-->
<xsl:template match="/chunk/ref-note-list[title/text()='Additional Readings']"/>
Where the first template match copies everything and the additional template matches comment out those specific chunks. It doesn't work - as you could guess. But I do not know why - I am a beginner and copy-of is very powerful - too powerful. I am looking to rebuild the xml (transformed) using copy-of - is that the wrong thing to do?
--+--
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] copy-of too powerful or wrong, SnHndrc | Thread | RE: [xsl] copy-of too powerful or w, Marty McKeever |
| [xsl] copy-of too powerful or wrong, SnHndrc | Date | Re: [xsl] Substring a Value, Jeni Tennison |
| Month |