[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: apply templates on a variable

Subject: Re: apply templates on a variable
From: Rob Rohan <me@xxxxxxxxxxxx>
Date: 30 Jun 2003 14:58:37 -0700
Re:  apply templates on a variable
Oh my, I am sorry

<xsl:apply-templates select="$testfile" />

I had a dtd error which was the reason my transforms were failing. :(

Let 
>My apologies if this is a stupid question, 
please take effect.


On Mon, 2003-06-30 at 14:29, Rob Rohan wrote:
> My apologies if this is a stupid question, or has been asked before.
> 
> Is is possible to apply templates to the contents of a variable? I know
> this is kind of going backwards, but assuming I cannot mess with the
> input XML is there anyway to do the following:
> 
> <?xml version="1.0" encoding="utf-8"?>
> 
> <xsl:stylesheet version="2.0"
> 	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> 	xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >
> 	<xsl:output method="xml" indent="yes" encoding="utf-8"/>
> 	<xsl:strip-space elements="*"/>
> 	
> 	<xsl:include
> href="file:///home/rob/programs/include/docbook1_60_1/html/docbook.xsl"
> />
> 	<xsl:variable name="testfile"
> select="document('/mnt/fileserver/projects/fodder/faq_docbook.xml')" />
> 	
> 	<xsl:template match="/request">
> 		<!-- I know this isn't correct, but I would like to
> 		"copy" the variable to the *input* document or something
> 		there abouts -->
> 		<xsl:copy-of select="$testfile" />
> 		<!-- where now these would apply -->
> 		<xsl:apply-templates />
> 	</xsl:template>
> 	
> </xsl:stylesheet>
> 
> I looked in the FAQ but didn't see anything that seemed relevant.
> (probably because it is not possible :) )
> 
> p.s. they are not named templates
> 
> Thanks,
> Rob
-- 


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.