I have just tried my first effort at producing a web page in cocoon 2
by transforming xml with xslt.

My relevant sitemap entry looks like this:

   <map:match pattern="shiva">
    <map:generate src="src/shiva.xml"/>
    <map:transform src="transforms/shiva2html.xsl"/>
    <map:serialize/>
   </map:match>


This actually works, but not 100% as I desired.

I use Opera as my browser, and I like to use Opera's built-in facility
to call the W3C's validation service, to check the validity of the
document I have produced.

I wasn't completely surprised when it failed to validate, but I was
surprised at the particular validation error I got: it was complaining
that the &copy; entity wasn't valid.

When I viewed the source, I noticed that the first tag was the html
tag, so the W3C validator was unable to identify which level of HTML
it was supposed to be validating - this explains the validation error,
as I believe you need HTML 4 for such entities (?).

Since I had specified the following in my transform, I expected to get
a DOCTYPE statment:

  <xsl:output method="xml" version="1.0" standalone="no"
    encoding="UTF-8" omit-xml-declaration="no" 
    doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";
    doctype-public="-//W3C//DTD XHTML 1.1//EN" />

The output was indeed xhtml, but no doctype (or xml declaration - I
probably will need to omit the latter anyway).

So why is there no <!DOCTYPE statement being omitted? Is this a
feature of Cocoon, or of Xalan?
-- 
Colin Paul Adams
Preston Lancashire

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to