🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.xml
Article #57

Re: Formatting xml attributes via stylesheets.

#57
From: Thierry Bezecourt
Date: Tue, 08 Aug 2000 00:00
29 lines
1768 bytes
In article <8moit0$fca$1@news1.tele.dk>,
  "Torsten Lund" <tel*nospam*@pel.dk> wrote:
> <Unit id="0">
> ...
> <errordescription>Code 564:</errordescription>
> ...
> </Unit>

> when viewing the xml document in IE, it writes "Code 564:" as it
> should, but how do I print out the value of "id" in the xml
> document?!? What is the xsl syntax to do this ?!?

Upgrade to the latest MSXML version (if necessary), and try this:

<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'>
  <xsl:template match='unit'>
   <body>
      Unit <xsl:value-of select='@id' />.
    </body>
  </xsl:template>
</xsl:stylesheet>

--
Thierry B�zecourt


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <8mol07$ltb$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8moit0$fca$1@news1.tele.dk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cf74,3c3ba754dd86eb08
X-Google-Attributes: gid10cf74,public
X-Google-Thread: 1047a4,3c3ba754dd86eb08
X-Google-Attributes: gid1047a4,public
X-Google-Thread: 10cf80,3c3ba754dd86eb08
X-Google-Attributes: gid10cf80,public
X-Google-Thread: 115169,3c3ba754dd86eb08
X-Google-Attributes: gid115169,public
From: Thierry Bezecourt <thbz@thbz.cx>
Subject: Re: Formatting xml attributes via stylesheets.
Date: 2000/08/08
Message-ID: <8mol07$ltb$1@nnrp1.deja.com>
X-Deja-AN: 655769932
References: <8moit0$fca$1@news1.tele.dk>
X-Http-Proxy: 1.0 srv66.globeid.com:8080 (Squid/2.3.STABLE1), 1.0 x57.deja.com:80 (Squid/1.1.22) for client unknown, 213.41.26.66
Organization: Deja.com - Before they buy you.
X-Article-Creation-Date: Tue Aug 08 09:47:51 2000 GMT
X-MyDeja-Info: XMYDJUIDthrubis
Newsgroups: comp.text.xml,dk.edb.internet.webdesign,microsoft.public.xml,netscape.public.mozilla.layout.xslt
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)