This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Flummoxed with Filtering
- From: Jeff Kenton <jkenton at datapower dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 29 Jul 2002 18:32:12 -0400 (EDT)
- Subject: Re: [xsl] Flummoxed with Filtering
- Reply-to: xsl-list at lists dot mulberrytech dot com
On Mon, 29 Jul 2002, Greg Kushmerek wrote:
..Hi all,
..
..I'm trying to use filtering transformations and put together some code based on
..a boilerplate I found in Jeni Tennison's book.
..
..I figure I'm missing something fundamental because I'm getting this error
..message:
Yes -- your copy-of is outside your template, so it looks like it's a top
level part of your stylesheet.
..
.. >XSLT error: (StylesheetHandler) xsl:copy-of not allowed inside a stylesheet.
.. >(../xsl/qhelp.xsl, line 11, column 28)
..
..For this stylesheet:
..
.. ><?xml version="1.0"?>
.. ><xsl:stylesheet version="1.0"
.. > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
.. ><xsl:strip-space elements="*" />
.. >
.. ><xsl:template match="@*|node()">
.. > <xsl:apply-templates />
.. ></xsl:template>
.. >
.. ><xsl:template match="summ | //Synopsis" />
This template end right here ----------^
Remove the slash and it will be happier.
.. > <xsl:copy-of select="." />
.. ></xsl:template>
..
..used on this source (XML) example:
..
.. ><?xml version="1.0" standalone='yes'?>
.. ><!-- Start of need2mput conversion -->
.. ><Tool name="need2mput"
.. > date='"June 20, 2002"'
.. > ver='"1.0"'>
.. > <Name>
.. > <summ>Determine which files you have modified </summ>
.. > </Name>
.. > <Synopsis>
.. > <c> <o>[ -v ] [ <var>file...</var> | <var>dir...</var> ] </o></c>
.. > </Synopsis>
.. > <Description>
.. > <p>The <tt>need2mput</tt> command determines which files you have
.. > modified in your sandbox and therefore may want to check in under
.. > source control. </p></Description>
.. > <Options>
.. > <Definitions>
.. > <dt><tt>-v</tt></dt>
.. > <df>verbose mode (for debugging) </df>
.. > </Definitions>
.. > </Options>
.. > <Examples>
.. > <ex>need2mput bat/share/bin/need2mput</ex>
.. > </Examples>
.. ></Tool>
..
..My goal is to simply yank out what's in between the <summ></summ> and
..<c></c> tags.
..
..Thanks for any help,
..
..--gk
..
..
..Greg Kushmerek
..Sr. Technical Writer
..IA/Tools
..The MathWorks
..(+1) 508-647-7136
..
..
.. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
..
--
Jeff Kenton
DataPower Technology, Inc.
*** Wire Speed XSLT ***
http://www.datapower.com/products.shtml
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list