Jump to content

xls:variable


zedlitz

Recommended Posts

I´am trying to create a variable in a xlst stylesheetlike <xsl:variable name="myvar" select="'mytext'"/> (works fine)but I need to give the variable myvar the value</text> insted of the value mytextbut whenever I insert <> in my editor it expect a keyword, is there any way where I can bypass this behaivor or should I do it differently.What I´am looking for is a way to escape the special meaning of <>

Link to comment
Share on other sites

You can escape those characters by writing "<" and ">" for < and > respectively. And you can (and must) write ampersand (&) as "&".BTW, if you're thinking of using XSLT procedurally (creating "<text>", doing something, creating "</text>"), I suggest you look further into using XSLT templates instead.

Link to comment
Share on other sites

What i Need is to have a variable with the content of <EtPoname> and </EtPoname> but the characthers <> are giving problems because xml translate this as a command when assigning this value to a variableTIA
I got that, and I told you the solution already: escape them as I showed above... jees... do I have to spell it all out?
<xsl:variable name="myvar" select="'<mytext>'"/>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...