469,964 Members | 1,515 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

xml - need some guidance

I've got an xml doc which I'm using xslt to create a flat text
configuration file. I need to make some dynamic changes in certain
circumstances where some of the elements need to have others
substituted in their place. Other elements may need to be added or
deleted altogether. So far I'm not seeing how this can be done in
xslt...Looking for some sugestions. Right now I'm doing the transform
with XML::XSLT in perl, but could use soemthing else if absolutely
necessary.

btw - i'm a novice at best on this topic, so be kind on the
explanation. :)
-Inet

Apr 25 '06 #1
5 1427
inetquestion wrote:
I've got an xml doc which I'm using xslt to create a flat text
configuration file. I need to make some dynamic changes in certain


Creating flat text files may be easier without XSL.
Have a look at this:

http://home.vrweb.de/~juergen.kahrs/...-tree-drawings
Apr 25 '06 #2
inetquestion wrote:
I've got an xml doc which I'm using xslt to create a flat text
configuration file. I need to make some dynamic changes in certain
circumstances where some of the elements need to have others
substituted in their place. Other elements may need to be added or
deleted altogether. So far I'm not seeing how this can be done in
xslt...Looking for some sugestions.

XSLT does not patch a document "in place"; it always generates a new
document.

XSLT outputs only what you tell it to output. Typically, in this sort of
situation, you start with the standard identity transformation
(described in any good XSLT document) which copies everything unchanged,
then set up templates which match the things you want to alter and
output the altered information (or nothing) instead.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Apr 25 '06 #3

Jürgen Kahrs wrote:
Creating flat text files may be easier without XSL.


Creating flat text files is easy with many tools, but XSLT can
certainly do it. If your input is XML and you don't wish to use any
other sort of XML parser, then XSLT is still a good choice.

Apr 26 '06 #4
Andy Dingley <di*****@codesmiths.com> wrote:
Creating flat text files is easy with many tools, but XSLT can
certainly do it. If your input is XML and you don't wish to use any
other sort of XML parser, then XSLT is still a good choice.


Yes, that's why I wrote "may be". I wanted to draw his
intention to the fact that XSLT is sometimes required
by circumstance, but not always mandatory.
Apr 26 '06 #5
inetquestion wrote:
I've got an xml doc which I'm using xslt to create a flat text
configuration file. I need to make some dynamic changes in certain
circumstances where some of the elements need to have others
substituted in their place. Other elements may need to be added or
deleted altogether. So far I'm not seeing how this can be done in
xslt...Looking for some sugestions. Right now I'm doing the transform
with XML::XSLT in perl, but could use soemthing else if absolutely
necessary.


Can you post an example of the XML and the kind of output you want from
it? XSLT can certainly do the job (modulo Jürgen's comments) but without
seeing what you want it's impossible to give any guidance.

///Peter
--
XML FAQ: http://xml.silmaril.ie/
Apr 26 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by new_GUY | last post: by
reply views Thread by Patrick.O.Ige | last post: by
5 posts views Thread by Realtime | last post: by
reply views Thread by lucky | last post: by
2 posts views Thread by csman24 | last post: by
8 posts views Thread by SanjaiGandhi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.