[oXygen-user] Schematron for Multi-Lingual Schemas?
Tony Graham
Fri Aug 21 05:26:08 CDT 2015
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.
--
Senior Architect
XML Division
Antenna House, Inc.
----
Skerries, Ireland
More information about the oXygen-user
mailing list