The xsl:value-of element can be used to compute generated
text,within a template. for example by inserting the
value of a variable or by extracting text from the source tree.
The xsl:value-of element does this with an Expression that
is specified as the value of the select attribute. Expressions also be used
inside attribute values of literal result elements by enclosing the expression
in curly braces ({}).
The xsl:value-of tag is instantiated to create a text node in the result
tree. The select attribute is an Expression; this expression is
evaluated and the resulting object is converted to a string as if by a call to
the string function.The string specifies the string-value of the created text
node.No text node will be created, if the string is empty. The created text
node will be merged with any adjacent text nodes.
without converting it to a string the xsl:copy-of element can be used to copy a node-set over to the result tree.
The following example creates an HTML paragraph from a person element with
given-name and family-name attributes.The paragraph will contain the value of
family-name attribute of the current node and the given-name attribute of the current node followed by a space.
The following example creates an HTML paragraph from a person
element with given-name and family-name children elements. The paragraph will
contain the string-value of the first given-name child element of the current
node followed by a space and the string-value of the first family-name child
element of the current node.
Notice that only one line of data was copied from the XML document to the output.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords xslt-value-of,
xsl value of,
xslt for each,
xslt value of,
asp net xslt,
xslt value of attribute,
xsl value of select,
xslt value of select,
xpath value of,
xsl value of attribute,
asp net value.