cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cocoon Wiki] Update of "XPatchTaskUsage" by JakobFix
Date Tue, 30 Aug 2005 14:30:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.

The following page has been changed by JakobFix:
http://wiki.apache.org/cocoon/XPatchTaskUsage

The comment on the change is:
Sorry if these changes are inappropriate.

------------------------------------------------------------------------------
  {{{<taskdef name="xpatch" classname="XConfToolTask" classpath="${tools.tasks.dest}"/>
  }}}
  ;:''The source is found in tools/src/anttasks''
+ 
+ For use of XPatch independent of Cocoon, you have to run {{{ant init-tasks}}} inside the
Cocoon distribution which will create a number of classes in the {{{anttasks}}} directory
which you can copy anywhere you want, but the {{{classpath}}} attribute has to be adapted
accordingly. - JakobFix
  
  == Xpatch element ==
  {{{<xpatch file="path/to/file.xml"
@@ -92, +94 @@

    add-comments="false"/>
  }}}
  
+ === Namespaces ===
+ 
+ I have the impression that namespaces are not supported.  Consider the following patch file
{{{patch.xdy}}}:
+ {{{
+ <xdy 
+   xmlns:dy="http://www.example.org/dy/1.0"
+   xpath="/dy:publications/dy:publication[@id='${dy.document.id}']"
+   remove="/dy:publications/dy:publication[@id='${dy.document.id}']/dy:edition[@id='${dy.edition.id}']"
+ >
+   <dy:edition id="${dy.edition.id}">
+     <dy:title>${dy.complete.title}</dy:title>
+     <dy:shorttitle>${dy.short.title}</dy:shorttitle>
+     <dy:description>${dy.comment}</dy:description>
+     <dy:language code="${dy.language.code}">${dy.language.name}</dy:language>
+     <dy:pubdate date="${dy.edition.date}">${dy.edition.displaydate}</dy:pubdate>
+   </dy:edition>
+ </xdy>
+ }}}
+ 
+ It is skipped consistently when using namespaces, however when removing the namespace prefixes
and its declaration in the {{{xdy}}} root element, the patch is applied correctly. - JakobFix
+ 

Mime
View raw message