« Return to Thread: DocBook RNG Schema vs DTD + L10N

Re: DocBook RNG Schema vs DTD + L10N

by Jirka Kosek :: Rate this Message:

Reply to Author | View in Thread

Giuseppe Greco wrote:

> I agree, but I need a mechanism to select the legal notice in the right
> natural language depending on the value of attribute "lang" in start
> element <article>;

You can do this with profiling. Just put the following into your
customization layer:

<xsl:param name="profile.lang" select="/*/@lang"/>

> <article id="CSharpCodingGuidelines" lang="en-US">
>     <articleinfo>
>         <title>C# Coding Guidelines</title>
>         <legalnotice><xi:include href="legalnotice.xml"/></legalnotice>
>         ...
>     </articleinfo>
>     ...
> </article>
>
> In the example above, legalnotice.xml should just select file
> en-US/legalnotice.xml (because of lang="en-US"); if I specify lang="de-DE",
> then legalnotice.xml should select de-DE/legalnotice.xml, and so on.
With profiling your legalnotice.xml should XInclude all language
variants of xx-XX/legalnotice.xml, filtering will be done by profiling. See

        http://sagehill.net/docbookxsl/Profiling.html


--
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@...      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------



signature.asc (258 bytes) Download Attachment

 « Return to Thread: DocBook RNG Schema vs DTD + L10N