OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] DocBook XSD


Hi Norm,

Congratulations!
Just a note on the Schematron schema. The pattenr/@name attribute was removed in ISO Schematron. In ISO Schematron there is a pattern/@id attribute but its type is ID. What you have in the @name attribute seems more like a short description that you should place inside a title element within the pattern, something like:

<s:pattern>
    <s:title>Only one kind of linking per element</s:title>
    <!-- "and" in the context is intentional -->
    <s:rule context="db:*[@linkend and @xlink:*]">
<s:assert test="not(@linkend) or not(@xlink:*)">@linkend cannot be combined with XLink.</s:assert>
    </s:rule>
</s:pattern>

and so on.

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 12/8/11 12:28 AM, Norman Walsh wrote:
Hello world,

For years, my plan has been to generate XSD files from the DocBook
RELAX NG sources. The best plaid plans of mice and men, as they say,
are about equal. After some promising forays, and enormous amounts of
fruitless effort, I've given up.

My new plan is to craft the XSD by hand, maintaining it in parallel to
the normative RELAX NG schema in wetware. For derived schemas, like
Publishers, this will mean crafting two customization layers, one for
RELAX NG and one for XSD. And I'm not quite sure what the XSD
customization will look like. Probably something that uses xs:override
(from XML Schema 1.1) and compiles down to XSD 1.0 via XSLT.

Here are the first, crude attempts. I'm *sure* there are bugs in the
XSD (I know there are issues with the placement of indexterms), but
I'd welcome feedback anyway.

docbook.xsd is a 1.1 schema
docbook10.xsd is a 1.0 schema
docbook-xsd.sch is a set of Schematron assertions

In theory, if you validate with XSD then apply *both* the normal Schematron
assertions provided with DocBook V5.0 *and* these additional assertions,
you'd get within spitting distance of having the same level of validation
as the RELAX NG. In practice, meh, use the %@#$!ing RELAX NG!





                                         Be seeing you,
                                           norm



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]