You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Steve Cohen <st...@mcs.com> on 2000/10/09 00:24:59 UTC

Can not convert #RTREEFRAG to a NodeList!

Using Xalan-Java version 1.2.D02 I am trying to build a stylesheet
that works one of two ways, the choice being made dynamically at
transformation time.

I want there to be two options - load information from a supplementary
xml file containing information that will differ from transform to
transform.  If this file is not available, get the information from
the tree in the main xml file being transformed. 

The choice between the two options is to be determined at run time.

Six short files are attached.
test.xml is the "main" xml file to be parsed by all the stylesheets.
test-team.xml is the "supplementary" xml file

test1.xslt combines the main xml file with the supplementary xml file
to produce output

test2.xslt uses only the main xml file to produce output

test3.xslt attempts to load the data from the supplementary xml file,
and if unsuccessful, falls through to using the main xml file to
produce its output.

test.bat is invoked with a parameter of 1, 2, or 3 to launch the
transform.  It merely loads its classpath and then called xalan via
java.
classpath.bat is responsible for putting xalan and xerces on the
classpath.

The problem is this:
test 1 and test 2 work as desired.
test 3 fails to work and I am unable to get my concept to operate
because the processor interprets the tree it is working with an an
Result Tree Fragment.  This is so even though the tree fragment that
is produced is exactly the same as that produced by either test 1 or
test 2 but must pop up in a different context.

Can someone please point me to a workaround?