Inside an XSLT macro i try to put a div tag around the output of the XSLT.
But i want the div tags Id to be different, based on a property on the page so i can style it differently
But when i try to save the XSLT file i get an error:
"System.Xml.XmlException: The 'div' start tag on line 23 does not match the end tag of 'xsl:when'. Line 24, position 4. "
So it's like it want the tag to be inside the xsl:when statement, but i must have it after the rest of the xslt because the whole block should be styled by the div tag.
Is there some obvious way to achieve this that i have overlooked ?
more "When's" here - left out
some more XSLT here - left out
and here the end tag for the above div tak comes:
XSLT and div tag problem
Inside an XSLT macro i try to put a div tag around the output of the XSLT.
But i want the div tags Id to be different, based on a property on the page so i can style it differently
But when i try to save the XSLT file i get an error:
"System.Xml.XmlException: The 'div' start tag on line 23 does not match the end tag of 'xsl:when'. Line 24, position 4. "
So it's like it want the tag to be inside the xsl:when statement, but i must have it after the rest of the xslt because the whole block should be styled by the div tag.
Is there some obvious way to achieve this that i have overlooked ?
more "When's" here - left out
some more XSLT here - left out
and here the end tag for the above div tak comes:
Thanks
Mikael
Hi Mikael,
try this:
Other stuff here
Hope this helps,
PeterD
Hi Mikael,
I'm pretty sure the closing div should be in the
...
[/code]
Hope this helps.
Regards,
/Dirk
Brilliant.
That works like a charm.
Can this be done with all attributes of all tags?
Thanks
Mikael
I think so yes, as long as you put the xsl:attribute in between the start and end-tag of the tag.
PeterD
PeterD method are working just fine, but I would for simplicity and my coding style have done it a little different.
My prefered method
[code]
Content of div
Alternate method[code]
Content of div
Thanks all.
i'm learning a lot here :-)
Mikael
is working on a reply...