• 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

Editing XML with XSL ?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am pretty new to XML.
Currently I have a XML which I am transforming to HTML (for display purpose - table format) using XSL.
Now what I want. is to allow to change some entries (e.g. comment section) in that table when displayed as HTML and save it to original XML file.
The both files (XML and XSL) are present on same machine and accessed locally.

Can I achieve this with XSL ? or XSL is strictly for displaying the XML data ?
If not only with XSL, what can I use for local (client side) updation ? (I have read this can be achived through ASP etc., but I don't want server code).

Please also provide link to tutorials, if available.
 
Marshal
Posts: 28193
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
So you have an XSLT which transforms an XML document to HTML.

And now you want to change it so it also modifies the original document?

Okay. You can't do that with XSLT 1.0, as it can only output to one target. (Although there are proprietary extensions from various XSLT 1.0 implementations which allow you to output to more than one target.) If you want to use XSLT 2.0 -- which isn't bundled into the standard Java API -- then you can write an XSLT 2.0 transform which outputs to as many targets as you like. Note however that outputting to the same document you're inputting from can't be done. (That's just a basic principle of computers, not specific to XSLT.) You could of course output the modified original document to a new document, and wrap the whole thing in a script or program which deleted the original and renamed the new.
 
reply
    Bookmark Topic Watch Topic
  • New Topic