Jump to content

Value-of replacement


Undrium

Recommended Posts

I've been searching through the net in general for a substitute of value-of. Is it possible to for instance <xsl:value-of select="@name"/> shorter?Since XSLT is tag-oriented I doubt there is a shortcut, would be nice to know for sure, though.Thanks,Undrium

Link to comment
Share on other sites

Depends... if you mean a shortcut for writing out a text of an element, no. There's no shorter way than:

<element><xsl:value-of select="@value" /></element>

But if you mean writing out the value of an attribute, the shortest way is with an Attribute Value Template, i.e.

<element attribute="{@value}" />

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...