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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> Behalf Of Todd Ditchendorf
> Sent: Monday, 5 June 2006 11:57 AM
> To: [email protected]
> 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/
> [email protected]
> http://mail.gnome.org/mailman/listinfo/xml
> 
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to