Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > style sheet referencing itself?

Reply
Thread Tools

style sheet referencing itself?

 
 
Joseph Kesselman
Guest
Posts: n/a
 
      03-20-2008
Malcolm Dew-Jones wrote:
> Is is possible for an xsl style sheet to reference itself?


document(""). See http://www.w3.org/TR/xslt#function-document
 
Reply With Quote
 
 
 
 
Malcolm Dew-Jones
Guest
Posts: n/a
 
      03-20-2008

Hello

Is is possible for an xsl style sheet to reference itself? I see examples
of using document() to get a set of nodes from an external xml file, but
in my setting I don't load any files, I just have variables in memory that
contain the xml data.

I want the style sheet to say something like

<xsl:template match="certain-nodes-in-document" >
<xsl:for-each select="a-set-of-nodes-in-the-template">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:for-each>
</xsl:template>

Thanks for feedback.
Malcolm

 
Reply With Quote
 
 
 
 
Malcolm Dew-Jones
Guest
Posts: n/a
 
      03-20-2008
Joseph Kesselman ((E-Mail Removed)) wrote:
: Malcolm Dew-Jones wrote:
: > Is is possible for an xsl style sheet to reference itself?

: document(""). See http://www.w3.org/TR/xslt#function-document

Thanks, I was looking at the xpath docs to try to figure out what to pass
to the document function, but I hadn't properly appreciated the usage of
the document function itself.

Much clearer now thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content Page specific style style sheet rshillington@gmail.com ASP .Net 0 07-14-2006 03:45 PM
referencing to style sheet David C ASP .Net 5 02-06-2006 09:55 AM
Firefox screwing with my style sheet margins! Bill Firefox 14 11-18-2005 03:30 PM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM
Adding style sheet dynamicaly Marc Nederhoff ASP .Net 2 11-05-2003 04:56 PM



Advertisments