Re: [xsl] Getting values

Subject: Re: [xsl] Getting values
From: Rick Taylor <taylor@xxxxxxxx>
Date: Thu, 29 May 2003 08:41:41 -0600
Sergio,

If that is your xml file, then you will need to create a "root" element that contains these.

<myRoot>
  <title>Book 1</title>
  <creator>Sergio</creator>
  <identifier>http://xyz.html</identifier>
</myRoot>


The following template will output what you desire (assuming you are producing a simple text file):


<xsl:template match="myRoot">
      <xsl:value-of select="identifier"/>
         <xsl:text>&#10;</xsl:text> <!-- linefeed -->
      <xsl:value-of select="title"/>
         <xsl:text>&#10;</xsl:text>
      <xsl:value-of select="creator"/>
</xsl:template>

-rick

At 12:13 PM 5/29/03 +0200, you wrote:
Hi everyone,

This is my xml file:

<title>Book 1</title>
<creator>Sergio</creator>
<identifier>http://xyz.html</identifier>

and, I would like to get this output:

http://xyz.html
Book 1
Sergio

My problem: I can't get a value from the end of my XML file, and then, to
get the first value, because I only get the way to read just one time my XML
file, instead of various times. Could anyone write for me the XSL engine to
get that output?

Thanks a lot,
Sergio.


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

Rick Taylor XML Developer PPDM Association


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



Current Thread