You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nagender Kumar Mallik <Na...@infogain.com> on 2008/01/28 10:35:29 UTC

can we use an ANT property in the DOCTYPE settings?

Hey everyone,

can we use an ANT property in the Doctype settings?

I basically want to do:
<!DOCTYPE project [
  <!ENTITY service   SYSTEM "modules/${service}">
]>

regards,
Nagender 


AW: can we use an ANT property in the DOCTYPE settings?

Posted by Ja...@rzf.fin-nrw.de.
No you cant.
That section is processed while xml parsing and therefore before Ant can do anything.

But have you had a look at <import>?


Jan 

> -----Ursprüngliche Nachricht-----
> Von: Antti Luoma [mailto:anluoma@gmail.com] 
> Gesendet: Montag, 28. Januar 2008 11:05
> An: Ant Users List
> Betreff: Re: can we use an ANT property in the DOCTYPE settings?
> 
> I don't think it's possible. Maybe you should generate 
> another ant file from
> main build and call the subbuild from there. Maybe generating
> subbuild.xmllike this:
> 
> <filter token="service" value="${service}"/>
>   <copy file="subbuild-src.xml "tofile="subbuild.xml" 
> filtering="true" />
> </filter>
> 
> After copying/filttering you can then call it via
> <ant antfile="subproject/subbuild.xml" target="compile"/>
> 
> subbuild-src.xml should contain something like this:
> 
> <!DOCTYPE project [
>   <!ENTITY service   SYSTEM "modules/@SERVICE@">
> ]>
> 
> Not tested this actually, but I thin :) it should work..
> 
> 
> 
> -- 
> -Antti-
> 
> 
> 2008/1/28, Nagender Kumar Mallik <Na...@infogain.com>:
> >
> > Hey everyone,
> >
> > can we use an ANT property in the Doctype settings?
> >
> > I basically want to do:
> > <!DOCTYPE project [
> >   <!ENTITY service   SYSTEM "modules/${service}">
> > ]>
> >
> > regards,
> > Nagender
> >
> >
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: can we use an ANT property in the DOCTYPE settings?

Posted by Antti Luoma <an...@gmail.com>.
I don't think it's possible. Maybe you should generate another ant file from
main build and call the subbuild from there. Maybe generating
subbuild.xmllike this:

<filter token="service" value="${service}"/>
  <copy file="subbuild-src.xml "tofile="subbuild.xml" filtering="true" />
</filter>

After copying/filttering you can then call it via
<ant antfile="subproject/subbuild.xml" target="compile"/>

subbuild-src.xml should contain something like this:

<!DOCTYPE project [
  <!ENTITY service   SYSTEM "modules/@SERVICE@">
]>

Not tested this actually, but I thin :) it should work..



-- 
-Antti-


2008/1/28, Nagender Kumar Mallik <Na...@infogain.com>:
>
> Hey everyone,
>
> can we use an ANT property in the Doctype settings?
>
> I basically want to do:
> <!DOCTYPE project [
>   <!ENTITY service   SYSTEM "modules/${service}">
> ]>
>
> regards,
> Nagender
>
>