HomeClusterLabs Projects

XML: upgrade-1.3.xsl: easy simplifications + redundant declarations drop

Description

XML: upgrade-1.3.xsl: easy simplifications + redundant declarations drop

  • while text declaration is SHOULD item for external parsed entity, it's quite superfluous when UTF-8 (not sure why ISO-8859-1 was picked previously) will get used by default in our context, and furthermore whole upgrade-1.3.xsl file is ASCII only
  • "fn" namespace binding additional function symbols is unused, so no need to declare it
  • settle on using just one type of quoting (double-quoting) throughout the document
  • "version" attribute for 'xsl:output method="xml"' is implicitly "1.0"
  • fix s/reda/read/ typo in the comment
  • <xsl:apply-templates select="@*"/> <xsl:apply-templates select="node()"/> combo can be abbreviated as <xsl:apply-templates select="@*|node()"/>
  • <xsl:for-each select="@*"> <xsl:apply-templates select="."/> </xsl:for-each> combo can be abbreviated as <xsl:apply-templates select="@*"/>
  • <xsl:text>auto-</xsl:text> <xsl:value-of select="@id"/> combo can be abbreviated as <xsl:value-of select="concat('auto-', @id)"/>
  • (<xsl:if test="@ATTRIBUTE">) <xsl:attribute name="ATTRIBUTE"> <xsl:value-of select="@ATTRIBUTE"/> </xsl:attribute> (</xsl:if>) combo can be abbreviated as <xsl:copy-of select="@ATTRIBUTE"/>

Details

Provenance
Jan Pokorný <jpokorny@redhat.com>Authored on May 5 2017, 10:06 AM
Parents
rPbd79d1af6f27: Merge pull request #1270 from kgaillot/fixes
Branches
Unknown
Tags
Unknown

Event Timeline