xdoc plugin generates illegal documentation for non-English language.

Problem is not in Maven but in Velocity, more exactly - in $node.copy()
method.
This method uses XMLWriter constructed with default parameters,
which is absolutely unsuitable for non-English languages because it
tries to
encode all non-7-bit characters into XML entities.

The following patch to site.dvsl avoids using $node.copy() and solves
the problem:

bash$ diff -u
maven-1.0-beta-6/plugins/maven-xdoc-plugin-1.1/site.dvsl.orig
maven-1.0-beta-6/plugins/maven-xdoc-plugin-1
.1/site.dvsl
--- maven-1.0-beta-6/plugins/maven-xdoc-plugin-1.1/site.dvsl.orig
Thu Aug 15 05:00:52 2002
+++ maven-1.0-beta-6/plugins/maven-xdoc-plugin-1.1/site.dvsl    Wed Aug
21 12:52:06 2002
@@ -386,7 +386,7 @@
     rowspan="$!rowspan"
   #end
   >
-    $node.copy( $node.children() )
+    #foreach($n in $node.children())$context.applyTemplates($n)#end
   </td>
 #end

@@ -401,7 +401,7 @@
     rowspan="$!rowspan"
   #end
   >
-    $node.copy( $node.children())
+    #foreach($n in $node.children())$context.applyTemplates($n)#end
   </th>
 #end

@@ -488,10 +488,11 @@
 ## D E F A U L T  C O P Y
 ## -----------------------------------------------------

+#match( "text()" )$node.value()#end
+#match( "@*" ) $node.name()="$node.value()"#end
+
 #match("*")
 #if ($node.name() == "source")
 $context.applyTemplates("source");
-#else
-$node.copy()
-#end
+#else<$node.name()$context.applyTemplates("@*")>#foreach($n in
$node.children())$context.applyTemplates($n)#end</$node.
name()>#end
 #end

Best regards,
-- 
Alexei Barantsev, ISP RAS
E-mail: [EMAIL PROTECTED]
ICQ   : 3959207




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to