In my template I created a variable value to
save the value of the desired node, but as soon as I crate
the variable:
<xsl:variable name="value"
select="document($profile)/user/type/text()"/>
I can not use the source document any more, am I defining the
variable in a wrong way? Please help, it is really urgent.
I suspect you are doing something like
<xsl:for-each select="$value">
in which case, inside the <xsl:for-each>, the current node is in the new
document, which means that any //x expressions also refer to the new
document.
The usual remedy is to declare a global variable
<xsl:variable name="root" select="/"/>
and then you can always refer to the primary document as $root.
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list