[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

cascading tags

Subject: cascading tags
From: "Andreas Putscher" <andreasputscher@xxxxxx>
Date: Thu, 17 Jan 2002 10:13:44 +0100
cascading tags
Hi everybody,
I am a newbie in XSLT.
The following is my problem:

I have an XML inputfile that I want to transform into another XML file:

a scratch of the inputfile:

<bulletlist>
    <item>there are two different levels of compliance for XML documents:
         <numberedlist>
              <item>the well-formedness of an XML document</item>
              <item>the validityof an XML document</item>
         </numberedlist>
    </item>
</bulletlist>

I would like to transform this file into:

<p>there are two different levels of compliance for XML documents:
<p>the well-formednessof an XML document</p>
<p>the validityof an XML document</p>

If I use the following transformation codes

<xsl:template match="bulletlist/item">
  <p><xsl:text>- </xsl:text>
  <xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="numberedlist/item">
  <p><xsl:number value="position()" format="1. "/><xsl:value-of
select="text()" /></p>
  <xsl:apply-templates/>
</xsl:template>

I get

<p>- there are two different levels of compliance for XML documents:
     <p>1. the </p>the well-formedness of an XML document
     <p>2. the </p>the validity of an XML document</p>


which is an invalid document.
How do I have to change my statement, so that it works.

Thanks for your help,
  Andreas


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.