1 | For more information, see <a href="#chapter1">Chapter 1</a>. |
1 2 3 4 | For more information, see <fo:basic-link color="blue" internal-destination="chapter1"> Chapter 1 </fo:basic-link>. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <xsl:template match="a"> <xsl:choose> <xsl:when test="@name"> ... The previous entry covered named anchors ... </xsl:when> <xsl:when test="@href"> <fo:basic-link color="blue"> <xsl:choose> <xsl:when test="starts-with(@href, '#')"> <xsl:attribute name="internal-destination"> <xsl:value-of select="substring(@href, 2)"/> </xsl:attribute> </xsl:when> <xsltherwise> ... Handle external links here ... </xsltherwise> </xsl:choose> <xsl:apply-templates select="*|text()"/> </fo:basic-link> <xsl:if test="starts-with(@href, '#')"> <xsl:text> on page </xsl:text> <fo:page-number-citation ref-id="{substring(@href, 2)}"/> </xsl:if> </xsl:when> </xsl:choose> </xsl:template> |
1 | For more information, see Chapter 1 on page 73. |
1 2 3 | <a href="http://www.ibm.com/developerworks/"> IBM's developerWorks Web site </a> |
1 2 3 4 | <fo:basic-link color="blue" external-destination="http://www.ibm.com/developerworks/"> IBM's developerWorks Web site </fo:basic-link> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <xsl:template match="a"> <xsl:choose> <xsl:when test="@name"> <xsl:if test="not(name(following-sibling::*[1]) = 'h1')"> <fo:block line-height="0" space-after="0pt" font-size="0pt" id="{@name}"/> </xsl:if> </xsl:when> <xsl:when test="@href"> <fo:basic-link color="blue"> <xsl:choose> <xsl:when test="starts-with(@href, '#')"> <xsl:attribute name="internal-destination"> <xsl:value-of select="substring(@href, 2)"/> </xsl:attribute> </xsl:when> <xsltherwise> <xsl:attribute name="external-destination"> <xsl:value-of select="@href"/> </xsl:attribute> </xsltherwise> </xsl:choose> <xsl:apply-templates select="*|text()"/> </fo:basic-link> <xsl:if test="starts-with(@href, '#')"> <xsl:text> on page </xsl:text> <fo:page-number-citation ref-id="{substring(@href, 2)}"/> </xsl:if> </xsl:when> </xsl:choose> </xsl:template> |
1 2 3 4 5 6 7 | <address> Mrs. Mary Backstayge <br /> 283 First Avenue <br /> Skunk Haven, MA 02718 </address> |
1 2 3 | <fo:block>Mrs. Mary Backstayge<fo:block> </fo:block> 283 First Avenue<fo:block> </fo:block> Skunk Haven, MA 02718</fo:block> |
1 2 3 4 5 | <xsl:template match="address"> <fo:block> <xsl:apply-templates select="*|text()"/> </fo:block> </xsl:template> |
1 | <p>Jackdaws <b>love</b> my big sphinx of quartz.</p> |
1 2 3 4 | <fo:block> Jackdaws <fo:inline font-weight="bold">love</fo:inline> my big sphinx of quartz. </fo:block> |
1 2 3 4 5 6 7 | <xsl:template match="b"> <fo:inline font-weight="bold"> <xsl:apply-templates select="*|text()"/> </fo:inline> </xsl:template> |
1 | <p>Jackdaws <big>love</big> my big sphinx of quartz. </p> |
1 2 3 4 5 6 7 | <xsl:template match="big"> <fo:inline font-size="120%"> <xsl:apply-templates select="*|text()"/> </fo:inline> </xsl:template> |
1 2 3 | <fo:block>Jackdaws <fo:inline font-size="120%">love</fo:inline> my big sphinx of quartz. </fo:block> |
1 2 3 4 5 6 7 8 | <blockquote> When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation. </blockquote> |
1 2 3 4 5 | <fo:block start-indent="1.5cm" end-indent="1.5cm"> When in the Course of human events, it becomes necessary for one people to dissolve the political bands which have connected them with another, ... </fo:block> |
1 2 3 4 5 6 7 | <xsl:template match="blockquote"> <fo:block start-indent="1.5cm" end-indent="1.5cm"> <xsl:apply-templates select="*|text()"/> </fo:block> </xsl:template> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |