I have a file structure like this:
bookmap.ditamap
├── en-US/
│ └── CTR_MyProduct.ditamap
├── es-ES/
│ └── CTR_MyProduct.ditamap
└── fr-FR/
└── CTR_MyProduct.ditamap
The content of bookmap.ditamap is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap>
<booktitle><mainbooktitle/></booktitle>
<part>
<mapref href="en-US/CTR_Product.ditamap"/>
</part>
<part>
<mapref href="fr-FR/CTR_Product.ditamap"/>
</part>
</bookmap>
I'd like to have a Schematron rule which should crawl through the subdirectories looking for files starting with CTR_ and ending with .ditamap which complains if there is no corresponding <part> element, like:
<part>
<mapref href="xx-YY/CTR_Product.ditamap"/>
</part>
In this example, there is no <part> element for the Spanish (es-ES) map. This should be reported. Do you think this is possible to validate in Schematron?