RE: [xml] libxml2 RELAX NG example code



Todd,

Here is a simple UNIX command lines to validate an XML file using a RELAXNG
schema:

first set the location of the catalog file;

export SGML_CATALOG_FILES="/public/data/asddgate/etc/sgml/relaxcatalog.xml"

next run the command to validate an XML file using the RELAXNG schema:

/usr/local/bin/xmllint --noout --catalogs --relaxng
/home/relaxng/anzmeta-1.3.1.rng  xmlfile.xml

I have to set the SGML_CATALOG_FILES element because the anzmeta-1.3.1.rng
schema references many character entity references.  Your RELAXNG schema may
not do that so you may not have to set the SGML_CATALOG_FILES environment
variable.

I hope that this helps.


John

-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On 
Behalf Of Todd Ditchendorf
Sent: Monday, 5 June 2006 11:57 AM
To: xml gnome org
Subject: [xml] libxml2 RELAX NG example code


Can someone please point me to some example code using libxml2's C  
RELAX NG API? Simple parsing and validating samples would be very  
helpful.

Thanks!


Todd Ditchendorf

Scandalous Software - Cocoa Developer Tools
http://scan.dalo.us



_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]