Re: XML::LibXML search path for DTDs
Liam R E Quin <[email protected]> Sat, 29 Sep 2012 14:08:50 -0400
| Newsgroups | gmane.comp.lang.perl.xml |
|---|---|
| Organization | W3C - World Wide Web Consortium |
| Message-ID | <[email protected]> |
On Sat, 2012-09-29 at 07:03 -0700, Roger Pepitone wrote: > > Catalogs seem to be what I want, but I they don't seem to have any effect. > $parser->load_catalog( $catalog_file ); > Loads the XML catalog file $catalog_file. > > That really glosses over things. > Is there a return value? If so, what does it mean? > What sort of values can $catalog_file take? (Are string containing > filename, string containing xml, and file handle all acceptable?) The string should cantain a URI or filename pointing to an OasisOpen XML Catalog file; look in /etc/xml for examples on most Linux systems. An XML catalog is an XML file (not a DTD), e.g. "mycatalog.xml". The load_catalog method doesn't appear to return anything useful, and it's possible that errors are silently ignored. But you can use xmllint on the commandline, with SGML_CATALOG_FILES="mycatalog.xml" export SGML_CATALOG_FILES xmllint --catalogs --noout --valid --loaddtd myfile.xml You could use strace or ltrace to check that the catalog file was opened, or --load-trace might show them. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml Co-author, 5th edition of "Beginning XML", Wrox, July 2012 _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs