[oXygen-user] Schematron for Multi-Lingual Schemas?
Oxygen XML Editor Support (Octavian Nadolu)
Fri Aug 21 07:59:21 CDT 2015
Hello Tony,
If you want to have the annotations in different languages for the the
RELAX NG compact syntax you cannot use the shorthand syntax "##":
## Cites a footnote number
You will need to use the "less compact syntax":
[a:documentation [ xml:lang = "en" 'Cites a footnote number'] ]
http://www.relaxng.org/compact-tutorial-20030326.html#id2816874
Best Regards,
Octavian
On 21.08.2015 13:26, Tony Graham wrote:
> On 21/08/2015 08:12, Oxygen XML Editor Support (Octavian Nadolu) wrote:
> > Unfortunately we do not support multiple languages for the Schematron
> > messages. We have an issue on our issue tracker regarding this
> > problem
>
> Schematron itself doesn't make this easy. I kept expecting there'd be
> something that would 'just work', but even Annex G reads like an
> afterthought.
>
> > and I will increase it's priority. The Schematron messages are
> > generated
>
> Thanks.
>
> > at validation and we need to collect only the diagnostics with the
> > xml:lang equal with the one form the application. Now all the
> > messages
>
> That should work okay. Part of why Annex G reads like an afterthought
> is that it manages to repeat the 'A dog should have a bone.' text in an
> 'en' diagnostic. That shouldn't be necessary, IMO.
>
> > are collected, the xml:lang attribute is ignored.
> >
> > If you make multiple single language Schematron files, maybe you can
> > create for each one a validation scenario and depending on the
> > language use the specific validation scenario. But you will need to
> > associate the
>
> That is my current plan. I'm starting with the Schematron since I
> autogenerate most of it, which means I can localise most of it just by
> adding a function to the XSLT.
>
> > scenario manually. Or you can create different projects and save the
> > validation scenario and the association in the project, and when you
> > will change the project you will have the specific validation.
>
> I was trying to not have to do that, but if I did that, it would mean
> that I could localise everything, including the project description.
>
> > Other workaround is to use the "phase" mechanism. You can create a
> > Schematron with multiple phases, a phase for each language. At
> > validation oXygen will present a dialog with the phases and you can
> > select the one you want depending on the language.
>
> I hadn't thought of that, but that could be an interesting alternative.
> However, I'd have to see whether that would play nicely with my current
> use of separate separate phases for FOs, properties, and Antenna House
> extensions.
>
> > I added an issue also for the annotations, to support multiple
> > languages. Here is the same problem we collect all the annotations
> > without looking at the lang attribute.
>
> Thanks. I also autogenerate a lot of the Relax NG as compact syntax. I
> haven't found a way to annotate '##' annotations with xml:lang, but
> xml:lang can be added using the less-compact compact syntax, e.g.:
>
> axf_footnote-number-citation =
> [ a:documentation [ xml:lang = "en"
> 'Cites a footnote number'
> ] ]
> element axf:footnote-number-citation {
> attribute ref-id { text },
> empty
> }
>
> However, I'm more likely to just add translations to the XML syntax
> version after it's been created by 'jing'. But that part of it isn't
> your problem to solve.
>
> Regards,
>
>
> Tony Graham.
More information about the oXygen-user
mailing list