Is there a way to place an "xsl:value-of" into an inline string?
Ok here is an example what I'm trying to accomplish:
<div class="testClass1 {place xsl:value-of HERE}"> </div>
Is there any way to pull something like this off in XML/XSLT?
Basically I just need to create an option to set the class for a wrapping div in XML..开发者_StackOverflow. Not sure if this is possible.
Use an Attribute-value-template:
<div class="testClass1 {xpath-expression}"> </div>
...or an xsl:attribute.
<div>
<xsl:attribute name="class">testClass1 <xsl:value-of select="{xpath-expression}"/></xsl:attribute>
</div>
You can always go with
<div>
<xsl:attribute name="class">testClass1 <xsl:value-of select="..." /></xsl:attribute>
<div>
精彩评论