By this framework, you can plug your own schematron validation rule to BTT Validation Tool easily. What you need to do is to add your own rule in schematron format. The user-defined rule can be interpreted by the BTT Validation Tool, and the errors will be detected and reported to the WTP validation framework.
<?xml version="1.0" encoding="UTF-8"?> <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron"> <sch:patter name="Validate Key Collection Reference."> <sch:assert test="document('dsedata.xml')/child::*/kColl[@id=current()/@refId ]"> The refKCol doesn't exist .ATTRIBUTErefIdATTRIBUTE </sch:assert> </sch:rule> <sch:rule context="context"> <sch:assert test="not(@parent) or //context[@id=current90/@parent]"> The parent context doesn't exist.ATTRIBUTEparentATTRIBUTE </sch:assert> </sch:rule> <sch:rule context=//*"> <sch:assert test="not(@id) or name(preceding-sibling::*[@id=current()/@id])!=name()"> Duplicated id.ATTRIBUTEidATTRIBUTE </sch:assert> </sch:rule> </sch:pattern> </sch:schema>The schematron rules can validate:
<sch:rule context="context"> <sch:assert test="not(@id) or current()/@id != 'test_context'"> Its id is not 'test_context'.ATTRIBUTEidATTRIBUTE </sch:assert> </sch:rule>