Subject: RE: Limitations of Includes in XSL From: "Selva, Francis" <Francis.Selva@xxxxxxxxxxxxxxx> Date: Tue, 25 Apr 2000 13:26:20 -0700 |
> -----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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Limitations of Includes in XSL, Steve Muench | Thread | Bolded Text in an <fo:block>, scott . wright |
Re: Limitations of Includes in XSL, Steve Muench | Date | Re: Bolded Text in an <fo:block>, Nikolai Grigoriev |
Month |