xsl-list
[Top] [All Lists]

Re: xsl:value-of select : how to make some tags printed and othersnot

2003-10-07 04:49:08
I think you can use a normal matches statement calling a template and then
use xsl:copy-of to keep the subs.

PA Sport RnD

Andrew Curry
Software Developer

Telephone: 01430 455545
Website:        http://www.pa.press.net

PA News Limited:
Bridgegate, Howden, East Yorkshire, DN14 7AE

Registered Office:
PA News Limited, 292 Vauxhall Bridge Road, London SW1V 1AE. Registered in
England No. 3891053


----- Original Message ----- 
From: "Judith Rog" <Judith(_dot_)Rog(_at_)kb(_dot_)nl>
To: <XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, October 07, 2003 12:46 PM
Subject: [xsl] xsl:value-of select : how to make some tags printed and
othersnot


Hi,
Could anyone help me with the following?

Suppose I have the following XML:

<book>
   <title>My first book</title>
   <chapter>
     <nr>1</nr>
     <text> This is the <sw>content</sw> of my first book, where
<sub>I</sub> would like to leave in the sub-tag, but leave out the
sw-tag.</text>
   </chapter>
</book>

Is it possible to make an xsl statement that would print the content of
the <text> tag and all sub tags (<xsl:value of select="text"/>) but then
somehow leave the html formatting tags <sub> in the output? So:
This is the content of my first book, where <sub>I</sub> would like to
leave in the sub-tag, but leave out the sw-tag.
instead of:
This is the content of my first book, where I would like to leave in
the sub-tag, but leave out the sw-tag.

Thanks for your help.
Judith


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list