diff options
author | zi <zi@FreeBSD.org> | 2013-01-09 07:46:02 +0800 |
---|---|---|
committer | zi <zi@FreeBSD.org> | 2013-01-09 07:46:02 +0800 |
commit | 315c52c898ec0a1bb75e8f2567e9ca5f4a488b8d (patch) | |
tree | 399986dd2a3d30710ac44882e72f3e6b523efce0 /security/vuxml | |
parent | 3d30d9a48dd8b87960f4d081e92f69fcd5249107 (diff) | |
download | freebsd-ports-gnome-315c52c898ec0a1bb75e8f2567e9ca5f4a488b8d.tar.gz freebsd-ports-gnome-315c52c898ec0a1bb75e8f2567e9ca5f4a488b8d.tar.zst freebsd-ports-gnome-315c52c898ec0a1bb75e8f2567e9ca5f4a488b8d.zip |
- Properly copy namespace attributes/resolve make validate issues
Reviewed by: simon@, eadler@
Approved by: zi (with ports-secteam hat)
Diffstat (limited to 'security/vuxml')
-rw-r--r-- | security/vuxml/files/tidy.xsl | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/security/vuxml/files/tidy.xsl b/security/vuxml/files/tidy.xsl index a0ccef7ae8d5..bf56f3184a0d 100644 --- a/security/vuxml/files/tidy.xsl +++ b/security/vuxml/files/tidy.xsl @@ -40,9 +40,7 @@ in descending order of their <modified> elements (or <entry>, if they don't have <modified>). Insert an empty line between <vuln> elements. --> <xsl:template match="vuxml:vuxml"> - <xsl:element name="{name()}"> - <xsl:attribute - name="xmlns">http://www.vuxml.org/apps/vuxml-1</xsl:attribute> + <xsl:element name="{name()}" namespace="{namespace-uri(.)}"> <xsl:for-each select="@*"> <xsl:attribute name="{name()}"><xsl:value-of select="." /></xsl:attribute> @@ -69,25 +67,13 @@ from those elements. vuxml:entry|vuxml:modified"> <xsl:call-template name="normalize-space"> <xsl:with-param name="node" select="." /> + <xsl:with-param name="namespace" select="namespace-uri(.)" /> </xsl:call-template> </xsl:template> - -<!-- Include a namespace declaration on the <body> element. --> -<xsl:template match="xhtml:body"> - <xsl:element name="{name()}"> - <xsl:attribute - name="xmlns">http://www.w3.org/1999/xhtml</xsl:attribute> - <xsl:call-template name="copy-attr"> - <xsl:with-param name="node" select="." /> - </xsl:call-template> - <xsl:apply-templates /> - </xsl:element> -</xsl:template> - <!-- Default copy. --> <xsl:template match="*"> - <xsl:element name="{name()}"> + <xsl:element name="{name()}" namespace="{namespace-uri(.)}"> <xsl:call-template name="copy-attr"> <xsl:with-param name="node" select="." /> </xsl:call-template> @@ -111,7 +97,8 @@ from those elements. <!-- Strip whitespace from elements with only text --> <xsl:template name="normalize-space"> <xsl:param name="node" /> - <xsl:element name="{name($node)}"> + <xsl:param name="namespace" /> + <xsl:element name="{name($node)}" namespace="{$namespace}"> <xsl:call-template name="copy-attr"> <xsl:with-param name="node" select="$node" /> </xsl:call-template> |