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: XSL value-of select question


Names of XML elements and attributes may not have spaces.  The name of your
element is "article", NOT "article id".  That's why you get a message saying
it's illegal.

If you want to get the value of the "id" attribute, you would use

<xsl:value-of select='@id'/>

(of course, the context node would have to be the "article" for this to
work).

Tom P

[Samina Islam]

> I also have another questions.  My input XML doc begin
> like this:
>
> <?xml version="1.0" encoding="iso-8859-1" ?>
>   <moreovernews>
>      <article id="_21985527">
>  ...
>
> and continues...
> when I try to get at the value of <article id> by
> typing: "  <xsl:value-of select="article id"/>  ", it
> gives me an error message:
>



 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]