|
98 | 98 | </xsl:template>
|
99 | 99 |
|
100 | 100 | <xsl:template match="h:table" mode="label.markup">
|
| 101 | + <xsl:param name="label.formal.with.ancestor" select="$label.formal.with.ancestor"/> |
101 | 102 | <xsl:choose>
|
102 | 103 | <xsl:when test="$label.formal.with.ancestor != 0">
|
103 |
| - <xsl:apply-templates select="ancestor::h:section[contains(@data-type, 'acknowledgments') or |
| 104 | + <xsl:apply-templates select="(ancestor::h:section[contains(@data-type, 'acknowledgments') or |
104 | 105 | contains(@data-type, 'afterword') or
|
105 | 106 | contains(@data-type, 'appendix') or
|
106 | 107 | contains(@data-type, 'bibliography') or
|
|
116 | 117 | contains(@data-type, 'introduction') or
|
117 | 118 | contains(@data-type, 'preface') or
|
118 | 119 | contains(@data-type, 'titlepage') or
|
119 |
| - contains(@data-type, 'toc')][last()]" mode="label.markup"/> |
| 120 | + contains(@data-type, 'toc')]| |
| 121 | + ancestor::h:div[@data-type = 'part'])[last()]" mode="label.markup"/> |
120 | 122 | <xsl:apply-templates select="." mode="intralabel.punctuation"/>
|
121 | 123 | <xsl:number count="h:table" from="h:section[contains(@data-type, 'acknowledgments') or
|
122 |
| - contains(@data-type, 'afterword') or |
123 |
| - contains(@data-type, 'appendix') or |
124 |
| - contains(@data-type, 'bibliography') or |
125 |
| - contains(@data-type, 'chapter') or |
126 |
| - contains(@data-type, 'colophon') or |
127 |
| - contains(@data-type, 'conclusion') or |
128 |
| - contains(@data-type, 'copyright-page') or |
129 |
| - contains(@data-type, 'dedication') or |
130 |
| - contains(@data-type, 'foreword') or |
131 |
| - contains(@data-type, 'glossary') or |
132 |
| - contains(@data-type, 'halftitlepage') or |
133 |
| - contains(@data-type, 'index') or |
134 |
| - contains(@data-type, 'introduction') or |
135 |
| - contains(@data-type, 'preface') or |
136 |
| - contains(@data-type, 'titlepage') or |
137 |
| - contains(@data-type, 'toc')]" level="any" format="1"/> |
| 124 | + contains(@data-type, 'afterword') or |
| 125 | + contains(@data-type, 'appendix') or |
| 126 | + contains(@data-type, 'bibliography') or |
| 127 | + contains(@data-type, 'chapter') or |
| 128 | + contains(@data-type, 'colophon') or |
| 129 | + contains(@data-type, 'conclusion') or |
| 130 | + contains(@data-type, 'copyright-page') or |
| 131 | + contains(@data-type, 'dedication') or |
| 132 | + contains(@data-type, 'foreword') or |
| 133 | + contains(@data-type, 'glossary') or |
| 134 | + contains(@data-type, 'halftitlepage') or |
| 135 | + contains(@data-type, 'index') or |
| 136 | + contains(@data-type, 'introduction') or |
| 137 | + contains(@data-type, 'preface') or |
| 138 | + contains(@data-type, 'titlepage') or |
| 139 | + contains(@data-type, 'toc')]| |
| 140 | + h:div[contains(@data-type, 'part')]" level="any" format="1"/> |
138 | 141 | </xsl:when>
|
139 | 142 | <xsl:otherwise>
|
140 | 143 | <xsl:number count="h:table" level="any" format="1"/>
|
|
181 | 184 | contains(@data-type, 'introduction') or
|
182 | 185 | contains(@data-type, 'preface') or
|
183 | 186 | contains(@data-type, 'titlepage') or
|
184 |
| - contains(@data-type, 'toc')]" level="any" format="1"/> |
| 187 | + contains(@data-type, 'toc')]| |
| 188 | + h:div[contains(@data-type, 'part')]" level="any" format="1"/> |
185 | 189 | </xsl:when>
|
186 | 190 | <xsl:otherwise>
|
187 | 191 | <xsl:number count="h:figure[not(contains(@data-type, 'cover'))]" level="any" format="1"/>
|
|
190 | 194 | </xsl:template>
|
191 | 195 |
|
192 | 196 | <xsl:template match="h:div[contains(@data-type, 'example')]" mode="label.markup">
|
| 197 | + <xsl:param name="label.formal.with.ancestor" select="$label.formal.with.ancestor"/> |
193 | 198 | <xsl:choose>
|
194 | 199 | <xsl:when test="$label.formal.with.ancestor != 0">
|
195 |
| - <xsl:apply-templates select="ancestor::h:section[contains(@data-type, 'acknowledgments') or |
| 200 | + <xsl:apply-templates select="(ancestor::h:section[contains(@data-type, 'acknowledgments') or |
196 | 201 | contains(@data-type, 'afterword') or
|
197 | 202 | contains(@data-type, 'appendix') or
|
198 | 203 | contains(@data-type, 'bibliography') or
|
|
208 | 213 | contains(@data-type, 'introduction') or
|
209 | 214 | contains(@data-type, 'preface') or
|
210 | 215 | contains(@data-type, 'titlepage') or
|
211 |
| - contains(@data-type, 'toc')][last()]" mode="label.markup"/> |
| 216 | + contains(@data-type, 'toc')]| |
| 217 | + ancestor::h:div[@data-type = 'part'])[last()]" mode="label.markup"/> |
212 | 218 | <xsl:apply-templates select="." mode="intralabel.punctuation"/>
|
213 |
| - <xsl:number count="h:div[contains(@data-type, 'example')]" from="h:section[contains(@data-type, 'acknowledgments') or |
214 |
| - contains(@data-type, 'afterword') or |
215 |
| - contains(@data-type, 'appendix') or |
216 |
| - contains(@data-type, 'bibliography') or |
217 |
| - contains(@data-type, 'chapter') or |
218 |
| - contains(@data-type, 'colophon') or |
219 |
| - contains(@data-type, 'conclusion') or |
220 |
| - contains(@data-type, 'copyright-page') or |
221 |
| - contains(@data-type, 'dedication') or |
222 |
| - contains(@data-type, 'foreword') or |
223 |
| - contains(@data-type, 'glossary') or |
224 |
| - contains(@data-type, 'halftitlepage') or |
225 |
| - contains(@data-type, 'index') or |
226 |
| - contains(@data-type, 'introduction') or |
227 |
| - contains(@data-type, 'preface') or |
228 |
| - contains(@data-type, 'titlepage') or |
229 |
| - contains(@data-type, 'toc')]" level="any" format="1"/> |
| 219 | + <xsl:number count="h:div[@data-type='example']" from="h:section[contains(@data-type, 'acknowledgments') or |
| 220 | + contains(@data-type, 'afterword') or |
| 221 | + contains(@data-type, 'appendix') or |
| 222 | + contains(@data-type, 'bibliography') or |
| 223 | + contains(@data-type, 'chapter') or |
| 224 | + contains(@data-type, 'colophon') or |
| 225 | + contains(@data-type, 'conclusion') or |
| 226 | + contains(@data-type, 'copyright-page') or |
| 227 | + contains(@data-type, 'dedication') or |
| 228 | + contains(@data-type, 'foreword') or |
| 229 | + contains(@data-type, 'glossary') or |
| 230 | + contains(@data-type, 'halftitlepage') or |
| 231 | + contains(@data-type, 'index') or |
| 232 | + contains(@data-type, 'introduction') or |
| 233 | + contains(@data-type, 'preface') or |
| 234 | + contains(@data-type, 'titlepage') or |
| 235 | + contains(@data-type, 'toc')]| |
| 236 | + h:div[contains(@data-type, 'part')]" level="any" format="1"/> |
230 | 237 | </xsl:when>
|
231 | 238 | <xsl:otherwise>
|
232 | 239 | <xsl:number count="h:div[contains(@data-type, 'example')]" level="any" format="1"/>
|
|
0 commit comments