[wpkg-users] Merge XML files, remove comments and validate?

Alan Adams alan at adamshome.org.uk
Thu Feb 9 18:01:13 CET 2012


In message <4F33C3C7.9000703 at wpkg.org>
          Rainer Meier <r.meier at wpkg.org> wrote:

> 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.

And the complaint might not be particularly informative.

Earlier today I missed the / out of a tag, and was informed that the 
packages file didn't have a document header. I guess it was because it 
failed to find the closing tag of the document header, but it was 
rather confusing.

> br,
> Rainer
> -------------------------------------------------------------------------
> wpkg-users mailing list archives >>
> http://lists.wpkg.org/pipermail/wpkg-users/
> _______________________________________________
> wpkg-users mailing list
> wpkg-users at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/wpkg-users


-- 
Alan Adams, from Northamptonshire
alan at adamshome.org.uk
http://www.nckc.org.uk/



More information about the wpkg-users mailing list