[EMAIL PROTECTED] wrote:
Ok, that comes from a guy who works more on DOM-Nodes than me (=nothing) :-)
Should we add that to Project class? (If we are allowed to do that)
I don't think there's a need to add this to the Ant core. It's not hard
to implement (if one is familiar with the DOM ;-) ), and
> > Ok, that comes from a guy who works more on DOM-Nodes than me (=nothing)
:-)
> >
> > Should we add that to Project class? (If we are allowed to do that)
>
> sure -as long as we also have a test for it :)
Of course - only with test :-)
Ok, I will try that.
Jan
[EMAIL PROTECTED] wrote:
Ok, that comes from a guy who works more on DOM-Nodes than me (=nothing) :-)
Should we add that to Project class? (If we are allowed to do that)
sure -as long as we also have a test for it :)
-
To unsubscri
er node types
}
}
}
Jan
-Original Message-
From: Upayavira [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2003 1:02 PM
To: Ant Developers List
Subject: Re: Property resolution in a task
Christopher Lenz wrote:
It should be much more efficient (and probably simpler) to just
elopers List
> Subject: Re: Property resolution in a task
>
>
> Christopher Lenz wrote:
>
> > It should be much more efficient (and probably simpler) to just
> > traverse the DOM and replace properties in-place:
>
> Splendid! This job gets easier by the moment!
Christopher Lenz wrote:
It should be much more efficient (and probably simpler) to just
traverse the DOM and replace properties in-place:
Splendid! This job gets easier by the moment!
Thanks for that.
Regards, Upayavira
public void replaceProperties(Node n) throws DOMException {
switch (n.ge
It should be much more efficient (and probably simpler) to just traverse the
DOM and replace properties in-place:
public void replaceProperties(Node n) throws DOMException {
switch (n.getNodeType()) {
case Node.ATTR_NODE:
case Node.CDATA_SECTION_NODE:
case Node.TEXT_NODE:
Have a look at org.apache.tools.ant.util.DOMElementWriter.
Sounds that it could help you.
Jan
> -Original Message-
> From: Upayavira [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2003 12:29 PM
> To: Ant Developers List
> Subject: Re: Property resolution in a task
[EMAIL PROTECTED] wrote:
Is there an Ant way to 'spider' a DOM node, replacing
properties as it goes?
I don´t know such a thing. But you can do:
- write the DOM to a String
- use Project.replace() on that String
- parse the String
- replace the DOM with new one
Jan
Yup, that should work!
T
> Is there an Ant way to 'spider' a DOM node, replacing
> properties as it goes?
I don´t know such a thing. But you can do:
- write the DOM to a String
- use Project.replace() on that String
- parse the String
- replace the DOM with new one
Jan
2 AM
To: [EMAIL PROTECTED]
Subject: Property resolution in a task
In Cocoon we have an Ant task for patching our config files.
I'd like to extend this to be able to expand properties found in the
patch files.
How can I, in a Task, expand properties within a String?
For example
name, e.g. ${xxx
*/
Jan
> -Original Message-
> From: Upayavira [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 17, 2003 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: Property resolution in a task
>
>
> In Cocoon we have an Ant task for patching our config
In Cocoon we have an Ant task for patching our config files.
I'd like to extend this to be able to expand properties found in the
patch files.
How can I, in a Task, expand properties within a String?
For example, if I have a string that says "${local.mounttable}", I want
to replace it with the v
13 matches
Mail list logo