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

Pattern matching

Subject: Pattern matching
From: Bovone Stefano <Stefano.Bovone@xxxxxxxx>
Date: Fri, 15 Jan 1999 12:17:21 +0100
pattern matching mail postal
Title: Pattern matching

Hello. My name is Stefano Bovone. I'm an italian engineer and I work for the Elsag S.p.a. Elsag is an industry that produces hybrid mail systems, machines for postal sorting, client assistance, electronic commerce, ecc. ecc.

I'm studying XML/XSL and my principal goal is to render ducument in printing.

Actually I have a problem: I have the following XML document:

<?xml version="1.0" encoding="UTF-8"?>

<document>
 <common>
  <text>First Line</text>
  <insert pl="1"/>
  <text>Second Line</text>
  <insert pl="2"/>
 </common>
 
 <particular>
  <insert_text num="1">First Insert</insert_text>
  <insert_text num="2">Second Insert</insert_text>
 </particular>

 <particular>
   <insert_text num="1">First Insert 2</insert_text>
   <insert_text num="2">Second Insert 2</insert_text>
 </particular>
 

  .....

 <particular>
   <insert_text num="1">First Insert 1000</insert_text>
   <insert_text num="2">Second Insert 1000</insert_text>
 </particular>
 
</document>

and the following XSL stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
 
<xsl:template match="/">
 <HTML>
 <BODY>
    <xsl:for-each select="/document/particular">
       <xsl:apply-templates select="/document/common/*"/>
    </xsl:for-each>
 </BODY>
 </HTML>
</xsl:template>
 
<xsl:template match="text">
 <P>
 <xsl:apply-templates/>
 </P>
</xsl:template>

<xsl:template match="insert">
 <P>
 <xsl:value-of select="   --- ???? ---- "/>
 </P>
</xsl:template>

</xsl:stylesheet>
 
I want the following HTML output:

<HTML>
 <BODY>
  <P>First Line</P>
  <P>First Insert</P>
  <P>Second Line</P>
  <P>Second Insert<P/>
 
  <P>First Line</P>
  <First insert 1<P/>
  <P>Second Line</P>
  <p>Second Insert 1<P/>


  .....

  <P>First Line</P>
  <First insert 1000<P/>
  <P>Second Line</P>
  <p>Second Insert 1000<P/>

 </BODY>
</HTML>

What pattern matching may I use in place of " --- ???? ---- " ?

Thanks.
Best regards.

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.