docbook-apps

  • 1.  Getting a list of XInclude'd files

    Posted 03-20-2015 06:16
    All,

    I'm sure this is a pretty common issue? I need to get a list of all of my
    XIncluded files in a document.

    I need to package up all of the Docbook files required for a particular
    document so I can send them off to the translators. The document is in a
    directory with many more Docbook files that are not part of that particular
    document, so grep'ing would not work well for a list.

    I have tried a few ways but I thought that I would ask on this list to see
    if any of you have a quick and easy way to process a list. I usually use
    XSLTPROC or Saxon as a processor (Windows and Linux).

    Any ideas?

    Regards,
    Dean Nelson


  • 2.  AW: [docbook-apps] Getting a list of XInclude'd files

    Posted 03-20-2015 07:36
    Hi Dean,

    I think you need to instruct your parser not to resolve the xincludes. I use Xalan with Xerces instead of xsltproc as processor. But in your case, isn't it sufficient to switch off your -xinclude option before parsing? Then you could easily trace your <include> elements by any suitable template.

    best regards,
    Ben


    Von: DeanNelson@aol.com [mailto:DeanNelson@aol.com]
    Gesendet: Freitag, 20. März 2015 07:16
    An: docbook-apps@lists.oasis-open.org
    Betreff: [docbook-apps] Getting a list of XInclude'd files

    All,

    I'm sure this is a pretty common issue? I need to get a list of all of my XIncluded files in a document.

    I need to package up all of the Docbook files required for a particular document so I can send them off to the translators. The document is in a directory with many more Docbook files that are not part of that particular document, so grep'ing would not work well for a list.

    I have tried a few ways but I thought that I would ask on this list to see if any of you have a quick and easy way to process a list. I usually use XSLTPROC or Saxon as a processor (Windows and Linux).

    Any ideas?

    Regards,
    Dean Nelson



  • 3.  Aw: Getting a list of XInclude'd files

    Posted 03-20-2015 09:19
    Hi,
    Saxon supports XSL Version 2 as well as base URI fix-up when processing xincude.

    So this template will give you a list of <file> Elements for each included file when applied to the master document:
    <xsl:template match="/">
      <xsl:for-each select="distinct-values(for $e in //* return base-uri($e))">
        <file><xsl:value-of select="."></xsl:value-of></file>
      </xsl:for-each>
    </xsl:template>

    Sincerely, Frank

     
    Gesendet: Freitag, 20. März 2015 um 07:16 Uhr
    Von: DeanNelson@aol.com
    An: docbook-apps@lists.oasis-open.org
    Betreff: [docbook-apps] Getting a list of XInclude'd files

    All,
     
    I'm sure this is a pretty common issue? I need to get a list of all of my XIncluded files in a document.
     
    I need to package up all of the Docbook files required for a particular document so I can send them off to the translators. The document is in a directory with many more Docbook files that are not part of that particular document, so grep'ing would not work well for a list.
     
    I have tried a few ways but I thought that I would ask on this list to see if any of you have a quick and easy way to process a list. I usually use XSLTPROC or Saxon as a processor (Windows and Linux).
     
    Any ideas?
     
    Regards,
    Dean Nelson