Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Saturday, February 9, 2013

How to execute xquery files ? (A simple approach)

Firstly,install Saxon X Query processor from Ubuntu software center or synaptic package manager.
you need to install two separate packages
  1. Saxon XSLT Processor (libsaxon-java)
  2. Saxon-B XSLT Processor (libsaxonb-java)
  • After installing both the packages,open terminal(shortcut-ctrl+alt+t) 
  • Change your directory that contains all the xml and xquery(.xqy) files.
  •  To run the xquery files,just run the below command with your sample.xqy(xquery file) in the terminal.
      $saxonb-xquery sample.xqy


thank you for reading
cheers !!!
sGk


Friday, February 8, 2013

How to validate xml file with xml schema ?


You can validate your xml file with xml schema in many ways,but in Linux system,one simple way is using xmllint .
If you don't have xmllint package,just install it from terminal

$sudo apt-get install xmllint

Now to validate a xml file called test.xml with the corresponding xml schema file test.xsd,just type in terminal as given below

$xmllint --noout --schema test.xsd test.xml

output
test.xml validates





thank you for reading
cheers !!!
sGk