lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting HTMLFormSaveAction.java
Date Wed, 20 Aug 2003 16:31:32 GMT
michi       2003/08/20 09:31:32

  Modified:    src/java/org/apache/lenya/cms/cocoon/acting
                        HTMLFormSaveAction.java
  Log:
  namespace problem workaround
  
  Revision  Changes    Path
  1.12      +8 -2      cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/HTMLFormSaveAction.java
  
  Index: HTMLFormSaveAction.java
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/cocoon/acting/HTMLFormSaveAction.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- HTMLFormSaveAction.java	20 Aug 2003 14:21:51 -0000	1.11
  +++ HTMLFormSaveAction.java	20 Aug 2003 16:31:32 -0000	1.12
  @@ -178,7 +178,13 @@
        *
        */
       private void setNodeValue(Document document, String value, String xpath) throws Exception
{
  -        Node node = DOMUtil.getSingleNode(document.getDocumentElement(), xpath);
  +        // FIXME: org.apache.xpath.compiler.XPathParser seems to have problems when namespaces
are not declared within the root element. Unfortunately the XSLTs (during Cocoon transformation)
are moving the namespaces to the elements which use them! One hack might be to parse the tree
for namespaces (Node.getNamespaceURI), collect them and add them to the document root element,
before sending it through the org.apache.xpath.compiler.XPathParser (called by XPathAPI)
  +        // FIXME: There seems to be another problem with default namespaces
  +
  +        //new org.apache.lenya.xml.DOMUtil().setElementValue(document, xpath, value);
  +
  +        //Node node = DOMUtil.getSingleNode(document.getDocumentElement(), xpath);
  +        Node node = org.apache.xpath.XPathAPI.selectSingleNode(document, xpath);
           if (node == null) {
               // FIXME: warn
               getLogger().error(".setNodeValue(): Node does not exist (might have been deleted
during update): " + xpath);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message