Well I have great news to begin with, IT WORKS! On your advice, I went back to
xml.apache.org and downloaded the xalan-j2_2_D6. I downloaded 1.2.2 because I thought
it was the latest release version, but if the development version works for what I
need, I'll go with it.
Unfortunately, I am not able to use the ApplyXPath sample with the id() XPath
function. When I tried this, I got an exception. It did work for normal XPath
statements though. If you would like to investigate further, here is a text file with
the exception listed.
-- Daniel Einspanjer, [EMAIL PROTECTED] on 07/16/2001
On Fri, 13 Jul 2001 15:17:54 -0700, Gary L Peskin wrote:
>Oh, I forgot to mention, that I also tried:
>
>�java ApplyXPathG new.xml "id('a')"
>
>and got the following results:
>
>
>Loading classes, parsing Daniel\new.xml, and setting up serializer
>Querying DOM using id('a')
><output>
><test id="a" name="TestA"/>
></output>
>
>Gary
>
>Gary L Peskin wrote:
>>�
>>�Daniel --
>>�
>>�This worked for me just as is. �Here are my results:
>>�
>>��C:\Temp\Daniel>java IDTest
>>��Has Child Nodes: true
>>��Name: test
>>��Value: null
>>�
>>�Is this what you got or do you get some kind of exception? �This looks
>>�like it's working fine on my system.
>>�
>>�The version of XalanJ that you're using is very old. �I'd recommend
>>�upgrading to the latest version ASAP. �But that shouldn't affect any of
>>�this.
>>�
>>�Gary
Test
ID: a
name: TestA
Has Child Nodes: true
Name: test
Value: null
Loading classes, parsing new.xml, and setting up serializer
Querying DOM using //test[@id='a']
<output>
<test id="a" name="TestA"/>
</output>
Loading classes, parsing new.xml, and setting up serializer
Querying DOM using id('a')
<output>
Exception in thread "main" java.lang.NullPointerException
at
org.apache.xml.dtm.ref.DTMNodeIterator.nextNode(DTMNodeIterator.java:198)
at ApplyXPath.doMain(ApplyXPath.java:133)
at ApplyXPath.main(ApplyXPath.java:158)