This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: how can I get the subelement


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]