ANT Filter Tokens and Validation
Posted: Wed Aug 20, 2014 6:48 pm
Hi,
Can I configure oXygen to understand ANT filter tokens in some way, so that DocBook <xi:include> tags can validate when their hrefs use a filter token to specify a path?
For background, I manage a number of DocBook books with oXygen and each uses common elements, like copyright statements, that are included in each book. I work with authors on different platforms, Linux, Windows, OSX, and it is possible for the location of the common elements to vary with respect to the folder structure of each book. For example, when authoring on Linux, the folder structure might be:
Whereas on Windows, the folder structure might be:
I automate the transformation of DocBook to PDF and HTML output using ANT, and I can filter the XML using tokens, so instead of:
<xi:include href="../common_xml/copyright.xml"/>
I can use:
<xi:include href="@common_xml_dir@/copyright.xml"/>
However, when tokens are used to specify include paths validation within oXygen fails because the ANT tokens are not similarly filtered. Validation is important because it catches problems before the ANT task is invoked by my CI system, and failures because of the tokens are misleading if the document is otherwise valid and builds successfully, and could mask other problems if my co-authors get used to the red validation status indicator.
Is there a way to make this work in oXygen? Is there another approach that might help address the variability in common XML locations and allow oXygen to validate a book?
Can I configure oXygen to understand ANT filter tokens in some way, so that DocBook <xi:include> tags can validate when their hrefs use a filter token to specify a path?
For background, I manage a number of DocBook books with oXygen and each uses common elements, like copyright statements, that are included in each book. I work with authors on different platforms, Linux, Windows, OSX, and it is possible for the location of the common elements to vary with respect to the folder structure of each book. For example, when authoring on Linux, the folder structure might be:
Code: Select all
/docbook/
common_xml/
guide_xml/
Code: Select all
C:\DocBook\
common_xml\
D:\DocBook\
guide_xml\
<xi:include href="../common_xml/copyright.xml"/>
I can use:
<xi:include href="@common_xml_dir@/copyright.xml"/>
However, when tokens are used to specify include paths validation within oXygen fails because the ANT tokens are not similarly filtered. Validation is important because it catches problems before the ANT task is invoked by my CI system, and failures because of the tokens are misleading if the document is otherwise valid and builds successfully, and could mask other problems if my co-authors get used to the red validation status indicator.
Is there a way to make this work in oXygen? Is there another approach that might help address the variability in common XML locations and allow oXygen to validate a book?