ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nir Geier" <Nir.Ge...@unipier.com>
Subject RE: How can i update DTD file?
Date Wed, 29 Jun 2005 16:19:58 GMT
Ty,

Im using regexp and replace,
I wonder is there is something like <xmltask>

Nir.


-----Original Message-----
From: Frank W. Zammetti [mailto:fzlists@omnytex.com]
Sent: Wednesday, June 29, 2005 5:14 PM
To: Ant Users List
Cc: Ant Users List
Subject: Re: How can i update DTD file?


Here's a snippet of code from my AjaxTags project where I modify a DTD
on-the-fly...

<replace file="${src}/META-INF/tlds/struts-html.tld">
  <replacetoken>&lt;/taglib&gt;</replacetoken>
  <replacevalue>&lt;tag&gt;
&lt;name&gt;enableAjax&lt;/name&gt;
&lt;tagclass&gt;org.apache.struts.taglib.html.ajax.tags.EnableAjaxTag&lt;/tagclass&gt;
&lt;bodycontent&gt;empty&lt;/bodycontent&gt;
&lt;/tag&gt;
&lt;/taglib&gt;</replacevalue>
</replace>

The <replace> task allows you to replace sections of a text file.  As long
as you have some text you can key off of, you can use it to do what you
want.  There is also a <replaceregex> that is very similar but that allows
for regular expressions.  That might be of more help to you.  Here's an
example from another script:

<replaceregexp file="${toa_base_dir}/jsp/systemAbout.jsp"
 match="&gt;Version.*EDT&lt;"
 replace="&gt;Version ${project_version}&lt;br&gt;Build
${next_build_number}&lt;br&gt;${build.datetime}&lt;"
 byline="true" />

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Wed, June 29, 2005 11:47 am, Nir Geier said:
> Hi again
>
> I have a DTD list (inside DTD file)
> which i need to update.
> how can i do this?
>
> ex.
> <!ELEMENT app_object_list (
> item1,
> item3,
> item2,
> NEW_ITEM
> )>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


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


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


Mime
View raw message