xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit Fouche" <b.fou...@cross-systems.com>
Subject How to access xml tag attribute with XSL ?
Date Fri, 31 Mar 2000 09:57:07 GMT
Hi,
I'm novice with XSL, and I'd like to know if it's posible to access to an
XML tag attribute using an XSL stylesheet associated with the XML doc ?

example:
    xml doc:
    <card id='menuCard' title='menu1'>
        <p align='left'>
            Hello guys !
        </p>
    </card>

    So, I would like to access to the "id" and "title" attributes of the tag
<card>...

I've writing this for the XSL stylesheet:
<?xml version="1.0" encoding="ISO8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
  <HTML>
  <BODY>
    <xsl:for-each select="wml/card">
    ...here i want to write the title of card...
    <p align="center">
          <xsl:apply-templates/>
     </p>
    </xsl:for-each>
  </BODY>
  </HTML>
</xsl:template>

</xsl:stylesheet>

Thank for helping me !
Ben.
bfouche@caramail.com


Mime
View raw message