[wpkg-users] xml Elements and attributes
Rainer Meier
r.meier at wpkg.org
Wed Jul 15 21:45:30 CEST 2009
Hi Charles,
Charles Gargent wrote:
> Hi
>
> In the packages xml file the exit code data is stored in an element,
> can you change it to be stored in an attribute?
> ie
> <remove cmd='msiexec /x {23170F69-40C1-2701-0457-000001000000} /qn
> /norestart' exitcode='any' />
> instead of
> <remove cmd='msiexec /x {23170F69-40C1-2701-0457-000001000000} /qn
> /norestart'><exit code='any' /></remove>
>
> Can you change all the data to be stored in an element rather than
> some attributes some elements?
> ie
> <packages>
> <package>
> <id>7-Zip</id>
> <name>7-Zip 4.57</name>
> <check>
> <type>uninstall</type>
> </check>
> etc...
> </package>
> </packages>
>
> instead of
>
> <packages>
> <package id="7-Zip" name="7-Zip 4.57" revision="1" priority="150"
> reboot="false">
> <check type="uninstall" condition="exists" path="7-Zip 4.57" />
> <install cmd='msiexec /i "%AIP%\7-Zip\7z457\7z457.msi"
> transforms="%AIP-common%\7-Zip\7z457\7z457.mst" /qn /norestart' />
> <remove cmd='msiexec /x {23170F69-40C1-2701-0457-000001000000} /qn
> /norestart'><exit code='any' /></remove>
> </package>
> </packages>
No.
This would totally break compatibility. Some of the current structures are
"legacy" and there since some early 0.9 versions where I started to support the
project and I do not intend to break with existing structures as long as there
is no strong reason for it.
Both ways are completely valid XML definitions. Changing it would require to
change quite a lot of code in wpkg.js as well as all XSD files and all customer
installations. I don't think this will make them happy.
Moreover personally I find it more logical to have the properties/attributes of
the nodes (e.g. check nodes) stored as attributes. But I admit that both ways
have their pros and cons.
Is there somebody who can bring strong reasons why one way or the other should
be preferred?
br,
Rainer
More information about the wpkg-users
mailing list