[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Re: Questions about the XSLT2 stylesheets
Hi Carlos, Am Donnerstag, 21. Juni 2012, 09:19:53 schrieb Carlos Araya: > Good morning: That's relative. ;-) > [...] > I always validate the XML document before running the transformation > and it always validates using XMLLint. but it didn't catch this error. > Is there a way to validate xlink elements within docbook? I cannot recommend xmllint in regards to RELAX NG. Unfortunately, I was never able to validate my DocBook 5 documents against the DocBook RNG schema. ;-( Better use Jing. > Thee behavior with the XSLT1 (snapshot) distribution is to ignore the > link altogether. Is there a way to maybe flag it as a warning so we > can look at the xml and see where the error is? Well, consider this snippet with the same typo than your document (xlink:hef instead of xlink:href): <para>This links to the <link xlink:hef="http://www.docbook.org">DocBook site</link>.</para> Validate the XML file which contains the above snippet using this command: $ jing -c docbook.rnc db5-xlink.xml That gives me the following error: db5-xlink.xml:7:40: error: attribute "xlink:hef" not allowed here; expected attribute "annotations", "arch", "audience", "condition", "conformance", "dir", "endterm", "linkend", "os", "remap", "revision", "revisionflag", "role", "security", "userlevel", "vendor", "version", "wordsize", "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", "xlink:title", "xlink:type", "xml:base", "xml:id", "xml:lang", "xreflabel" or "xrefstyle" /tmp/db5-xlink.xml:7:40: error: element "link" missing one or more required attributes; expected attribute "annotations", "arch", "audience", "condition", "conformance", "dir", "endterm", "linkend", "os", "remap", "revision", "revisionflag", "role", "security", "userlevel", "vendor", "version", "wordsize", "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", "xlink:title", "xlink:type", "xml:base", "xml:id", "xml:lang", "xreflabel" or "xrefstyle" As you can see, the wrong attribute is indeed reported. The only issue you have is that xmllint is broken. The moral of the story: use jing. :) -- Gruß/Regards Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]