This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to add property to xml log file in ant

 
kamesh aru
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to add ant.XmlLogger.stylesheet.uri property for setting path to xsl style sheet in xml log
thanks in advance
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From ant manual on XmlLogger:


By default the XML file creates a reference to an XSLT file "log.xsl" in the current directory; look in ANT_HOME/etc for one of these. You can set the property ant.XmlLogger.stylesheet.uri to provide a uri to a style sheet. this can be a relative or absolute file path, or an http URL. If you set the property to the empty string, "", no XSLT transform is declared at all.


Not quite sure what your question is. By default it is looking for log.xsl in current directory which doesn't exist unless you put one there. There's one in ANT_HOME/etc as the quote above indicates. If you want to point to one somewhere other than current directory then set the property as any other property, two of the common ways shown here:

-Dant.XmlLogger.stylesheet.uri=/some/path/here/log.xsl

or

<property name="ant.XmlLogger.stylesheet.uri"
value="/some/path/here/log.xsl"/>
 
kamesh aru
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Carol
thats what i was looking for.
thanks once again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic