Subject:dynamic element name Author:dave livingston Date:28 Dec 2006 11:34 AM
I've been beating on this for awhile and cannot seem to make any headway. It cannot be as hard as I am making it.
I have an element whose text value is a class name in my input document.
I need to create an element (with some attributes) in the output document that has that class name. It sure seems pretty simple, but I cannot get anything to work.
I thought I could use AVT:
<xsl:element name = "{/root/response/res-body/class}" >
//attribute stuff//
</xsl:element>
When I test the stylesheet I get nothing with this example. If I put in a simple name (foo) then I get the element foo with all of the attributes.
Can someone please give me an idea what to check???
Subject:dynamic element name Author:Minollo I. Date:28 Dec 2006 01:13 PM
If you get nothing I can only imagine that the XPath expression you are specifying for the name of the element is incorrect. If you post the XML document (or a sample of it) on which you are working, we may be able to help more.
Subject:dynamic element name Author:dave livingston Date:28 Dec 2006 02:29 PM
Here is an example source and the stylesheet...
I used the Xpath editor in Stylus Studio and it gave me the same path that I am using..it is almost like Stylus Studio does not support what I am trying to do...