OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] DocBook RNG Schema vs DTD + L10N


Hi Giuseppe,

> ... In my previous email I forgot to mention that entity &legalnotice; was
> localized, meaning that the right "legalnotice.xml" file was included
> depending on the language specified in attribute "lang" of element
> "article";
> 
> <article id="CSharpCodingGuidelines" lang="&language;">
>     ...
> </article>
> 
> The language to select was also an entity...
> 
> Anyway, to handle the different languages, my customized DocBook DTD
> included the following:
> 
> <!ENTITY % German "IGNORE">
> <![%German; [
>   <!ENTITY % l10n.user PUBLIC "-//AGAMURA//ENTITIES QuXo Locale V1.0//de-DE"
>     "http://www.agamura.com/quxo/dtd/1.0/ent/de-DE/locale.ent";>
>   %l10n.user;
>   <!ENTITY % l10n.default "IGNORE">
> ]]>
> 
> <!ENTITY % English "IGNORE">
> <![%English; [
>   <!ENTITY % l10n.user PUBLIC "-//AGAMURA//ENTITIES QuXo Locale V1.0//en-US"
>     "http://www.agamura.com/quxo/dtd/1.0/ent/en-US/locale.ent";>
>   %l10n.user;
>   <!ENTITY % l10n.default "IGNORE">
> ]]>
> 
> <!ENTITY % French "IGNORE">
> <![%French; [
>   <!ENTITY % l10n.user PUBLIC "-//AGAMURA//ENTITIES QuXo Locale V1.0//fr-FR"
>     "http://www.agamura.com/quxo/dtd/1.0/ent/fr-FR/locale.ent";>
>   %l10n.user;
>   <!ENTITY % l10n.default "IGNORE">
> ]]>
> 
> <!-- Default: English -->
> <!ENTITY % l10n.default "INCLUDE">
> <![%l10n.default; [
>   <!ENTITY % l10n.user PUBLIC "-//AGAMURA//ENTITIES QuXo Locale V1.0//en-US"
>     "http://www.agamura.com/quxo/dtd/1.0/ent/en-US/locale.ent";>
>   %l10n.user;
> ]]>
> 
> Is there a way to implement something similar with a customized DocBook
> RNG schema?

I don't think there is any possibility in RELAX NG directly. However, you can 
move your above definitions into a separate file (for example "mylocale.ent")
and refer to it into the internal subset of the DTD like this:

<!DOCTYPE article 
[
  <!ENTITY % Italian "INCLUDE">
  <!ENTITY % mylocale SYSTEM "mylocale.ent">
  %mylocale;
]>
<article ... xml:lang="&language;"> 
  ...
</article>

I couldn't test it so there might be other issues.

Best wishes,
Tom



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]