[wpkg-users] Merge XML files, remove comments and validate?
Rainer Meier
r.meier at wpkg.org
Thu Feb 9 14:01:59 CET 2012
Hi David,
On 09.02.2012 13:18, David Petterson wrote:
> Maybe you can add a /validateonly flag to the wpkg.js or something? :)
That does not make too much sense given the fact that WPKG itself does never do
a full validation of the XML files during read. In general WPKG requires a
well-formed XML and it will just ignore tags which are not used or invalid.
The proper way to do validation is to use the XSD files with an XML validator.
Basic syntax checks with WPKG can be done using the /dryrun command if you do
not wish WPKG to apply any changes while you're validating.
> I have moved all my individual package/profile xml files to a separate share
> where I create/edit the files. Then I run my merge script before the merged file
> is copied to the live share. It would be great to be able to run the validate
> with wpkg before the files are copied.
You might run xmllint or similar validator after your merging is done. This is
much more accurate than running WPKG with the /dryrun parameter (or execute any
queries) since WPKG only complains if some basic syntax errors occur.
br,
Rainer
More information about the wpkg-users
mailing list