|
Subject: [xsl] Document() Problem: From: Gavin Myers <GavinM@xxxxxxxxx> Date: Thu, 21 Jun 2001 17:16:45 -0500 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Language translation, Clapham, Paul | Thread | Re: [xsl] Document() Problem:, David Carlisle |
| [xsl] Language translation, Maulik Modi | Date | Re: [xsl] conditional statements, David Carlisle |
| Month |