On Fri, Sep 17, 2004 at 04:00:08PM -0700, dan tran wrote:
> Ok, here is what i want.  
> 
> I need to change a attribute in a element in doc and then copy that
> doc to another file. Sofar I am able to locate the attribute but dont
> know how to change it.
> 
> Here is my code
> 
> <j:file name="newfile.xml" prettyPrint="true" xmlns="dummy">
>   <u:file var="xmlFile" name="oldfile.xml" />
>   <x:parse var="doc" xml="${xmlFile}"/>
>   <x:set var="version" select="$doc/configuration/configuration-id/@version" />
>   ${version.setValue('2')}
>   <ant:echo>${version}  </ant:echo>
>   <x:copyOf select="$doc" />
> </j:file>
> 
> 
> Dont think my method of alter the attribute working.  
> 
> Any help is greatly appreciated.
> 
> -Dan

You simply changed the value of a variable extracted from
and independent of your document. To change the version value
in your output document, you have to _transform_ the original
document with xsl or jsl.

incze

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to