> Alexei,
> 
> I haven't applied the patch yet, but was going to do so soon (in case 
> anyone else hadn't got to it).
> 
> My only question was about the usage of:
> 
> #foreach($n in $node.children())$context.applyTemplates($n)#end
> 
> Does this get text as well as other elements?

Yes, it does, sure.

In any case - avoid use of $node.copy() method.
May be it would be a good idea to contact Velocity team on this issue?

> 
> "Alexei Barantsev" <[EMAIL PROTECTED]> wrote on 30/08/2002 
> 03:41:46 PM:
> 
> > 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




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

Reply via email to