Subject: Re: [xsl] XPath without using variable ? From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 03 Jul 2004 08:35:12 -0400 |
How do specify an attribute in XPath? @type is an attribute of an in-context element.
I've tried this, but it does not work. <xsl:variable name="path" select="//hungarian/identifier[@name=@type]"/>
When I Hard code e.g. identifier[@name='asp:DropDownList'] it works. Also using a variable, as below it works.
What is XPath grammar to avoid having to use a variable?
I'm use this as a lookup (my problem: trying to avoid using variable 'test')
<xsl:variable name="test" select="@type"/>
<xsl:variable name="path" select="//hungarian/identifier[@name=$test]"/>
-- Public training 3 days XSLT & 2 days XSL-FO: Phoenix,AZ 2004-08-23 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XPath without using variable ?, Arthur Maloney | Thread | Re[2]: [xsl] XPath without using va, Arthur Maloney |
XPath without using variable ?, Arthur Maloney | Date | RE: [xsl] sorting and grouping, m.vanrootseler |
Month |