Re: [basex-talk] Strange behavior while adding existing elements into new element.

2017-06-21 Thread Jan Dölle
Hi Christian, update {} as "quick copy" work. Beside I checked the $sequence-of-elements for the special situation and it only contains elements from a document created by parse-xml. But the function which creates the sequence compares document elements against some database elements and

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Dharmendra Singh
Thanks for you guidance Christian it worked for me as you suggested. RegardsDharmendra Kumar Singh On Wednesday, 21 June 2017 5:30 PM, Christian Grün wrote: >  right now i am trying to set the path of the saxon9ee.jar > environment variable/path Saxon needs

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Christian Grün
> right now i am trying to set the path of the saxon9ee.jar > environment variable/path Saxon needs to be specified in the Java classpath. How do you start BaseX? On Wed, Jun 21, 2017 at 1:25 PM, Dharmendra Singh wrote: > Hi Christian, > > As i have checked by running

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Dharmendra Singh
Hi Christian, As i have checked by running function xslt:processor() it is using java now , so how can i use the saxon9ee.jar  for the XSLT 2.0 can you describe the process. right now i am trying to set the path of the saxon9ee.jar environment variable/path

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Dharmendra Singh
As per documentation By default, this module uses Java’s XSLT 1.0, so if use 2.0 we need to add saxon9he.jar in the classpath RegardsDharmendra Kumar singh On Wednesday, 21 June 2017 3:43 PM, Christian Grün wrote: > so can you please tell me what should i

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Christian Grün
> so can you please tell me what should i do. Sure: Read the documentation and find out why xslt:version() returns 1.0. ;) On Wed, Jun 21, 2017 at 12:09 PM, Dharmendra Singh wrote: > xslt:version() returning 1.0 and my XSLT expression for the 2.0 like > > > as per xslt

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Dharmendra Singh
 xslt:version() returning 1.0 and my XSLT expression for the 2.0 like    as per xslt 2.0 expression  is right so can you please tell me what should i do. RegardsDharmendra kumar singh On Wednesday, 21 June 2017 3:20 PM, Christian Grün wrote: So Saxon is

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Christian Grün
So Saxon is included in your classpath, and xslt:version() returns 2.0? In that case, you’ll obviously need to check your XSLT expression. On Wed, Jun 21, 2017 at 11:45 AM, Dharmendra Singh wrote: > Yes the example which has been given for the 2.0 running perfect but when

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Dharmendra Singh
Yes the example which has been given for the 2.0 running perfect but when i am adding the line "if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput' in my example it is giving error: [bxerr:BXSL0001] ERROR:  'Syntax error in 'if($editmode eq $EDIT-FULL) then 'textarea' else 'ouput''.'FATAL

Re: [basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Christian Grün
Did you check out the documentation (http://docs.basex.org/wiki/XSLT_Module)? On Wed, Jun 21, 2017 at 11:19 AM, Dharmendra Singh wrote: > Hi all i am trying to run XSLT 2.0 but it is giving the error when i run > xslt 1.0 it fine but i am not able to run XSLT 2.0, is

[basex-talk] How to run XSLT 2.0 in BaseX

2017-06-21 Thread Dharmendra Singh
Hi all i am trying to run XSLT 2.0 but it is giving the error when i run xslt 1.0 it fine but i am not able to run XSLT 2.0, is there any way to run XSLT 2.0, below is my code. let $xslt :=    http://www.w3.org/1999/XSL/Transform; xmlns:xs="http://www.w3.org/2001/XMLSchema;

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Dharmendra Singh
Thanks Marc and Christian, As said Christian i have done as well validate:rng(doc('/onix/jats/EL.2015.2835.xml'),'/relaxng/publishers-51cr.rnc',true()) and i am getting the same error : [bxerr:BXVA0001] Validation failed:

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Christian Grün
> How have you loaded the 'publishers-51cr.rnc' schema into database because i > am loading the schama using function db:store so it is being loaded as > binary then i am retrieving using function db:retrive so i it can be > problem in loading the schema. Yes, that’s fine. Have you tried to

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Dharmendra Singh
HI Christian, How have you loaded the 'publishers-51cr.rnc' schema into database because i am loading the schama using function  db:store so it is being loaded as binary then i am retrieving using function db:retrive so i it can be  problem in loading  the schema. On Wednesday, 21 June

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Christian Grün
As Marc said, the third argument needs to be set to true. I created a new 'onix' database with a single XML document and the passed on RelaxNG file, and the validatio could be successfully started (it stopped with the error message '[bxerr:BXVA0001] Validation failed', because my XML document did

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Dharmendra Singh
Hi Marc, I have done as you said to use true() as third param but still i am getting the same error, below is my code. let $binary := db:retrieve('onix','/relaxng/publishers-51cr.rnc')let $schema := bin:decode-string($binary)let $input := db:open('onix')returnvalidate:rng($input,$schema,true())

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Marc van Grootel
No problem. Just use the validate:rng#3. Provide true() as the third param and it should happily process compact syntax for you. Getting includes to work is a different matter though so your schema should probably be standalone. Otherwise, maybe, store the schemas on the filesystem. Cheers,

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Imsieke, Gerrit, le-tex
jing/trang is a Java tool for converting Relax NG schemas and for validating with these schemas. If you are using oXygen XML, it is integrated with the product and you can use it to convert rnc to rng. It is maintained on Github (https://github.com/relaxng/jing-trang/releases), although I

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Dharmendra Singh
Hi Gerrit, Thanks for your response can you please explain what is trang is this a function or something else, can you please provide me the example or sample to convert  rnc file to rng using trang RegardsDharmendra Kumar Singh On Wednesday, 21 June 2017 1:06 PM, "Imsieke, Gerrit, le-tex"

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Christian Grün
Dear Singh, Could you please pass us on your schema file? Thanks in advance, Christian On Wed, Jun 21, 2017 at 8:20 AM, Dharmendra Singh wrote: > Hi all, > > I have loaded the RNG schema using function db:store and also loaded the XML > in the DB which has to be

Re: [basex-talk] Validate XML against RNG schema

2017-06-21 Thread Imsieke, Gerrit, le-tex
Hi Dharmendra, The function validate:rng() seems to only accept a Relax NG *XML syntax* document as its 2nd argument. You can convert the rnc file to rng using trang and store it in the DB as a regular XML file. Gerrit On 6/21/17 8:20 AM, Dharmendra Singh wrote: Hi all, I have loaded the

[basex-talk] Validate XML against RNG schema

2017-06-21 Thread Dharmendra Singh
Hi all,  I have loaded the RNG schema using function db:store and also loaded the XML in the DB which has to be validated, but i am getting the error, below is my code:  let $binary := db:retrieve('onix','/relaxng/publishers-51cr.rnc')  let $schema := bin:decode-string($binary)  return   let