Validate XML against RNG schema

Wednesday, 21 June 2017 · 12 messages
DS
Dharmendra Singh21 Jun 2017 08:20 #
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 $input := db:open('onix')
return validate:rng($input, $schema) when i run this code i get the error invalid XML charcter(20) so what i am doing wrong here.
IL
Imsieke, Gerrit, le-tex21 Jun 2017 09:36 #
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
Quoted text · Dharmendra Singh · 17 lines
On 6/21/17 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 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 $input := db:open('onix') > return validate:rng($input, $schema) > > when i run this code i get the error invalid XML charcter(20) > > so what i am doing wrong here.
-- Gerrit Imsieke Geschäftsführer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke at le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt, Dr. Reinhard Vöckler
CG
Christian Grünin reply to Dharmendra Singh, 21 Jun 2017, 08:2021 Jun 2017 09:46 #
Dear Singh, Could you please pass us on your schema file? Thanks in advance, Christian
Quoted text · Dharmendra Singh · 17 lines
On Wed, Jun 21, 2017 at 8:20 AM, Dharmendra Singh <dharam.mahi at gmail.com> 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 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 $input := db:open('onix') > return validate:rng($input, $schema) > > when i run this code i get the error invalid XML charcter(20) > > so what i am doing wrong here.
DS
Dharmendra Singhin reply to Imsieke, Gerrit, le-tex, 21 Jun 2017, 09:3621 Jun 2017 09:50 #
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
Quoted text · le-tex · 1 line
On Wednesday, 21 June 2017 1:06 PM, "Imsieke, Gerrit, le-tex" <gerrit.imsieke at le-tex.de> wrote:
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
Quoted text · Dharmendra Singh · 17 lines
On 6/21/17 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 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 $input := db:open('onix') > return validate:rng($input, $schema) > > when i run this code i get the error invalid XML charcter(20) > > so what i am doing wrong here.
-- Gerrit Imsieke Geschäftsführer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke at le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt, Dr. Reinhard Vöckler
IL
Imsieke, Gerrit, le-tex21 Jun 2017 09:58 #
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 don’t think there is a binary distribution. There is a page about trang, http://www.thaiopensource.com/relaxng/trang.html, although some of the links are broken. The download page seems to be functional though: https://code.google.com/archive/p/jing-trang/downloads Invocation is described on http://www.thaiopensource.com/relaxng/trang-manual.html Gerrit
Quoted text · Dharmendra Singh · 60 lines
On 6/21/17 9:50 AM, Dharmendra Singh wrote: > 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 convertrnc file to rng using > trang > > Regards > Dharmendra Kumar Singh > > > On Wednesday, 21 June 2017 1:06 PM, "Imsieke, Gerrit, le-tex" > <gerrit.imsieke at le-tex.de> wrote: > > > 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 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 $input := db:open('onix') > > return validate:rng($input, $schema) > > > > when i run this code i get the error invalid XML charcter(20) > > > > so what i am doing wrong here. > > > -- > Gerrit Imsieke > Geschäftsführer / Managing Director > le-tex publishing services GmbH > Weissenfelser Str. 84, 04229 Leipzig, Germany > Phone +49 341 355356 110, Fax +49 341 355356 510 > gerrit.imsieke at le-tex.de <mailto:gerrit.imsieke at le-tex.de>, > http://www.le-tex.de <http://www.le-tex.de/> > > Registergericht / Commercial Register: Amtsgericht Leipzig > Registernummer / Registration Number: HRB 24930 > > Geschäftsführer: Gerrit Imsieke, Svea Jelonek, > Thomas Schmidt, Dr. Reinhard Vöckler > > >
-- Gerrit Imsieke Geschäftsführer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke at le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt, Dr. Reinhard Vöckler
MG
Marc van Grootelin reply to Imsieke, Gerrit, le-tex, 21 Jun 2017, 09:3621 Jun 2017 09:59 #
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, --Marc
Quoted text · le-tex · 43 lines
On Wed, Jun 21, 2017 at 9:36 AM, Imsieke, Gerrit, le-tex <gerrit.imsieke at le-tex.de> wrote: > 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 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 $input := db:open('onix') >> return validate:rng($input, $schema) >> >> when i run this code i get the error invalid XML charcter(20) >> >> so what i am doing wrong here. > > > -- > Gerrit Imsieke > Geschäftsführer / Managing Director > le-tex publishing services GmbH > Weissenfelser Str. 84, 04229 Leipzig, Germany > Phone +49 341 355356 110, Fax +49 341 355356 510 > gerrit.imsieke at le-tex.de, http://www.le-tex.de > > Registergericht / Commercial Register: Amtsgericht Leipzig > Registernummer / Registration Number: HRB 24930 > > Geschäftsführer: Gerrit Imsieke, Svea Jelonek, > Thomas Schmidt, Dr. Reinhard Vöckler
-- --Marc
DS
Dharmendra Singhin reply to Christian Grün, 21 Jun 2017, 09:4621 Jun 2017 10:15 #
Hi Christian, please find the attached schema
Quoted text · Christian Grün · 1 line
On Wednesday, 21 June 2017 1:16 PM, Christian Grün <christian.gruen at gmail.com> wrote:
Dear Singh, Could you please pass us on your schema file? Thanks in advance, Christian
Quoted text · Dharmendra Singh · 17 lines
On Wed, Jun 21, 2017 at 8:20 AM, Dharmendra Singh <dharam.mahi at gmail.com> 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 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 $input := db:open('onix') > return validate:rng($input, $schema) > > when i run this code i get the error invalid XML charcter(20) > > so what i am doing wrong here.
DS
Dharmendra Singhin reply to Marc van Grootel, 21 Jun 2017, 09:5921 Jun 2017 10:16 #
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())
Quoted text · Marc van Grootel · 1 line
On Wednesday, 21 June 2017 1:29 PM, Marc van Grootel <marc.van.grootel at gmail.com> wrote:
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, --Marc
Quoted text · le-tex · 43 lines
On Wed, Jun 21, 2017 at 9:36 AM, Imsieke, Gerrit, le-tex <gerrit.imsieke at le-tex.de> wrote: > 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 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 $input := db:open('onix') >> return validate:rng($input, $schema) >> >> when i run this code i get the error invalid XML charcter(20) >> >> so what i am doing wrong here. > > > -- > Gerrit Imsieke > Geschäftsführer / Managing Director > le-tex publishing services GmbH > Weissenfelser Str. 84, 04229 Leipzig, Germany > Phone +49 341 355356 110, Fax +49 341 355356 510 > gerrit.imsieke at le-tex.de, http://www.le-tex.de > > Registergericht / Commercial Register: Amtsgericht Leipzig > Registernummer / Registration Number: HRB 24930 > > Geschäftsführer: Gerrit Imsieke, Svea Jelonek, > Thomas Schmidt, Dr. Reinhard Vöckler
-- --Marc
CG
Christian Grün21 Jun 2017 10:24 #
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 not match the schema. What happens if you directly reference your XML document and RelaxNG file?
  validate:rng('doc.xml','publishers-51cr.rnc',true())
Quoted text · Dharmendra Singh · 79 lines
On Wed, Jun 21, 2017 at 10:16 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > 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') > return > validate:rng($input,$schema,true()) > > > On Wednesday, 21 June 2017 1:29 PM, Marc van Grootel > <marc.van.grootel at gmail.com> wrote: > > > 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, > --Marc > > On Wed, Jun 21, 2017 at 9:36 AM, Imsieke, Gerrit, le-tex > <gerrit.imsieke at le-tex.de> wrote: >> 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 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 $input := db:open('onix') >>> return validate:rng($input, $schema) >>> >>> when i run this code i get the error invalid XML charcter(20) >>> >>> so what i am doing wrong here. >> >> >> -- >> Gerrit Imsieke >> Geschäftsführer / Managing Director >> le-tex publishing services GmbH >> Weissenfelser Str. 84, 04229 Leipzig, Germany >> Phone +49 341 355356 110, Fax +49 341 355356 510 >> gerrit.imsieke at le-tex.de, http://www.le-tex.de >> >> Registergericht / Commercial Register: Amtsgericht Leipzig >> Registernummer / Registration Number: HRB 24930 >> >> Geschäftsführer: Gerrit Imsieke, Svea Jelonek, >> Thomas Schmidt, Dr. Reinhard Vöckler > > > > > -- > --Marc > >
DS
Dharmendra Singh21 Jun 2017 10:49 #
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.
Quoted text · Christian Grün · 1 line
On Wednesday, 21 June 2017 1:54 PM, Christian Grün <christian.gruen at gmail.com> wrote:
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 not match the schema. What happens if you directly reference your XML document and RelaxNG file?
  validate:rng('doc.xml','publishers-51cr.rnc',true())
Quoted text · Dharmendra Singh · 79 lines
On Wed, Jun 21, 2017 at 10:16 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > 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') > return > validate:rng($input,$schema,true()) > > > On Wednesday, 21 June 2017 1:29 PM, Marc van Grootel > <marc.van.grootel at gmail.com> wrote: > > > 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, > --Marc > > On Wed, Jun 21, 2017 at 9:36 AM, Imsieke, Gerrit, le-tex > <gerrit.imsieke at le-tex.de> wrote: >> 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 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 $input := db:open('onix') >>> return validate:rng($input, $schema) >>> >>> when i run this code i get the error invalid XML charcter(20) >>> >>> so what i am doing wrong here. >> >> >> -- >> Gerrit Imsieke >> Geschäftsführer / Managing Director >> le-tex publishing services GmbH >> Weissenfelser Str. 84, 04229 Leipzig, Germany >> Phone +49 341 355356 110, Fax +49 341 355356 510 >> gerrit.imsieke at le-tex.de, http://www.le-tex.de >> >> Registergericht / Commercial Register: Amtsgericht Leipzig >> Registernummer / Registration Number: HRB 24930 >> >> Geschäftsführer: Gerrit Imsieke, Svea Jelonek, >> Thomas Schmidt, Dr. Reinhard Vöckler > > > > > -- > --Marc > >
CG
Christian Grün21 Jun 2017 10:51 #
Quoted text · Dharmendra Singh · 4 lines
> 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 directly access the files, as described in my last mail?
Quoted text · Dharmendra Singh · 100 lines
> On Wednesday, 21 June 2017 1:54 PM, Christian Grün > <christian.gruen at gmail.com> wrote: > > > 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 not match the schema. > > What happens if you directly reference your XML document and RelaxNG file? > > validate:rng('doc.xml','publishers-51cr.rnc',true()) > > > > > On Wed, Jun 21, 2017 at 10:16 AM, Dharmendra Singh > <dharam.mahi at gmail.com> wrote: >> 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') >> return >> validate:rng($input,$schema,true()) >> >> >> On Wednesday, 21 June 2017 1:29 PM, Marc van Grootel >> <marc.van.grootel at gmail.com> wrote: >> >> >> 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, >> --Marc >> >> On Wed, Jun 21, 2017 at 9:36 AM, Imsieke, Gerrit, le-tex >> <gerrit.imsieke at le-tex.de> wrote: >>> 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 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 $input := db:open('onix') >>>> return validate:rng($input, $schema) >>>> >>>> when i run this code i get the error invalid XML charcter(20) >>>> >>>> so what i am doing wrong here. >>> >>> >>> -- >>> Gerrit Imsieke >>> Geschäftsführer / Managing Director >>> le-tex publishing services GmbH >>> Weissenfelser Str. 84, 04229 Leipzig, Germany >>> Phone +49 341 355356 110, Fax +49 341 355356 510 >>> gerrit.imsieke at le-tex.de, http://www.le-tex.de >>> >>> Registergericht / Commercial Register: Amtsgericht Leipzig >>> Registernummer / Registration Number: HRB 24930 >>> >>> Geschäftsführer: Gerrit Imsieke, Svea Jelonek, >>> Thomas Schmidt, Dr. Reinhard Vöckler >> >> >> >> >> -- >> --Marc >> >> > >
DS
Dharmendra Singhin reply to Dharmendra Singh, 21 Jun 2017, 10:4921 Jun 2017 10:59 #
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: file:///C:/Users/DHARME~1.SIN/AppData/Local/Temp/BaseX-8123818404127734568.tmp, 1:1: syntax error i think XML is not valid. One again thanks to Everyone, i got the solution. RegardsDharmendra Kumar Singh
Quoted text · Dharmendra Singh · 1 line
On Wednesday, 21 June 2017 2:19 PM, Dharmendra Singh <dharam.mahi at gmail.com> wrote:
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.
Quoted text · Christian Grün · 1 line
On Wednesday, 21 June 2017 1:54 PM, Christian Grün <christian.gruen at gmail.com> wrote:
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 not match the schema. What happens if you directly reference your XML document and RelaxNG file?
  validate:rng('doc.xml','publishers-51cr.rnc',true())
Quoted text · Dharmendra Singh · 79 lines
On Wed, Jun 21, 2017 at 10:16 AM, Dharmendra Singh <dharam.mahi at gmail.com> wrote: > 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') > return > validate:rng($input,$schema,true()) > > > On Wednesday, 21 June 2017 1:29 PM, Marc van Grootel > <marc.van.grootel at gmail.com> wrote: > > > 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, > --Marc > > On Wed, Jun 21, 2017 at 9:36 AM, Imsieke, Gerrit, le-tex > <gerrit.imsieke at le-tex.de> wrote: >> 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 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 $input := db:open('onix') >>> return validate:rng($input, $schema) >>> >>> when i run this code i get the error invalid XML charcter(20) >>> >>> so what i am doing wrong here. >> >> >> -- >> Gerrit Imsieke >> Geschäftsführer / Managing Director >> le-tex publishing services GmbH >> Weissenfelser Str. 84, 04229 Leipzig, Germany >> Phone +49 341 355356 110, Fax +49 341 355356 510 >> gerrit.imsieke at le-tex.de, http://www.le-tex.de >> >> Registergericht / Commercial Register: Amtsgericht Leipzig >> Registernummer / Registration Number: HRB 24930 >> >> Geschäftsführer: Gerrit Imsieke, Svea Jelonek, >> Thomas Schmidt, Dr. Reinhard Vöckler > > > > > -- > --Marc > >

⚡Generated with XQuery