Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/canonicalize-core-fixed-2013-03-06T08-06-58.258Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job canonicalize-core-fixed-2013-03-06T08-06-58.258Z is
  finished.  The final status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/canonicalize-core-fixed-2013-03-06T09-07-56.413Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread Zorba Build Bot
Validation queue job canonicalize-core-fixed-2013-03-06T09-07-56.413Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-06 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-05 Thread Chris Hillery
Review: Needs Fixing

I just realized that the set of options for canonicalization (as proposed by 
Matthias) are overlapping with the options that already exist for XML parsing. 
But the current implementation adds an entirely new set of options. This looks 
pretty silly, and is a waste of code.

The options Matthias requested are strictly for parsing the input XML, and as 
such, x:canonicalize#2 should accept precisely the same options element as 
x:parse#2. I mean, they're two functions in the same module which do the same 
thing (parse XML); they should take the same options.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-05 Thread Chris Hillery
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.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Matthias Brantner
Review: Approve

I approve conditionally. There are still some things that require fixing:

1. The following from the diff doesn't make sense.
547 +zstring lNodeName = child-getNodeName()-getLocalName();
548 +std::transform(
549 +  lNodeName.begin(), lNodeName.end(),
550 +  lNodeName.begin(), tolower);
551 +

If the options are validated using a schema, there is no need to transform them 
to
lower case because the schema is case-sensitive. Also, the code should
validate the namespace of the node, not only the local name.

2. Why is x:canonicalize#1 not implemented on x:canonicalize#2 by specifying
the default options in XQuery.

3. x:canonicalize-options-impl needs documentation and should be named
x:canonicalize-impl instead. I think (but I'm not sure) that it doesn't go 
through
the RQ if the private function doesn't have sufficient parameter documentation.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Sorin Marian Nasoi
 I approve conditionally. There are still some things that require fixing:
 
 1. If the options are validated using a schema, there is no need to transform
 them to
 lower case because the schema is case-sensitive. Also, the code should
 validate the namespace of the node, not only the local name.
Fixed.


 2. Why is x:canonicalize#1 not implemented on x:canonicalize#2 by specifying
 the default options in XQuery.
XML_PARSE_NOERROR is the only option set by default but this is mandatory for 
the error handling.
The XQDoc documentation was updated to state this fact.
 
 3. x:canonicalize-options-impl needs documentation and should be named
 x:canonicalize-impl instead. I think (but I'm not sure) that it doesn't go
 through
 the RQ if the private function doesn't have sufficient parameter
 documentation.
Done the renaming. The RQ runs the moduleDocumentation test that checks the 
XQDoc comments for all public functions *only*.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/canonicalize-core-fixed-2013-03-05T04-20-03.545Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job canonicalize-core-fixed-2013-03-05T04-20-03.545Z is
  finished.  The final status was:

  

  No tests were run - build or configure step must have failed.

  Not commiting changes.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/canonicalize-core-fixed-2013-03-05T05-03-08.926Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Sorin Marian Nasoi
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Sorin Marian Nasoi
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/canonicalize-core-fixed-2013-03-05T06-14-06.536Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job canonicalize-core-fixed-2013-03-05T06-14-06.536Z is
  finished.  The final status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-04 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/canonicalize-core-fixed into 
lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-03-01 Thread Juan Zacarias
Hi the changes for the private function are already there, when you said 
something else was missing I thought you meant 

The example doesn't mention that the options are in a namespace? According to 
the schema they should be. According to the implementation, the namespace 
isn't considered.

Since I am not sure If you meant to add the namespace on the examples, change 
which is already in, or if you meant another thing.


-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-02-27 Thread Juan Zacarias
 - Which options are enabled by default?
The only option available as default is XML_PARSE_NOERROR this way zorba can 
manage the error messages and no extra message are shown, but this option is 
not optional.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-02-27 Thread Chris Hillery
 - There should be a private canonicalize function that does the schema
 validation if the input is not validated similarly to most other modules.

Matthias: could you give an example from other modules of what you're referring 
to here?
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-02-27 Thread Matthias Brantner
 - There should be a private canonicalize function that does the schema
 validation if the input is not validated similarly to most other modules.
 
 Matthias: could you give an example from other modules of what you're 
 referring to here?
zorba_modules/html/src/html.xq:119



 -- 
 https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
 You are reviewing the proposed merge of 
 lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba.


-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-02-20 Thread Chris Hillery
Juan has added the canonicalize#2 function as suggested.

I have pushed a couple additional comment additions, plus a preventative fix 
that ensures this change to the XML module won't interfere with runtime 
generation.

Matthias, please re-review.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-02-20 Thread Matthias Brantner
Review: Needs Fixing

- Why is the following change necessary?

-  -q import module namespace file = 'http://expath.org/ns/file'; 
file:exists( 'a non existant file' )
+  -q import module namespace file = 'http://expath.org/ns/file'; import 
module namespace x = 'http://www.zorba-xquery.com/modules/xml'; file:exists( 'a 
non existant file' )

- s/ Canonical XMl/ Canonical XML/

- Which options are enabled by default?

- The example doesn't mention that the options are in a namespace? According to 
the schema they should be. According to the implementation, the namespace isn't 
considered.

- There should be a private canonicalize function that does the schema 
validation if the input is not validated similarly to most other modules.

-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-02-20 Thread Chris Hillery
Regarding the GenZorbaRuntime.cmake change: I noticed when I merged this change 
locally *into an already-working build* that the build started failing. Turns 
out to be because GenZorbaRuntime implicitly depends on the XML module, and 
once the new xml.xq file was installed in URI_PATH, you couldn't import the XML 
module because it couldn't find the implementation of the new canonicalize#1 
function (because it hadn't actually been compiled yet). Classic chicken-egg 
problem.

GenZorbaRuntime.cmake has always had a solution to the chicken-egg problem: It 
checks to make sure Zorba works before attempting to re-generate the runtime 
files, and if Zorba doesn't work, it copies the pre-generated files instead. 
My change just extends the doesn't work check to verify that the XML module 
is working too.

FYI the ZorbaRuntimeGenerator.cmake change is similar. There I discovered that 
there was a race condition if you launched the build in parallel, because the 
target which copied the new version of xml.xq to the URI_PATH wasn't guaranteed 
to run before the runtime generation. In some cases, the copy occurred between 
the times GenZorbaRuntime.cmake performed the Zorba doesn't work check and 
when it actually invoked Zorba, so the runtime generation still failed. I added 
a dependency to ensure that all URI_PATH copies happen before runtime 
generation is attempted.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-01-30 Thread Matthias Brantner
Review: Needs Fixing

There should be a canonicalize#2 function that allows to specify options.
This should at least allow for the following libxml2 options.

   XML_PARSE_NOENT = 2 : substitute entities
   XML_PARSE_NOBLANKS = 256 : remove blank nodes
   XML_PARSE_NONET = 2048 : Forbid network access
   XML_PARSE_NSCLEAN = 8192 : remove redundant namespaces declarations
   XML_PARSE_NOCDATA = 16384 : merge CDATA as text nodes

The comment could be improved. For example, the node about streamability
should not be at the beginning.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-01-08 Thread Juan Zacarias
Juan Zacarias has proposed merging 
lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba.

Commit message:
Added canonicalize function to the core xml module

Requested reviews:
  Luis Rodriguez Gonzalez (kuraru)
  Matthias Brantner (matthias-brantner)
Related bugs:
  Bug #1076919 in Zorba: Need function to canonicalize XML
  https://bugs.launchpad.net/zorba/+bug/1076919

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394

Added canonicalize function to the core xml module
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2013-01-08 09:03:49 +
+++ ChangeLog	2013-01-08 20:13:28 +
@@ -13,6 +13,7 @@
 	natural language text.
   * Extended cast and castable expression to allow any simple target type
 (as specified by XQuery 3.0)
+  * Added canonicalize function to modules/xml.
 
 Optimizations:
   * Various optimizations in the implementation of the optimizer rules.

=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h	2013-01-08 08:34:08 +
+++ include/zorba/pregenerated/diagnostic_list.h	2013-01-08 20:13:28 +
@@ -298,6 +298,8 @@
 
 extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1190;
 
+extern ZORBA_DLL_PUBLIC XQueryErrorCode FOCZ0001;
+
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0001;
 
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0002;

=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq'
--- modules/com/zorba-xquery/www/modules/xml.xq	2012-09-19 21:16:15 +
+++ modules/com/zorba-xquery/www/modules/xml.xq	2013-01-08 20:13:28 +
@@ -30,9 +30,9 @@
  : them in a streaming fashion - each at a time:/p
  :
  : pre class=brush: xquery;
- : import module namespace parse-xml = http://www.zorba-xquery.com/modules/xml;;
+ : import module namespace x = http://www.zorba-xquery.com/modules/xml;;
  : import schema namespace opt = http://www.zorba-xquery.com/modules/xml-options;;
- : parse-xml:parse( 
+ : x:parse( 
  :   lt;from1Janilt;/from1lt;from2Janilt;/from2lt;from3Janilt;/from3,
  :   lt;opt:options
  : lt;opt:parse-external-parsed-entity/
@@ -44,9 +44,9 @@
  : before returning a sequence of nodes as shown in the following example:/p
  :
  : pre class=brush: xquery;
- : import module namespace parse-xml = http://www.zorba-xquery.com/modules/xml;;
+ : import module namespace x = http://www.zorba-xquery.com/modules/xml;;
  : import schema namespace opt = http://www.zorba-xquery.com/modules/xml-options;;
- : parse-xml:parse(
+ : x:parse(
  :   lt;root
  : lt;from1Jani1lt;/from1
  : lt;from2Jani2lt;/from2
@@ -68,7 +68,7 @@
  : @project data processing/data converters
  :
  :)
-module namespace parse-xml = http://www.zorba-xquery.com/modules/xml;;
+module namespace x = http://www.zorba-xquery.com/modules/xml;;
 
 import schema namespace parse-xml-options = http://www.zorba-xquery.com/modules/xml-options;;
 
@@ -193,9 +193,9 @@
  : An example that sets the base-uri of the parsed external entities:
  : /p
  : pre class=brush: xquery;
- :   import module namespace parse-xml = http://www.zorba-xquery.com/modules/xml;;
+ :   import module namespace x = http://www.zorba-xquery.com/modules/xml;;
  :   import schema namespace opt = http://www.zorba-xquery.com/modules/xml-options;;
- :   parse-xml:parse(lt;from1Janilt;/from1lt;from2Janilt;/from2lt;from3Janilt;/from3,
+ :   x:parse(lt;from1Janilt;/from1lt;from2Janilt;/from2lt;from3Janilt;/from3,
  : lt;opt:options
  :   lt;opt:base-uri opt:value=urn:test/
  :   lt;opt:parse-external-parsed-entity/
@@ -228,7 +228,7 @@
  : @example test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-07.xq
  :
  :)
-declare function parse-xml:parse(
+declare function x:parse(
   $xml-string as xs:string?,
   $options as element(parse-xml-options:options)?) as node()* external;
   
@@ -236,7 +236,7 @@
 (:~
  : br/p
  : Note: this function is included for backwards compatibility purposes. It 
- : is recommended that you use the parse-xml:parse() function instead.
+ : is recommended that you use the x:parse() function instead.
  : /pbr/
  :
  : A function to parse XML files and fragments (i.e. 
@@ -330,7 +330,7 @@
  : @deprecated
  :
  :)
-declare function parse-xml:parse-xml-fragment(
+declare function x:parse-xml-fragment(
   $xml-string as xs:string?,
   $options as xs:string) as node()* 
 {
@@ -352,14 +352,14 @@
 then parse-xml-options:no-error/ else ()  
 }/parse-xml-options:options
   return
-parse-xml:parse($xml-string, $new_options)
+x:parse($xml-string, $new_options)
 };
 
 
 (:~
  : br/p
  : Note: this function is included for backwards compatibility purposes. It 
- : is recommended that you use the parse-xml:parse() function instead.
+ : is recommended that you use the x:parse() function instead.
  : /pbr/
  :
  : A function to parse 

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-01-08 Thread Juan Zacarias
Sorry I had to remove the previous branch proposed for merge because of to much 
of a mess between merges that it seemed some data was lost.

This branch contains all the changes Matthias previously mentioned

including the two last

Fixed the lost of changes made because of wrong merge with trunk
Added more comments to the function, not sure what else to add if the function 
needs more description.
-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/canonicalize-core-fixed into lp:zorba

2013-01-08 Thread Luis Rodriguez Gonzalez
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/canonicalize-core-fixed/+merge/142394
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp