Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: iptables: Devel

[PATCH] Syntax error in iptables.xslt

 

 

iptables devel RSS feed   Index | Next | Previous | View Threaded


dbn.lists at gmail

Aug 2, 2007, 8:42 AM

Post #1 of 4 (813 views)
Permalink
[PATCH] Syntax error in iptables.xslt

Using the iptables.xslt stylesheet as shipped in iptables-1.3.8 is causing
syntax errors when run through xsltproc.

$ echo | xsltproc iptables.xslt -
compilation error: file iptables.xslt line 118 element param
The value '$node' of the attribute 'name' is not a valid QName.
$ xsltproc --version
Using libxml 20627, libxslt 10120 and libexslt 813
xsltproc was compiled against libxml 20627, libxslt 10120 and libexslt 813
libxslt 10120 was compiled against libxml 20627
libexslt 813 was compiled against libxml 20627

The problem is that in <xsl:param name="$node"/>, "$node" is not a valid
QName.

http://www.w3.org/TR/xslt#variables

Patch below converts to a valid name and the one expected in the rest of
the stylesheet when using <xsl:with-param name="node"/>.

--
Dan

Index: iptables.xslt
===================================================================
--- iptables.xslt (revision 6982)
+++ iptables.xslt (working copy)
@@ -116,7 +116,7 @@
</xsl:template>

<xsl:template name="counters">
- <xsl:param name="$node"/>
+ <xsl:param name="node"/>
<xsl:text>[</xsl:text>
<xsl:if test="string-length($node/@packet-count)"><xsl:value-of select="$node/@packet-count"/></xsl:if>
<xsl:if test="string-length($node/@packet-count)=0">0</xsl:if>


dbn.lists at gmail

Aug 2, 2007, 8:05 AM

Post #2 of 4 (741 views)
Permalink
[PATCH] Syntax error in iptables.xslt [In reply to]

Using the iptables.xslt stylesheet as shipped in iptables-1.3.8 is causing
syntax errors when run through xsltproc.

$ echo | xsltproc iptables.xslt -
compilation error: file iptables.xslt line 118 element param
The value '$node' of the attribute 'name' is not a valid QName.
$ xsltproc --version
Using libxml 20627, libxslt 10120 and libexslt 813
xsltproc was compiled against libxml 20627, libxslt 10120 and libexslt 813
libxslt 10120 was compiled against libxml 20627
libexslt 813 was compiled against libxml 20627

The problem is that in <xsl:param name="$node"/>, "$node" is not a valid
QName.

http://www.w3.org/TR/xslt#variables

Patch below converts to a valid name and the one expected in the rest of
the stylesheet when using <xsl:with-param name="node"/>.

--
Dan

Index: iptables.xslt
===================================================================
--- iptables.xslt (revision 6982)
+++ iptables.xslt (working copy)
@@ -116,7 +116,7 @@
</xsl:template>

<xsl:template name="counters">
- <xsl:param name="$node"/>
+ <xsl:param name="node"/>
<xsl:text>[</xsl:text>
<xsl:if test="string-length($node/@packet-count)"><xsl:value-of select="$node/@packet-count"/></xsl:if>
<xsl:if test="string-length($node/@packet-count)=0">0</xsl:if>


azez at ufomechanic

Aug 3, 2007, 4:13 AM

Post #3 of 4 (750 views)
Permalink
Re: [PATCH] Syntax error in iptables.xslt [In reply to]

* Dan Nicholson wrote, On 02/08/07 16:42:
> Patch below converts to a valid name and the one expected in the rest of
> the stylesheet when using <xsl:with-param name="node"/>.
>
> --
> Dan
>
> Index: iptables.xslt
> ===================================================================
> --- iptables.xslt (revision 6982)
> +++ iptables.xslt (working copy)
> @@ -116,7 +116,7 @@
> </xsl:template>
>
> <xsl:template name="counters">
> - <xsl:param name="$node"/>
> + <xsl:param name="node"/>
> <xsl:text>[</xsl:text>
> <xsl:if test="string-length($node/@packet-count)"><xsl:value-of select="$node/@packet-count"/></xsl:if>
> <xsl:if test="string-length($node/@packet-count)=0">0</xsl:if>
>
>

Thanks for spotting that. It would have had the effect of not restoring
counters.

Patrick, please accept this patch.

Signed-off by: Sam Liddicott <azez [at] ufomechanic>

Sam


pablo at netfilter

Aug 6, 2007, 1:50 AM

Post #4 of 4 (749 views)
Permalink
Re: [PATCH] Syntax error in iptables.xslt [In reply to]

Dan Nicholson wrote:
> The problem is that in <xsl:param name="$node"/>, "$node" is not a valid
> QName.
>
> http://www.w3.org/TR/xslt#variables
>
> Patch below converts to a valid name and the one expected in the rest of
> the stylesheet when using <xsl:with-param name="node"/>.

Applied, thanks Dan.

--
"Será preciso viajar a través de los ojos de los idiotas" -- Poeta en
Nueva York -- Federico García Lorca.

iptables devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.