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

RE: Limitations of Includes in XSL

Subject: RE: Limitations of Includes in XSL
From: "Selva, Francis" <Francis.Selva@xxxxxxxxxxxxxxx>
Date: Tue, 25 Apr 2000 13:26:20 -0700
RE: Limitations of Includes in XSL

> -----Original Message-----
> From: Ken Burnside [mailto:Ken.Burnside@xxxxxxxxxxxxxxxxxx]
 
> I'm running into two problems:
> 
> 1) The XML parser (FOP) says that I cannot use an include inside of a
> template.  I'm trying to see if I can summon the include outside the
> template and call the results from within it, but I confess 
> to floundering
> a lot.

xsl:include and xsl:import has to be outside template declaration.





> 2) The other issue I'm running into is passing the appropriate root
> document to the XSL widget that's called by the include.  For 
> example:  The
> whole form processes TR-300.xml.  The widget processes the 
> ChargeListRSQ
> block of code, and the attributes of the tags inside of it.  Since the
> widget needs to look for the ChargeListRSQ block in any XML 
> file, it can't
> reference TR-300.xml directly. Since the include cannot be 
> inside of the
> <xsl:template> element, the obvious path of inheritance 
> doesn't work.  Is
> there any other way to specify "Look at this document" in the 
> XSL file,
> while, in turn, having the generic widget not care what the 
> document is
> (getting it from the statement above), and look for the attributes
> referenced in the included file.
> 
> Has anyone succeeded in doing this?
 
Its possible to import or include a xsl file inside another one and then
access the imported file's attributes.Or if u r having all ur attributes in
xml file(totally 2xml and 1 xsl),then u can access those attributes inside
the xsl like this:
      <xsl:template match="/">
		<xsl:apply-templates
select="document('yourattributefile.xml')/rootelement"/>
	</xsl:template>

I guess u r trying to include an xsl file inside another one and access the
include file's attributes,right?.If so,it shouldnt give u any problem cause
it doesnt need any special statements or functions.

Francis

 


 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.