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

Document() Problem:

Subject: Document() Problem:
From: Gavin Myers <GavinM@xxxxxxxxx>
Date: Thu, 21 Jun 2001 17:16:45 -0500
gavin myers
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

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.