[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] validating and transforming a simple docbook5file in fedora linux
Am Dienstag, den 24.11.2009, 07:30 -0500 schrieb Robert P. J. Day: [..] > if i just want to validate that file against the relaxng schema with > xmllint, i have to *explicitly* list the schema file as follows, > correct? Correct. However, please always use --noent (and maybe you want to use --noout). Otherwise you might miss bugs in entities. But that's just BTW. > $ xmllint --relaxng /usr/share/xml/docbook5/schema/rng/5.0/docbook.rng test.db5 One word about xmllint here: Although I love it, it is not very useful for debugging RELAX NG schema based XML files. The error messages sometimes differ for the same issue depending on where the issue appears in the file. Sometimes the error messages are misleading or wrong - e.g. complaining about the attribute near to the buggy attribute. And there are some more issues. *IMHO* jing is much better for validation here and it outputs meaningful error messages. [..] > and finally, to generate the HTML, i can use the handy-dandy "xmlto" > utility but i have to explicitly skip validation since the underlying > xsltproc program that will be called can't validate relaxng. That is not correct. xmlto calls xmllint with --postvalid. This requires the presence of a DTD. You stumbled over a limitation of the xmlto script. > $ xmlto --skip-validation html test.db5 > Note: namesp. cut : stripped namespace before processing My book title > WARNING: cannot add @xml:base to node set root element. Relative paths may not work. > Note: namesp. cut : processing stripped document My book title > Writing index.html for book Another limitation of xmlto. It hardcodes the path to the namespace-stripped stylesheets (docbook-xsl), which slows down the processing. To be honest: you can easily directly use xsltproc instead of xmlto. You can even add the stylesheet to the XML file: <?xml-stylesheet type="text/xsl" href="..."?> Regards, Daniel
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]