Hi!
I used to write about this problem about two weeks before but nobody
pays any attention.
See below the text of my previous message with problem description and
patch that solves it:

---------------------
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

> -----Original Message-----
> From: Youngho Cho [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, August 30, 2002 6:14 AM
> To: Turbine Maven Users List
> Subject: xdoc transform question
> 
> 
> Hello 
> 
> I am tring to genearate html doc from xdoc of my project.
> ( I am using maven 1.0 beta 6 )
> 
> The Problem is that 
> when I use xdoc as a following which is include some Korean Text
> 
> <body>
> <section name="��">
>   <p>
>     ��  
>   </p>
> </section>
> </body>
> 
> and the generated html doc was
> 
>   <h3><a name="��">��</a></h3>
>    <p>
>     &#176;&#161; 
>   </p>
> 
> And when I saw the result html doc using browser , 
> the name is transform exactly but
> the paragraph does,'t transfrom exactly. 
> It looks like there is an character encoding problem.
> 
> I tested the same thing using DVSL directly and there was no problem 
> but when I transfom using maven , this problem occured.
> 
> Am I some misconfiguration of maven ?
> 
> Thanks.
> 
> youngho




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

Reply via email to