Hi,
The quick fix which gets applied in that case looks like:
Code: Select all
<sqf:replace match="*[contains(@class, ' topic/title ')][position() > 1]" select="child::node()"/>
so it serializes the child content nodes of the second title.
But the XSLT stylesheet template which gets applied on the XML to produce the replacement content will receive the original XML with all default attributes (
class for example) expanded by default so they will also be inserted in the actual content when the quick fix is applied.
I will add an issue on our side to find a solution for this.
In the meantime a slightly complicated workaround would be this one:
1) In the Schematron file on the root element declare the XSLT namespace mapping:
Code: Select all
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
2) On the first level inside the Schematron root element add this XSLT template:
Code: Select all
<xsl:template match="node() | @*" mode="noClass">
<xsl:copy>
<xsl:apply-templates select="@* except @class" mode="noClass"/>
<xsl:apply-templates select="node()" mode="noClass"/>
</xsl:copy>
</xsl:template>
3) In the pattern which matches multiple section titles add a variable which calls that template to serialize the content and call that variable from the quick fix like:
Code: Select all
<pattern id="multiple_section_titles">
...................
<sqf:fix id="convertTitles">
<sqf:description>
<sqf:title>Convert other titles to text</sqf:title>
</sqf:description>
<xsl:variable name="serialized">
<xsl:apply-templates select="*[contains(@class, ' topic/title ')][position() > 1]/child::node()" mode="noClass"/>
</xsl:variable>
<sqf:replace match="*[contains(@class, ' topic/title ')][position() > 1]" select="$serialized"/>
</sqf:fix>
................
Regards,
Radu