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

Re: how can I get the subelement

Subject: Re: how can I get the subelement
From: liying <lsui@xxxxxxxxxxx>
Date: Tue, 14 Nov 2000 11:08:18 -0800
get subelement in xml
thanks edmund,

but I still get something, here is my xml file and xsl file


<?xml version="1.0"?>
<books>
<book category="reference">
  <author>Nigel Rees</author>
  <title>Sayings of the Century</title>
  <price>8.95</price>
  </book>
<book category="fiction">
  <author>Evelyn Waugh</author>
  <title>Sword of Honour</title>
  <price>12.99</price>
  </book>
<book category="fiction">
  <author>Herman Melville</author>
  <title>Moby Dick</title>
  <price>8.99</price>
  </book>
<book category="fiction">
  <author>J. R. R. Tolkien</author>
  <title>The Lord of the Rings</title>
  <price>22.99</price>
  </book>
</books>
--------------------------------------------------------------------------
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>

<xsl:template match="//author/*" >
    <xsl:value-of select="name()" />

</xsl:template>


</xsl:stylesheet>
-----------------------------------------------------------

and the result is

multivac (28) % java com.icl.saxon.StyleSheet book.xml book1.xsl
<?xml version="1.0" encoding="utf-8" ?>

  Nigel Rees
  Sayings of the Century
  8.95


  Evelyn Waugh
  Sword of Honour
  12.99


  Herman Melville
  Moby Dick
  8.99


  J. R. R. Tolkien
  The Lord of the Rings
  22.99

It just strange

thanks anyway


 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.