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
...
<element>partition</element>
...
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>
false
<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>
false
<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/>
false
<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