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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Reusing assembly modules with unique IDs - using <output> and <transform>?


It looks like including an <output> element in a <module> to specify an XSLT <transform> might be a clean way to transform xml:id values to make them unique. I see that <transform> elements are not handled in the current implementation of DocBook assembly processing.

Am I understanding <output> and <transform> in a way that's consistent with their design?

I'm asking because I'm considering a proposed implementation of <transform>. If there's a better way to make reused module IDs unique, I'd prefer to use that. But maybe implementing transform this way would be generally helpful?

More context:

I am trying to construct a DocBook 5.1 book with a reused module. The content in the module is required in more than one place in the book and I don't want to rely on cross-references to a single copy of the content. That would disrupt the reader's context in this large document.

Reusing a module in the same structure works just fine until the referenced topic content includes an xml:id value. Then the resulting DocBook book is invalid because of duplicate IDs.

I see that Bob Stayton's excellent DocBook XSL: The Complete Guide covers making xml:id values unique in modular content using XInclude. I'm using pure DocBook <assembly> for my books and I don't want to add XIncludes to my processing chain.

Here's an example of the DocBook <assembly> I want to use:

<?xml version="1.0" encoding="UTF-8"?>
<assembly version="5.1">
 <resources xml:id="myResources">
  ...
 </resources>
 <structure renderas="book" xml:id="myGuide">

  <module renderas="chapter" resourceref="myTopLevelSectionIntro">

   <module renderas="section" resourceref="myTopicOne" />

   <module renderas="section" resourceref="myTopicOne">
    <merge><title>A repeated topic</title></merge>
    <!-- The output element transforms the resourceref topic as
      Âdefined by the named transform element. -->
    <output transform="makeModuleIdValuesUnique"/>
   </module>

  </module>
 </structure>
 <transforms>
  <!-- The XSLT in this transform copies all nodes, and also prepends
    Âa unique value to each of the xml:id values it copies. Â-->
  <transform href="">       Âname="makeModuleIdValuesUnique"/>
 </transforms>
</assembly>

Thanks for your help!

Peter


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