cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <>
Subject [C2] well-formedness of XML document() references
Date Mon, 19 Feb 2001 13:22:54 GMT
Having moved onto the most recent version of C2 I notice that my XSLT document() references
to XML files are not working anymore.  I was previously using a C2 CVS version from a few
months ago.

I have some XSP which generates an XML document, let's call it "test/doc.xml" (e.g. context
= "test").

    <map:match pattern="doc.xml">
        <map:generate type="serverpages" src="doc.xsp" />
        <map:serialize type="xml" />

I then have a bit of XSLT that will convert an XML document into an HTML document showing
the actual XML document content syntax highlighted:

    <map:match pattern="*.source">
        <map:generate src="http://localhost:8080/test/{1}" />
        <map:transform src="look/general/serialize_xml.xslt" />
        <map:serialize />

So a request for page "http://localhost:8080/test/doc.xml.source" correctly allows me to view
the XML document "doc.xml" in my browser (which doesn't have the facility built in).

Now, to the problem.

I have another XSLT document "testing.xslt" which refers to some content in the XML document
like this (line 28):

        <META name="" content="{document('http://localhost:8080/test/doc.xml')//current_date/@date}"

This used to work fine, but now results in the following onscreen error (it doesn't appear
in the log it appears in the terminal output of tomcat):

	file:/Users/stuart/webapp/test/testing.xslt; Line 28; Column 122; Can not load requested
doc: The root element is required in a well-formed document.


The XSP document appears to be correctly generating the XML document "doc.xml", because I
can view it onscreen, but things don't go well when I try to include the same document using

Any thoughts?


Stuart Roebuck                        
Lead Developer                               Java, XML, MacOS X, XP, etc.
View raw message