|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Document() Problem:
Okay, lets say this is my xml:
<!--names.xml-->
<root>
<name>joe</name>
<name>fred</name>
</root>
and this is my xsl:
<!--nameprocess.xsl-->
<xsl:variable name="xml" select="document('names.xml')//root"/>
<!--... skipping all of the not-important things -->
<xsl:template match="/">
<xsl:value-of select="$xml/name/."/>
</xsl:template>
this is correct right?
Now, i've been working on this all day, i mean ALL DAY. So i've tried every
single / ./ //. /./ .//. combination i can think of.
I'm using xalan.
If I Just do this:
<xsl:variable name="xml" select="document('names.xml')/>
<xsl:value-of select"$xml"/>
I get null + the number of elements/attributes. So with the example xml
above it would return: nullnullnullnullnull
If i put ANY slash in the xsl:Variable i get a xalan error that says it
cannot get the value of $variable.
If i put ANY slash in the xsl:value-of i get a null pointer exception
I've tried xsl:copy-of, xsl:for-each, and xsl:value-of
I've also tried xsl:paramater, and xsl:variable
I've also tried <xsl:value-of select="document('names.xml')/> <xsl:for-each,
<xsl:copy-of, etc...
I've tried EVERYTHING i can think of but i cannot get this seemingly simple
thing to work. Does anyone know if this is a xalan issue, or is there
something i am missing?
Gavin
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








