XSLT as editor?

T

Timothy Murphy

Can I use XSLT to do some simple editing,
eg I want to delete a final "," from some fields.

As will be clear, I am a newbie in this area;
I am using XSLT to convert XML (more precisely MARCXML)
date to HTML.
 
J

Joe Kesselman

Timothy said:
Can I use XSLT to do some simple editing,
eg I want to delete a final "," from some fields.

You can certainly write a stylesheet that will perform that operation,
assuming you can clearly describe to the system which fields you want to
apply that modification to. String manipulation isn't what XSLT does
best, but it does have functions which support this sort of operation.
 
G

git


I worked with XLST converting docs a lot at one point. As a method is kind
of come off the rails fairly quickly. You can do a lot easily, but once
you start doing stuff like character editing, it starts go get messy.
Before you spend too long trying to do this with XLST you need to think
how many 'little alterations' are likely to be needed, or requested,
before the end of the project. If it seems like a lot, you might be
better off parsing the XML and writing out HTML.

I did a post on this approach here:
http://nerds-central.blogspot.com/2007/03/atom-feed-reader-in-javascriptjscript.html
and here:
http://nerds-central.blogspot.com/2007/01/creating-xml-viewer-with-jscript-exsead.html

Cheers

AJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,008
Messages
2,570,268
Members
46,867
Latest member
Lonny Petersen

Latest Threads

Top