This is a question for the [EMAIL PROTECTED] mailing list, not
the general list, so I've forwarded it along here - Shane
(If I had to make a quick guess, this is related to the fact that Xalan
assumes the input is immutable, so our DTM layer is probably
complaining that someone's trying to mutate when we don't expect it.
But the experts will have the definitive answer I'm sure...)
----
From: "Louis Meigret" <[EMAIL PROTECTED]>
Date: 2002-08-16 4:28:43
I'm basically trying to write in Java a function that returns a part of
the
nodes past to it (from XSLT) while modifying (or replacing) one of
these
nodes.
I am using Java 1.4.1 (I have had the same problem with 1.4.0) with
Xalan
(included in the jaxp-1.2_0.1 release).
I get the following error which puzzles me.
org.apache.xml.dtm.DTMDOMException:
at
org.apache.xml.dtm.ref.DTMNodeProxy.setNodeValue(DTMNodeProxy.java:317)
at
com.xcential.CgmlConv.CgmlConv.getNodesAfterSecNum(CgmlConv.java:157)
This is an sniplet of the function where the exception occurs ***
represents
line 157
public static NodeList getNodesAfterSecNum(NodeList nl)
{
int i = 0;
...
try
{
...
if (i < nl.getLength() && nl.item(i).getNodeType() ==
Node.TEXT_NODE)
{
nl.item(i).setNodeValue(" Changed ");
<**********
}
...
I have tried to clone the Node, to import the node into a different
document
and return this to XSLT, I always get an Exception at the end.
I must say I did not find much documentation (what does a
DTMDOMException
mean ?). Why is DTMDOM used, how can I change this if this limits what
I can
do ?
Thank you for any help (sorry if this is a basic problem).
Louis
--
=====
- Shane
<eof .sig="'When I use a word,' Humpty Dumpty said,
in a very scornful tone, 'it means just what I
choose it to mean - neither more nor less'"
"Oohayu oyod?!"=gis. />
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com