Skip to content

Commit

Permalink
Added 'axf:indent-here'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgraham-antenna committed May 15, 2017
1 parent b406cf3 commit b8b9842
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
10 changes: 9 additions & 1 deletion schema/axf.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ fo_index-range-begin.attlist &=

fo_inline.attlist &=
xml_id,
axf.annotation.attlist
axf.annotation.attlist,
axf_indent-here

fo_inline-container.attlist &=
xml_id,
Expand Down Expand Up @@ -1082,6 +1083,13 @@ axf_headers =
## Table header cells associated with this cell: <idrefs>
attribute axf:headers { xsd:IDREFS }?

# @axf:indent-here
#
# http://www.antennahouse.com/product/ahf64/ahf-ext.html#axf.indent-here
axf_indent-here =
## Aligns the indent position to the region position when a line break occurs: none | <length>
attribute axf:indent-here { text }?

# @axf:number-type
#
# http://www.antennahouse.com/product/ahf64/ahf-ext.html#axf.number-type
Expand Down
13 changes: 13 additions & 0 deletions schematron/axf.sch
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,19 @@
</sqf:fix>
</rule>

<!-- axf:indent-here -->
<!-- none | <length> -->
<!-- Inherited: yes -->
<!-- Shorthand: no -->
<!-- http://www.antennahouse.com/product/ahf64/ahf-ext.html#axf.indent-here -->
<rule context="fo:*/@axf:indent-here">
<let name="expression" value="ahf:parser-runner(.)"/>
<assert test="local-name($expression) = ('EnumerationToken', 'Length', 'EMPTY')">axf:indent-here="<value-of select="."/>" should be EnumerationToken or Length. '<value-of select="."/>' is a <value-of select="local-name($expression)"/>.</assert>
<report test="$expression instance of element(EnumerationToken) and not($expression/@token = ('none'))">axf:indent-here="<value-of select="."/>" enumeration token is '<value-of select="$expression/@token"/>'. Token should be 'none'.</report>
<report test="local-name($expression) = 'EMPTY'" role="Warning">axf:indent-here="" should be EnumerationToken or Length.</report>
<report test="local-name($expression) = 'ERROR'">Syntax error: axf:indent-here="<value-of select="."/>"</report>
</rule>

<!-- axf:line-number-background-color -->
<!-- <color> | transparent -->
<!-- Inherited: yes -->
Expand Down

0 comments on commit b8b9842

Please sign in to comment.