By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,635 Members | 2,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,635 IT Pros & Developers. It's quick & easy.

xml - need some guidance

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a

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

P: n/a
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

P: n/a
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.