Your message dated Sat, 11 Mar 2006 22:18:07 +0100
with message-id <[EMAIL PROTECTED]>
and subject line [xml/sgml-pkgs] Bug#356317: xsltproc: partial processing if
input document contains DOCTYPE or xmlns
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Package: xsltproc
Version: 1.1.12-8
Severity: normal
The first part of a stricly xhtml document would look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
...
however if I then use that against the following stylesheet:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<!-- identity translation -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/html">
xxx
</xsl:template>
</xsl:stylesheet>
then only the identity translation occurs, and not the /html match (the exact
match does not seem to matter, they are not used). If the DOCTYPE line and
xmlns attribute is removed, then the stylesheet works as expected. sabcmd
(sablotron) behaves the same (incorrect) way with the xmlns attribute is
included (but works fine with the DOCTYPE line).
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.15.4
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages xsltproc depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libgcrypt11 1.2.0-11.1 LGPL Crypto library - runtime libr
ii libgpg-error0 1.0-1 library for common error values an
ii libxml2 2.6.16-7 GNOME XML library
ii libxslt1.1 1.1.12-8 XSLT processing library - runtime
ii zlib1g 1:1.2.2-4.sarge.2 compression library - runtime
-- no debconf information
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
On Sat, Mar 11, 2006 at 12:04:57AM -0500, Allan Wind <[EMAIL PROTECTED]> wrote:
> Package: xsltproc
> Version: 1.1.12-8
> Severity: normal
>
> The first part of a stricly xhtml document would look like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> ...
>
> however if I then use that against the following stylesheet:
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="html"/>
>
> <!-- identity translation -->
> <xsl:template match="node()|@*">
> <xsl:copy>
> <xsl:apply-templates select="node()|@*"/>
> </xsl:copy>
> </xsl:template>
>
> <xsl:template match="/html">
> xxx
> </xsl:template>
> </xsl:stylesheet>
>
> then only the identity translation occurs, and not the /html match (the exact
> match does not seem to matter, they are not used). If the DOCTYPE line and
> xmlns attribute is removed, then the stylesheet works as expected. sabcmd
> (sablotron) behaves the same (incorrect) way with the xmlns attribute is
> included (but works fine with the DOCTYPE line).
This is not an incorrect way, this is the XSLT standard. Read the spec.
For the DOCTYPE, you have to use the doctype-public and doctype-system
attributes of xsl:output.
For the /html match, you're trying to match a namespaced node with the
default namespace (being null), which is not likely to match.
You have to register a namespace and use it in the match, e.g.
xmlns:h=""http://www.w3.org/1999/xhtml", and match="/h:html"
Cheers
Mike
--- End Message ---