zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #18695
Re: [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba
My proposal:
1. Add a new method: int store::LoadProperties::toLibXmlOptions()
The implementation of this method should be copied from zorba::simplestore::XmlLoader::applyLoadOptions() (minus the final call to xmlCtxtUseOptions() ), and applyLoadOptions() should of course be refactored to call toLibXmlOptions(). The doc for this function should clearly explain which LoadProperties fields are handled, because some are not passed directly to libxml such as theBaseUri.
2. Change x:canonicalize#2 to accept an <options> element of the form defined in xml-options.xsd, and delete all the current documentation comments about the new xml-canonicalization-options.xsd fields.
3. Delete the newly-added processOptions() function in parse_fragment_impl.cpp.
4. Change FnZorbaCanonicalizeIterator::nextImpl() to call the existing processOptions() that populates a store::LoadProperties object instead, and then call toLibXmlOptions() on it.
5. Matthias also requested the XML_PARSE_NONET flag, which is the only one not currently supported by LoadProperties. Therefore xml-options.xsd should have a new element <no-network-access>; LoadProperties should have a new bool theNoNetworkAccess with corresponding accessor/setter functions; and toLibXmlOptions() should set the bit accordingly.
6. Ideally, FnParseXmlFragmentIterator::nextImpl() should handle all the relevant LoadProperties fields that are not passed on to libxml2 via toLibXmlOptions(), such as theBaseUri. Possibly FnParseXmlFragmentIterator::nextImpl() could be refactored to handle this, since it currently manages all such options. However, in this short term, it would be sufficient to add documentation to x:canonicalize#2 explaining which <options> are not currently supported.
--
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.
References