![](https://seccdn.libravatar.org/avatar/a3b33c0c35f3f0a8365b6043072e1cf3.jpg?s=120&d=mm&r=g)
Hi Given: SLES11 SP1 / OpenSuse 11.1 Task: Merge 2 xml files which have a post-script section with xsltproc. So no classes or rules.xml is used Problem: Script sections does not get merged and the CDATA is missing. Note: I am aware of http://www.suse.de/~ug/autoyast_doc/merging.html but i do not how to implement this in my xml files.
From the above link the following is given:
rules.xml ... <dont_merge config:type="list"> <element>partition</element> </dont_merge> ... The reason for the whole stuff is that i would like to merge simple xml files like sw.xml + dns.xml + nis.xml which might have a post-script sections as well. In this way a xml file for a given node is build of dedicated xml files and these xml files can be used also to change an installed system since then might contain required "shell" code. I have read that "XIncludes" can be used as well but it is also not clear to me how they could help. I do not mind to have the final autoinst.xml build during installation by autoyast using many small xml files but so far i have not found an easy way todo so. Example to reproduce the problem: !$ xsltproc --novalid --param with "'script1.xml'" --param replace "'false'" --output script.out /usr/share/autoinstall/xslt/merge.xslt script2.xml With !$ cat script1.xml <?xml version="1.0"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <feedback config:type="boolean">false</feedback> <filename>cfg_post_nisclient</filename> <interpreter>shell</interpreter> <location></location> <network_needed config:type="boolean">false</network_needed> <source><![CDATA[ echo "INFO: Running $(basename $0 )" ]]></source> </script> </post-scripts> </scripts> </profile> !$ cat script2.xml <?xml version="1.0"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <feedback config:type="boolean">false</feedback> <filename>cfg_post</filename> <interpreter>shell</interpreter> <location></location> <network_needed config:type="boolean">false</network_needed> <source><![CDATA[ echo "INFO: $(basename $0 )" ]]></source> </script> </post-scripts> </scripts> </profile> Will result in: !$ cat script.out <?xml version="1.0"?> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <feedback config:type="boolean">false</feedback> <filename>cfg_post_nisclient</filename> <interpreter>shell</interpreter> <location/> <network_needed config:type="boolean">false</network_needed> <source> echo "INFO: Running $(basename $0 )" </source> </script> </post-scripts> </scripts> </profile> Thus the section cfg_post is lost as well as "<![CDATA[" and "]]>" Any help ? Tia Hajo -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org