Attribute selectors now escaped in @match output
parent
5cded3d64b
commit
530407e05d
|
@ -66,7 +66,7 @@
|
||||||
<value-of select="concat(
|
<value-of select="concat(
|
||||||
$xt:nl,
|
$xt:nl,
|
||||||
'@deffn match {', @mode, '} ',
|
'@deffn match {', @mode, '} ',
|
||||||
' on {', @match, '}',
|
' on {', xt:escape-match( @match ), '}',
|
||||||
$xt:nl,
|
$xt:nl,
|
||||||
$doc,
|
$doc,
|
||||||
$xt:nl,
|
$xt:nl,
|
||||||
|
@ -75,6 +75,31 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Escape `at' symbols in matches.
|
||||||
|
|
||||||
|
These are common in XPath queries (attribute selectors), but
|
||||||
|
conflict with the Texinfo command prefix.
|
||||||
|
-->
|
||||||
|
<function name="xt:escape-match" as="xs:string">
|
||||||
|
<param name="match" as="xs:string" />
|
||||||
|
|
||||||
|
<variable name="preat" as="xs:string"
|
||||||
|
select="substring-before( $match, '@' )" />
|
||||||
|
<variable name="postat" as="xs:string"
|
||||||
|
select="substring-after( $match, '@' )" />
|
||||||
|
|
||||||
|
<sequence select="if ( $preat ) then
|
||||||
|
concat(
|
||||||
|
$preat,
|
||||||
|
'@@',
|
||||||
|
xt:escape-match( $postat ) )
|
||||||
|
else
|
||||||
|
$match" />
|
||||||
|
</function>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Generate `template' and `function' definitions
|
Generate `template' and `function' definitions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue