Class XSDocumentNumbering

java.lang.Object
com.io7m.xstructural.vanilla.internal.XSDocumentNumbering

public final class XSDocumentNumbering extends Object
Functions to reset document numbering in Saxon.
  • Method Details

    • fixDocumentNumber

      public static void fixDocumentNumber(net.sf.saxon.s9api.XsltTransformer transformer)
      When the XSLT processor transforms a document, it uses a document number allocator that will be called when XSLT code calls generate-id(). The document number allocator increments a counter for each document encountered. This means that an XSLT transformer that has transformed multiple documents will give different values for generate-id() than one that has transformed only one document. Because the XSLT transformer that is used before this EPUB package creator will transform multiple documents due to having to compile multiple stylesheets, we need to manually increment the document number allocator for _this_ transformer in order to get the same filename values in the generated EPUB package.
      Parameters:
      transformer - The XSLT transformer