| Author |
How to add a new attribute via xsl in an existing xml structure
|
Sumit Aggarwal
Greenhorn
Joined: Jul 31, 2011
Posts: 11
|
|
Problem : I need to add a new variable DateTime(Integer type) in the current hierarchy(of dbPublish.xml) as a event attribute. For example,
Partial Solution:
I have added the code in red in dbPublish.xsl, which will give me DateTime=”20110802124026”
Now, where should I call my event template so as to put my attribute at the desired location.
Please provide your valuable inputs.
|
 |
g tsuji
Ranch Hand
Joined: Jan 18, 2011
Posts: 363
|
|
If you mean the xml document itself does not actually have DateTime attribute on its "event" element, you can do it like this, modifying the attribute template and adding one named template "DateTime" below.
You can thereby take out the template for event, and named template "FormatDate" and "FormatTime".
|
 |
 |
|
|
subject: How to add a new attribute via xsl in an existing xml structure
|
|
|