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: RE: [docbook-apps] Handling individual document attributes whenpublishing with Ant

Hi Peter,
You could have a build.xml for each top-level/buildable source file that:

1. Declares properties like current.docid etc.
2. Imports your main build.xml that contains your build logic <import file="path/to/main-build.xml"/>

Optionally, you could store the key/value pairs in a properties file and pull them into the doc's build.xml via <propertyfile file="build.properties"/>. That can be convenient if you have a group of properties that are common to a set of docs. Just put them in a properties file and have the build files for all those docs pull it in.  

When you pass the properties in to the xslts using the <xslt/> task, you can use the "if" attribute on nested params so that the params are only set if the property is declared. That way, your xslts will still use their defaults if the property happened not to have been set in the build.xml.


> -----Original Message-----
> From: Peter Desjardins [mailto:peter.desjardins.us@gmail.com]
> Sent: Tuesday, November 09, 2010 1:41 PM
> To: DocBook Apps
> Subject: [docbook-apps] Handling individual document attributes when
> publishing with Ant
> Hi, I'm getting started with Apache Ant and DocBook publishing. I have
> figured out how to use Ant to transform DocBook files with the
> stylesheets. Now I'm trying to find an efficient, maintainable, and
> scalable way to handle the sets of attributes that are unique to
> documents.
> I am dealing with about 40 documents and each one has a set of values
> that I need to pass in when they are published. For example, each
> document has a docid for olinking, a document title that appears in
> Eclipse output, an output filename, and similar details that I need to
> control while publishing.
> In the past, I've stored all these details in a crude database that I
> read with my publishing shell scripts. I'm moving to Ant in an effort
> to make the publishing process more easily understandable and
> maintainable. Can you point me to a good way to handle these document
> attributes when DocBook publishing with Ant? I didn't see the way this
> is handled in the DocBook/Ant examples I've found on the web.
> Thanks for your help.
> Peter
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

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