• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

reading the name of the attribute from xml file

 
Christian Nash
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an input xml file and an xsl file. The xsl converts the input xml into an output xml file. My doubt is: I have an element with 2 attributes in the input xml. I want these attributes in the output xml as well. Is it possible to retain these attribute names and values dynamically using the xsl file?
 
Christian Nash
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops Sorry...posted it again..Some system error..Please delete one of these posts. deeply regret the mistake..

(I deleted the other one. By the way I believe you can delete your own posts; you should see a little "Delete Post" icon at the bottom. - PC)
[ September 11, 2007: Message edited by: Paul Clapham ]
 
Paul Clapham
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what you mean by "dynamically" there. Perhaps you could clarify that. To me, "dynamically" means "at run time" as opposed to "statically" which means "at compile time", but there isn't any "compile time" for XSLT.

Anyway, of course you can copy attributes using XSLT. The way to refer to the "name" attribute is "@name".
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic