Gary,
  Ok.  I got your sample to work also and now I know why...
  There are 2 things different with your sample...

1.  You use the xsl:variable option in which you place the select as the
attribute in the xsl:variable element name instead of in the element body.
That is, you used:

    <xsl:variable name="myRTF" select='Ext:getMyXMLStr()'/>

and this works, however...

      <xsl:variable name="myRTF">
          <xsl:value-of select='Ext:getMyXMLStr()'/>
        </xsl:variable>

does NOT, and I thought the two forms of declaration were equivalent.

2.  Also, you don't use the top level element name in the XPATH call, that
is, you used...

<xsl:value-of select="$myRTF/ELEM1/ELEM1A"/>

instead of...

<xsl:value-of select="$myRTF/MYDOCUMENT/ELEM1/ELEM1A"/>

which surprised me!  The second form is the correct one if you use the
document() function to pull in an XML file from a URI, that is, if my
declaration for getting the xml file had been...

  <xsl:variable name="client" select="document('simple2.xml')"/>

and this contained the same data as before, you would need to use
$myRTF/MYDOCUMENT/...

Is this difference from the document() function an implementation
interpretation issue, a peculiarity of the spec, or a mistake?

Thanks for your help...I'm 'unblocked' now...

Bart Jenkins, CTO
Globeflow SA
Cardenal Marcelo Spinola 2, D1, Planta 6
28016 Madrid, Spain
telephone: +34 667 65 10 75




-----Original Message-----
From: Gary L Peskin [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 5:01 PM
To: [EMAIL PROTECTED]
Subject: Re: UPDATE: How to correctly process, via Xpath,
result-tree-fragments returned by JAVA extensions? More questions...


Bart --

I just copied the extension function verbatim from your email and it
works fine.  I'm using the following stylesheet:

<?xml version='1.0' encoding='ISO-8859-1' ?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:Ext="node1"
  xmlns:xalan="http://xml.apache.org/xalan";
  exclude-result-prefixes="Ext xalan">

  <xsl:template match="/">
    <xsl:variable name="myRTF" select='Ext:getMyXMLStr()'/>
    <xsl:value-of select="$myRTF/ELEM1/ELEM1A"/>
  </xsl:template>
</xsl:stylesheet>

If you can't figure out the problem, please send along your exact
stylesheet, input document, and stack trace of the exception that you're
receiving.

Thanks,
Gary


"Bart W.Jenkins" wrote:
> 
> Gary,
>   I put your sample code in, verbatim, with the fix and now I get a "null"
> TransformerException.
> Also, do I need to use NodeList or NodeSet?
> 
> Any ideas?
> 
> Bart Jenkins, CTO
> Globeflow SA
> Cardenal Marcelo Spinola 2, D1, Planta 6
> 28016 Madrid, Spain
> telephone: +34 667 65 10 75

Reply via email to