GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
1
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
XML
Browse code
- Replaced unnecessary " entities with literal quotes.
master
1 parent
72ad19a
commit
7358b58716868c117840ab7bc5b0737163b5cca6
nstanger
authored
on 6 Oct 2011
Patch
Showing
1 changed file
modules/obsolete.xml
Ignore Space
Show notes
View
modules/obsolete.xml
<?xml version="1.0" encoding="utf-8"?> <!-- Any obsolete items for which we want to display an appropriate error message (e.g., to point authors to the correct way to do things). This is pretty much a grab bag of all sorts of random stuff mixed together. Note that we want the error messages to be generated regardless of the output format, so all code is common to all formats. --> <stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- A utility template to parameterise error messages for obsolete items. $obsolete-item: A string describing the obsolete item(s). $new-item: A string describing the item(s) that replace the obsolete ones. --> <template name="generate-obsolete-error"> <common> <xsl:param name="obsolete-item" /> <xsl:param name="new-item" /> <xsl:message terminate="yes"> <xsl:text>Use of OBSOLETE </xsl:text> <xsl:value-of select="$obsolete-item" /> <xsl:text>. Please use </xsl:text> <xsl:value-of select="$new-item" /> <xsl:text> instead.</xsl:text> </xsl:message> </common> </template> <!-- Generate a LaTeX \input{} macro. Replaced by the more general "include-document" template. --> <template name="latex-input" match="latex-input"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>"include-document"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Document metadata. Moved to attributes of the top-level document element. --> <template name="metadata" match="metadata"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>attributes of the top-level "document" element</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Label/id elements for figures. Moved to the @label attribute of figure/table. --> <template match="figure/id|table/id|figure/label|table/label"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>" inside "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>the @label attribute of "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Scaling of images for LaTeX using "latex-scaling". Subsumed by the @latex-options attribute of "image". --> <template match="image/latex-scaling"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>" inside "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>the @latex-options attribute of "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Various obsolete elements inside images. Replaced by attributes of the same name within "image". --> <template match="image/basename|image/format"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>" inside "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>the @</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text> attribute of "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> </stylesheet>
<?xml version="1.0" encoding="utf-8"?> <!-- Any obsolete items for which we want to display an appropriate error message (e.g., to point authors to the correct way to do things). This is pretty much a grab bag of all sorts of random stuff mixed together. Note that we want the error messages to be generated regardless of the output format, so all code is common to all formats. --> <stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- A utility template to parameterise error messages for obsolete items. $obsolete-item: A string describing the obsolete item(s). $new-item: A string describing the item(s) that replace the obsolete ones. --> <template name="generate-obsolete-error"> <common> <xsl:param name="obsolete-item" /> <xsl:param name="new-item" /> <xsl:message terminate="yes"> <xsl:text>Use of OBSOLETE </xsl:text> <xsl:value-of select="$obsolete-item" /> <xsl:text>. Please use </xsl:text> <xsl:value-of select="$new-item" /> <xsl:text> instead.</xsl:text> </xsl:message> </common> </template> <!-- Generate a LaTeX \input{} macro. Replaced by the more general "include-document" template. --> <template name="latex-input" match="latex-input"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>"include-document"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Document metadata. Moved to attributes of the top-level document element. --> <template name="metadata" match="metadata"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>attributes of the top-level "document" element</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Label/id elements for figures. Moved to the @label attribute of figure/table. --> <template match="figure/id|table/id|figure/label|table/label"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>" inside "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>the @label attribute of "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Scaling of images for LaTeX using "latex-scaling". Subsumed by the @latex-options attribute of "image". --> <template match="image/latex-scaling"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>" inside "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>the @latex-options attribute of "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> <!-- Various obsolete elements inside images. Replaced by attributes of the same name within "image". --> <template match="image/basename|image/format"> <common> <xsl:call-template name="generate-obsolete-error"> <xsl:with-param name="obsolete-item"> <xsl:text>element "</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text>" inside "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> <xsl:with-param name="new-item"> <xsl:text>the @</xsl:text> <xsl:value-of select="node-name(.)" /> <xsl:text> attribute of "</xsl:text> <xsl:value-of select="node-name(..)" /> <xsl:text>"</xsl:text> </xsl:with-param> </xsl:call-template> </common> </template> </stylesheet>
Show line notes below