[opensuse-autoinstall] xsltproc parameters
Hi list, I'm trying to use xsltproc for merging some autoyast snippets in stage 1. Since I'm not familar with xslt so may be someone can answer my question. I would like to replace a tag and its whole content from modified.xml e.g. partitioning by a partitioning tag from a second xml.file. I don't want to merge it - it should be simple replaced. I tried xsltproc with several parameters but it didn't work like I need it. I started with below line and played with replace, dontmerge parameters and changed the with file and the modified.xml. But still not successful. xsltproc --novalid --param with "'snippet.xml'" --param replace "'false'" --param dontmerge "'partitioning'" --output out.xml /usr/share/autoinstall/xslt/merge.xslt modified.xml Has Anyone an idea? Thanks, Jochen Mit freundlichen Grüßen Novell GmbH, Jochen Schaefer Senior Consultant - Novell Services - Mobile: +49 (0)173 5876 969 Fax.: +49 (0)211 - 5631 3769 e-mail: jschaef@novell.com Location: Düsseldorf, Deutschland Novell GmbH, Düsseldorf; GF: Dr. Jürgen Müller, Sylvia Geil, Felix Imendörffer; HRB 21108 (AG Düsseldorf) Ready for enterprise-class consulting www.novell.de/consulting -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
on Tuesday 13 July 2010 Jochen Schaefer wrote:
I would like to replace a tag and its whole content from modified.xml e.g. partitioning by a partitioning tag from a second xml.file. I don't want to merge it - it should be simple replaced.
I tried xsltproc with several parameters but it didn't work like I need it.
I started with below line and played with replace, dontmerge parameters and changed the with file and the modified.xml. But still not successful. xsltproc --novalid --param with "'snippet.xml'" --param replace "'false'" --param dontmerge "'partitioning'" --output out.xml /usr/share/autoinstall/xslt/merge.xslt modified.xml
I don't think merge.xslt can handle that. You'd have to write your own xslt file but because you say you don't know anything about xslt, you should split it into 3 xml files. 2 times partitioning and one all_the_rest.xml Then merge the correct partitioning into the all_the_rest.xml with merge.xslt -- ciao, Uwe Gansert Uwe Gansert SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug listening to: "New World Order" by The Retrosic -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Tue, Jul 13, 2010 at 8:25 AM, Uwe Gansert <ug@suse.de> wrote:
I don't think merge.xslt can handle that. You'd have to write your own xslt file but because you say you don't know anything about xslt, you should split it into 3 xml files. 2 times partitioning and one all_the_rest.xml Then merge the correct partitioning into the all_the_rest.xml with merge.xslt
That's exactly how I do it here. The customer didn't want/trust/understand rules and classes, plus they wanted to implement their own selection dialogs. So, I have a "stub.xml" with the basic tags (i.e. empty) and depending on the user selections on the user interface, some pre-defined bits and pieces are merged with xsltproc (partitioning, packages, networking, etc). Not the most elegant solution, but works :) -- -- Erico -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (3)
-
Erico Mendonça
-
Jochen Schaefer
-
Uwe Gansert