Re: [xsl] XML source with DOCTYPE declaration

Subject: Re: [xsl] XML source with DOCTYPE declaration
From: Zeljko Rajic <zeljko.rajic@xxxxxxxxxx>
Date: Thu, 19 Apr 2001 17:59:46 +0200

first thanks for your help so far! Unfortunately I still could not solve
the problem and hope that you (or somebody else) could give more some
further hints.

> Look at the DTD.
> If it defines something like
> <!ATTLIST eee xmlns "a.namespace.uri" #FIXED>

I couldn't find any statement like this. What I found is the following:

<!ENTITY % NS.prefixed "IGNORE">
<!ENTITY % XHTML.prefixed "%NS.prefixed;">
<!ENTITY % XHTML.xmlns "";>
<!ENTITY % XHTML.prefix "">
<!ENTITY % XHTML.xmlns.attrib "xmlns   %URI.datatype;  #FIXED  
'%XHTML.xmlns;          %XLINK.xmlns.attrib;">

To be precise I use the XHTML Basic 1.0 DTD !
As I'm not that much familiar with DTDs I'm not sure what these
statements exactly do.
It would be great if somebody could send me a (simple) sample for
transforming XHTML input.

What I basically would like to do is such a sample like this...

[... XHTML Basic 1.0 input start ...]

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
	<body title="article">
		<p>Some Content !</p>

[... XHTML Basic 1.0 input end ...]

[... XSLT stylesheet start ...]

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl=""; >
	<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<xsl:text>ROOT element found !</xsl:text>
		<xsl:copy-of select="."/>
	<xsl:template match="/html">
		<xsl:text>HTML tag found !!!</xsl:text>

[... XSLT stylesheet start ...]

[... transformation output start ...]

<html xmlns=""; version="-// W3C//DTD XHTML
Basic 1.0//EN">
        <head xmlns=""; profile="">
                <title xmlns=""/>
        <body title="article" xmlns="";>
                <p xmlns="";>Some Content

[... transformation output end ...]

What I'm surprised of is that every tag got an 'xmlns' attribute added,
although only a simple <xsl:copy-of/> was executed.

Hope somebody can help me here and tell me how to get the upper sample
running. If possible the stylesheet should use the default namespace,
meaning if possible the expression matching patterns should not use

Thanks for any advice in advance!

-  Zeljko

 XSL-List info and archive:

Current Thread