[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: doctype
Subject: Re: doctype From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 24 Nov 2000 19:53:11 +0100 (MET) |
> Hi, I am trying to find out the doctype , i.e top level element name, in > order to load an additional file, whose name is based on the doctype. [...] > I think it should close to the following, but I am still missing the ??? > part? > <xsl:variable name="DocType"> > <xsl:value-of select="???"/> > </xsl:variable> > <xsl:variable name="RecordLayouts" select="document(concat($DocType, > 'else.xml'))"/> For the name of the top level element (in XML terms the "document element") use <xsl:value-of select="name(/*)" /> BTW, your code can be written much shorter: Step 1: replace <xsl:variable ..> <xsl:value-of select= <(xsl:variable> with <xsl:variable name=... select="the expression from value-of" /> Step 2: Use the expression where you need it (if it's only once): <xsl:variable name="RecordLayouts" select="document(concat(name(/*),'else.xml'))"/> Cheers, Oliver /-------------------------------------------------------------------\ | ob|do Dipl.Inf. Oliver Becker | | --+-- E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: doctype, Dimitre Novatchev | Thread | Re: doctype, STENZEL |
XSL-FO: footnotes in tables, David Carlisle | Date | XSL-FO: syntax for datatypes, David Carlisle |
Month |
Keywords