Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   XSLT as editor? (http://www.velocityreviews.com/forums/t484493-xslt-as-editor.html)

Timothy Murphy 03-15-2007 11:52 AM

XSLT as editor?
 
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.

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

Joe Kesselman 03-15-2007 12:02 PM

Re: XSLT as editor?
 
Timothy Murphy wrote:
> 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.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry

git 03-15-2007 03:54 PM

Re: XSLT as editor?
 
On Thu, 15 Mar 2007 11:52:59 +0000, Timothy Murphy wrote:

> MARCXML


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/20...ptjscript.html
and here:
http://nerds-central.blogspot.com/20...pt-exsead.html

Cheers

AJ

--
Nerds-Central: www.nerds-central.com
Rocket power solutions to tricky IT challenges!



All times are GMT. The time now is 12:43 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57