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

XSLT,Java, external function and set DTMDOMException

Subject: XSLT,Java, external function and set DTMDOMException
From: "Louis Meigret" <meigret@xxxxxxxxxxxxxxxx>
Date: Thu, 15 Aug 2002 23:52:23 -0500
xslt external function
 
  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

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


 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.