Re: [xsl] refering to internal xml data

Subject: Re: [xsl] refering to internal xml data
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Fri, 21 Nov 2003 16:29:36 -0700
Yes, you  can...  create a new namespace and then create an XML node-set
using this namespace.  Reference it using the document function and then use
the variable name within your style sheet to access the content of the XML.

Example...

<xsl:stylesheet
 version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:textValue="my::textValue"
 exclude-result-prefixes="textValue"
>

 <textValue:textValueofNumber>
  <number value="1">First</number>
  <number value="2">Second</number>
  <number value="3">Third</number>
  <number value="4">Fourth</number>
  <number value="5">Fifth</number>
  <number value="6">Sixth</number>
  <number value="7">Seventh</number>
 </textValue:textValueofNumber>

 <xsl:variable name="textValueofNumber"
select="document('')/*/textValue:*"/>

<xsl:value-of select="$textValueofNumber/*[@value='2']"/>

Best of luck!

M.


----- Original Message ----- 
From: "Robert Van Gemert" <rcvangemert@xxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, November 21, 2003 4:16 PM
Subject: [xsl] refering to internal xml data


> All,
>
> Can you include xml within a style sheet and refer to both the internal
and
> external xml data.
> If so a small example would help.
>
> Thanks,
> Robert
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread