Altova Mailing List Archives

Re: [xsl] Document() Problem:

From: Gavin Myers <GavinM@--------->
Date: 6/22/2001 7:30:00 AM
That's my problem. It doesnt make sense.

>> I get null + the number of elements/attributes.
>This doesn't make sense, null isn't an XSL value, what do you get?

I get null's, equivalent to the # of elements/attributes.

For example:

If my xml looks like this:


and I do this:
<xsl:variable name="xml" select="document('names.xml')"/>
<xsl:Value-of select="$xml"/>
I get this:


If my xml looks like this:


i would get this:


This is in the output on the screen.

My main problem is not the syntax of what i'm doing, If I can get ANY result
no matter how useless or obscure I will be happy. As long as the result has
soemthing to do with the xml I am trying to hit.

But I cannot get into the xml. I cannot put any slashes in the xsl:variable,
or the xsl:value-of

I cant do this: Because the variable $xsl ceases to exist
<xsl:variable name="xml" select="document('names.xml')/user"/>

I cant do this because i get a java lang null pointer exception
<xsl:value-of select="$xml/name/"/>

We are using xalan, my big question is does anyone else use xalan or have
they come across this problem before?

 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.