|
873 | 873 | <xsl:template match="*[local-name() = 'preface']/*[local-name() = 'page_sequence']/*[local-name() = 'clause']" priority="3">
|
874 | 874 | <fo:block>
|
875 | 875 | <xsl:call-template name="setId"/>
|
| 876 | + <xsl:call-template name="addReviewHelper"/> |
876 | 877 | <xsl:apply-templates/>
|
877 | 878 | </fo:block>
|
878 | 879 | </xsl:template>
|
|
11054 | 11055 | <!-- END definition -->
|
11055 | 11056 | <!-- ========== -->
|
11056 | 11057 |
|
| 11058 | + <xsl:variable name="reviews_"> |
| 11059 | + <xsl:for-each select="//*[local-name() = 'review'][@from]"> |
| 11060 | + <xsl:copy> |
| 11061 | + <xsl:copy-of select="@from"/> |
| 11062 | + <xsl:copy-of select="@id"/> |
| 11063 | + </xsl:copy> |
| 11064 | + </xsl:for-each> |
| 11065 | + </xsl:variable> |
| 11066 | + <xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/> |
| 11067 | + |
| 11068 | + <xsl:template name="addReviewHelper"> |
| 11069 | + <!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template --> |
| 11070 | + <xsl:variable name="curr_id" select="@id"/> |
| 11071 | + <xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/> |
| 11072 | + <xsl:if test="$review_id != ''"> <!-- i.e. if review found --> |
| 11073 | + <fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> |
| 11074 | + </xsl:if> |
| 11075 | + <!-- <fo:block> |
| 11076 | + <curr_id><xsl:value-of select="$curr_id"/></curr_id> |
| 11077 | + <xsl:copy-of select="$reviews"/> |
| 11078 | + </fo:block> --> |
| 11079 | + </xsl:template> |
| 11080 | + |
11057 | 11081 | <!-- main sections -->
|
11058 | 11082 | <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
11059 | 11083 |
|
|
11062 | 11086 |
|
11063 | 11087 | <xsl:call-template name="sections_element_style"/>
|
11064 | 11088 |
|
| 11089 | + <xsl:call-template name="addReviewHelper"/> |
| 11090 | + |
11065 | 11091 | <xsl:apply-templates/>
|
11066 | 11092 | </fo:block>
|
11067 | 11093 |
|
|
11097 | 11123 |
|
11098 | 11124 | <fo:block>
|
11099 | 11125 | <xsl:call-template name="setId"/>
|
| 11126 | + <xsl:call-template name="addReviewHelper"/> |
11100 | 11127 | <xsl:apply-templates/>
|
11101 | 11128 | </fo:block>
|
11102 | 11129 | </xsl:template>
|
|
11133 | 11160 |
|
11134 | 11161 | <xsl:call-template name="refine_clause_style"/>
|
11135 | 11162 |
|
| 11163 | + <xsl:call-template name="addReviewHelper"/> |
| 11164 | + |
11136 | 11165 | <xsl:apply-templates/>
|
11137 | 11166 | </fo:block>
|
11138 | 11167 | </xsl:template>
|
|
11185 | 11214 |
|
11186 | 11215 | <xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
11187 | 11216 |
|
| 11217 | + <xsl:if test="1 = 1"> |
| 11218 | + <xsl:choose> |
| 11219 | + <!-- if there isn't the attribute '@from', then --> |
| 11220 | + <xsl:when test="$id_from = ''"> |
| 11221 | + <fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> |
| 11222 | + </xsl:when> |
| 11223 | + <!-- if there isn't element with id 'from', then create 'bookmark' here --> |
| 11224 | + <xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])"> |
| 11225 | + <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> |
| 11226 | + </xsl:when> |
| 11227 | + <xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])"> |
| 11228 | + <fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> |
| 11229 | + </xsl:when> |
| 11230 | + </xsl:choose> |
| 11231 | + </xsl:if> |
| 11232 | + |
| 11233 | + <xsl:if test="1 = 2"> |
11188 | 11234 | <xsl:choose>
|
11189 | 11235 | <!-- if there isn't the attribute '@from', then -->
|
11190 | 11236 | <xsl:when test="$id_from = ''">
|
|
11198 | 11244 | <fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
11199 | 11245 | </xsl:when>
|
11200 | 11246 | </xsl:choose>
|
| 11247 | + </xsl:if> |
11201 | 11248 |
|
11202 | 11249 | </xsl:template>
|
11203 | 11250 |
|
|
0 commit comments