简体   繁体   中英

How to validate dita document

I would like to validate different DITA documents (topics, maps, etc.) against DITA but i am a bit confused about the DITA xsd files. The xsd package contains a lot of xsd files in different directories. A lot of the files define the same elements, groups (without redefine, for example attribute group domains-att).

So i guess there is a "main" xsd file (sub set of all the xsd files) for every type of DITA document. Is that true and if yes, what are the main files? If it is not true, could you please tell me how validation of a DITA document works if there are multiple definitions of the same types.

You may find my DITA specialization tutorials useful as an introduction to DITA grammar design:

http://dita4practitioners.github.io/dita-specialization-tutorials/

The tutorials focus on DTD syntax because that's what most DITA users use, but there is an XSD document type shell tutorial, which is directly relevant to your question here:

http://dita4practitioners.github.io/dita-specialization-tutorials/body/part-config-and-extend/tutorials/document-type-shells/creating-an-xsd-shell.html

Eliot

每个主题类型的主要XSD文件都命名为<topic type name>.xsd ,例如topic.xsdconcept.xsdmap.xsd

Proper validation of CALS tables within DITA poses additional problems due to co-constraints that XSD (at least in 1.0 form) can't express.

If you're Ok with using Schematron, there's a cals-table-schematron defintion that handles this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM