[XML-SIG] xsl:nclude-and-transform

Nicolas Chauvat Nicolas.Chauvat@logilab.fr
Wed, 18 Jul 2001 13:00:24 +0200 (CEST)


Hi Lists,

Here is what I'd like to do :

company.xml (my own DTD)

=09<company>
           <name>Logilab</name>
           <address>10 rue Louis Vicat</address>
           <web>http://www.logilab.com/</web>
        </company>

document.xml (DocBook DTD)

=09<article>
          <author>
            <surname>Chauvat</surname>
            <affiliation>
              <!-- insert here the result of company.xml
                   transformed with company2docbook.xsl
                   should be
                 =20
                   <orgname>Logilab</orgname>
                   <address>
                     <street>10 rue Louis Vicat</street>
                   </address>
              -->
            </affiliation>
          </author>

         <sect>
           <!-- the rest of my document -->
         </sect>
       </article>
=20
Here are the ideas I had so far :

     * forget about my own DTD and write company.xml using docbook, then
       include an entity. It already works like this, but I need to
       make it more flexible...

     * generate the document in two steps : replace the above comment with
       a specific <include file=3D"company.xml/> tag that gets processed by
       a first XSLT and replaced with the proper docbook elements, then
       feed the result to the docbook generator. The problem is that when
       you generate a document, you have to know which stylesheet to apply
       for the first processing step.

     * generate the document in a single step : modify the above tag to
       specify the stylesheet :=20
         <include file=3D"company.xml" transform=3D"company2docbook.xsl"/>
       and use something like an XSL extension function to replace that
       include tag with the corresponding elements. That would ask for
       docbook XSL customization, but we already do that.

     * use processing instructions : I don't know much about PI. Could
       I use a PI to do the two-step processing described above by
       including a <?PI use-stylesheet=3D'first-step.xsl'?> in the document
       that I feed to the docbook processing step ?

     * ...

As you understood, I'm missing a <xsl:include-after-transform/> tag...

I look forward to your ideas and comments.

--=20
Nicolas Chauvat

http://www.logilab.com - "Mais o=F9 est donc Ornicar ?" - LOGILAB, Paris (F=
rance)