You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jerome Paul <je...@ephox.com> on 2003/01/06 01:05:27 UTC

Absolute paths in XML documents

Hi,
  I'm doing style conversions of xml documents and I've got an xml document
that references other xml documents.  Eg there's another xml document for
each chapter here's an example below

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" [
<!ENTITY bookinfo SYSTEM "file:bookinfo.xml">
]>
<book>
  <title> blah blah blah</title>
	&bookinfo;
</book>

My problem is that I have to change bookinfo.xml to file:d/xml/bookinfo.xml
so that ant can find the file.  Is there a way to have ant find this file
without using absolute pathnames? I'd like to be able to open up this file
on other computers where an absolute path wouldn't be valid.  

any sugestions?

cheers
Jerome

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Absolute paths in XML documents

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Jerome Paul wrote:
> Is there a way to have ant find this file
> without using absolute pathnames? I'd like to be able to open up this file
> on other computers where an absolute path wouldn't be valid.  
> 

Yes, use an xmlcatalog element in the style task. Refer to the style task 
doco for an example

http://jakarta.apache.org/ant/manual/CoreTasks/style.html
http://jakarta.apache.org/ant/manual/CoreTypes/xmlcatalog.html

Conor


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>