Re: [xsl] doctype is confusing me...

Subject: Re: [xsl] doctype is confusing me...
From: Ted Stresen-Reuter <tedmasterweb@xxxxxxx>
Date: Mon, 17 Feb 2003 17:18:50 -0600
Wow! Thanks a lot!

Can someone recommend a good class on XML and XSLT? I've been reading two or three books I've bought but I feel like there is just soooo much to learn that a class would really be helpful! I live in the Chicago area, by the way...

Thanks again. I'll see if I can make that work!

And thanks for the tip on the .dtd going out over the web... I'll address that one way or another...


On Monday, February 17, 2003, at 04:50 PM, Mike Brown wrote:

Ted Stresen-Reuter wrote:

I'm trying to transform XHTML files (extracting the form element). I'm
finding that with the xalan processor if I include the doctype
declaration at the top of the document (with or without the xml
processing instruction: <?xml version="1.0"?>)

There's no such thing as an XML processing instruction. That's an XML
declaration or text declaration, *not* a processing instruction. It just
happens to have a similar syntax.

, that the following
style sheet fails to see elements below the root of the document.
However, if I move the doctype declaration, it works as expected. What
am I missing here?

Thanks in advance!

Ted Stresen-Reuter

Here's the doctype declaration I'm using: <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"

1. If you haven't got a proxy or a catalog set up to retrieve the DTD locally,
you're going out over the net to every time you parse that XML. Is that
kind of overhead really what you want?

2. The DTD in question sets a default xmlns attribute on the "html" element.
Once that happens, none of the elements are in the empty namespace. Bind the
XHTML namespace to a prefix like "xhtml" in your stylesheet, and then you can
do things like <xsl:template match="html|xhtml:html"> to make the template
match an 'html' element in both the empty and XHTML namespaces.


  Mike J. Brown   |
  Denver, CO, USA |

XSL-List info and archive:

XSL-List info and archive:

Current Thread