Subject: RE: [xsl] variables From: "Michael Kay" <mhkay@xxxxxxxxxxxx> Date: Thu, 31 May 2001 16:10:47 +0100 |
> I have the following problem. My XSL-file reads a second > document beside the original source > document that includes more than one location-path. > For example: > > <path1>elem1/child1<path1> > <path2>elem2/child2<path2> > : > > I want to create one variable that contains all nodes of > the source-document specified by the loction-paths in the > path-elements > (path1,path2,...). > > I know how to do this with one path-element (e.g. path1), the > solution would > be > > <xsl:variable name="doc2" select="document('doc2.xml)"> > <xsl:variable name="var1" > select="xalan:evaluate(string($doc2/path1))">. > > But I don't know how to do this with more than one path-element. Construct a string of the form "elem/child1 | elem/child2" by doing an xsl:for-each over the path expressions, appending " | " to each one except the last. Then do xalan:evaluate() using the resulting string. Mike Kay Software AG XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] variables, Jeni Tennison | Thread | [xsl] xsl:variable within xsl:choos, Rene de Vries |
RE: [xsl] turing complete?, Michael Kay | Date | RE: [xsl] text output and space pad, Michael Kay |
Month |