File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Resetting the value of an attribute which is already set. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Resetting the value of an attribute which is already set." Watch "Resetting the value of an attribute which is already set." New topic
Author

Resetting the value of an attribute which is already set.

amit sanghai
Ranch Hand

Joined: Dec 05, 2000
Posts: 231
Hi,

I have an attribute set using:
<xsl:attribute name="flag">false</xsl:attribute>

Now, I want to reset the flag variable to true based on some condition. How can I do that?

Thanks and regards,
Amit Sanghai.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18651
    
    8

Do you mean, after you have used an XSL transformation including that line to output an XML document, you want to change that attribute? Well, another XSL transformation could do it. Or you could load it into a DOM and change the attribute there. Or... plenty of other ways.

Or do you mean something else? There's nothing special about using <xsl:attribute> to add an attribute to an element.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resetting the value of an attribute which is already set.