This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Flummoxed with Filtering
- From: "Dion Houston" <dionh at microsoft dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 29 Jul 2002 15:22:36 -0700
- Subject: RE: [xsl] Flummoxed with Filtering
- Reply-to: xsl-list at lists dot mulberrytech dot com
You accidentally closed a template tag:
<xsl:template match="summ | //Synopsis" />
<xsl:copy-of select="." />
</xsl:template>
You want:
<xsl:template match="summ | //Synopsis">
<xsl:copy-of select="." />
</xsl:template>
HTH!
Dion
-----Original Message-----
From: Greg Kushmerek [mailto:gkushmer@mathworks.com]
Sent: Monday, July 29, 2002 3:09 PM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] Flummoxed with Filtering
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:
>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" />
> <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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list