The fact that nested tags in assert messages aren't copied is a known bug in
the SchematronValidator. It uses jxptr.getValue() of the assert( or rule)
element which in turn returns the text() value of the XML element.
A text() value of an XML element does not include it's subelements.
Dmitri had a suggestion for fixing it.
Dmitri, can you please post your solution again since I lost it.

Interested to look into it?


Another option would be to write a trivial XSLT which acts against the
XMLForm namespace and replaces all <xf:violation> tags with <i18n:text>

<xslt:template match="xf:violation">
  <i18n:text>
    <value-of select=".">
  </i18n:text>
</xf:violation>


then you can include this stylesheet in the pipeline. It acts independent
from the form document.



Ivelin




----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 8:50 AM
Subject: Antwort: Re: Antwort: RE: XML Forms and i18n


Hello,

   Yes, I tried this, but I donīt think that the i18n tags are copied with
the error message, as
   the translation is not working.
   I have the internationalisation running with the XML-form example.
   There it is quite easy , as you only have to alter the wizard2html.xml.
   In there you are doing something like
      if<xf:violation>
                      value-of select ="."

   I only wrap this with
      <i18n:text>value-of select="."</i18n:text>

   and run the i18n Transformer. This works fine.
   The problem is, that in the xml I have I would have to write a new
stylesheet for
   every xml file again to find the xf:violation tags as each xml file
differs a lot
   from another.
   To avoid this I tried to find an other solution.
   I of course agree that adding the i18n tag  in the FormTransormer is not
the
   best solution, but in my case it would not matter, because every error
message
   has to get translated.
   What I am trying now is to translate the error message in my
RegistrationAction, where
   I also do my customized validation.
   For this I am trying to use the functionality of the i18nTransormer and
the ResourceBundleFactory
   to find and to translate the messages.
   This of course will mean, that I canīt use Schematron validation anymore
and also it is not
   running yet:)
   So, maybe you have a hint how I could wrap the message in the
FormTransformer, if this would
   then be easier.


   Thanx again for any help,

   miHam


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to