Subject: Re: [xsl] Re: Defining a Variable that depends on an unknown number of conditions From: "Andrew Ferk" <andrewferk@xxxxxxxxx> Date: Thu, 1 Jan 2009 10:47:14 -0600 |
>> Otherwise, I have a more challenging >> problem that I will post when I can figure out how to ask the question >> correctly. > > Bring it on! :{)} OK. I'm trying to determine if element_x or element_y contain the value value_m or value_n. I believe I'm close, but can't figure out what to replace ____________ with. I tried current()/../@on and ./../@on but no luck. Thanks. Below is a quick mock-up of files. I have xml_a.xml as so: <xml_a> <depends> <depend on="element_x" equals="value_m|value_n"/> <depend on="element_y" equals="value_m|value_n"/> </depends> </xml_a> and xml_b.xml: <xml_b> <element_x>value_m</element_x> <element_y>value_p</element_y> </xml_b> finally transform.xsl, that opens xml_b.xml and transforms xml_a.xml. <xsl:variable name="xml_b" select="document('xml_b.xml')/xml_b"/> <xml:template select="xml_a"> <xsl:variable name="my_test" select = "depends/depend/@equals[contains(.,$xml_b/*[name()=__________])]"/> </xml:template> -- Andrew Ferk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: ANN: A static code qu, Mukul Gandhi | Thread | RE: [xsl] Re: Defining a Variable t, Michael Kay |
Re: [xsl] Re: ANN: A static code qu, Michael Müller-Hille | Date | RE: [xsl] Re: ANN: A static code qu, Michael Kay |
Month |