[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Document() Problem:

Subject: Re: Document() Problem:
From: Gavin Myers <GavinM@xxxxxxxxx>
Date: Fri, 22 Jun 2001 10:07:54 -0500
gavin myers
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:

<user>
<name>joe</name>
<name>fred</name>
</user>


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

nullnullnullnullnull

If my xml looks like this:

<user>
<name>joe</name>
<name>fred</name>
<name>larry</name>
</user>

i would get this:

nullnullnullnullnullnullnull


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:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.