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... 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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With