https://stackoverflow.com/questions/375 ... schematron
Code: Select all
<sch:pattern id="space-inline-elements-before"> <sch:rule context="ph"> <sch:assert test="ends-with(preceding::text(), ' ')" role="warning" sqf:fix="add-space-before-ph">Add space before <ph></sch:assert> <sqf:fix id="add-space-before-ph"> <sqf:description> <sqf:title>Add space before <ph></sqf:title> </sqf:description> <sqf:add position="before" match="." select="' '"/> </sqf:fix> </sch:rule> </sch:pattern>
It helps me to find spaces around <ph> tags.
However it doesn't work when the Indent inline elements is ticked in the preferences. This is how it looks like in Author mode with Indent inline elements option ticked: This is the same example in Text mode with Indent inline elements option ticked: How can I update the rule in such a way that it doens't show this message when the Indent inline elements is ticked? Because in the Author mode I can see a space.