[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

read-first - Re: [xsl] servlet returns well-formed XML but document()? doesn't like it


Subject: read-first - Re: [xsl] servlet returns well-formed XML but document()? doesn't like it
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Sat, 28 Jul 2001 10:35:29 -0700

The URL (http://64.173.57.75:8080/master/ReturnPage?pageid=p0000000001)
won't work for you because you will need to log in and select the particular
context before you can access the page.  So if you still want to help,
please perform the following steps (nothing else will work, hopefully... :)
to get into the app:

1. go to http://64.173.57.75:8080/master/
2. use "boo" as a password
3. select Koberg Consulting
-- this will set the context to be edited
4. after that, then access
http://64.173.57.75:8080/master/ReturnPage?pageid=p0000000001
-- mac os x recieves a correct XML page if you do this which I figured out
after I wrote the note below.


----- Original Message -----
From: "Robert Koberg" <rob@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Saturday, July 28, 2001 10:13 AM
Subject: [xsl] servlet returns well-formed XML but document()? doesn't like
it


> Hi,
>
> I am having a problem returning XML to an XSL:
>
> <xsl:template name="content">
>    <xsl:variable
>       name="content-holder"
>
>
select="concat('http://dev.makecontent.com/master/ReturnPage?pageid=',$page-
> id)"/>
>    <xsl:apply-templates
>          select="document($content-holder)/article"/>
> </xsl:template>
>
> I get an error saying that the document must be well-formed.  But if you
> access the servlet directly you get a well-formed XML document
(mostly...):
> - using IE6 on win2000 displays the XML in it's default XSL tree form
> - using IE5.1 on os x gives a NullPointerException in the servlet at doGet
> - using Nav4.7 on linux asks if I want to download a text/xml file and
> allows me to save the stream to a file
> Here is an example of what gets returned:
> http://64.173.57.75:8080/master/ReturnPage?pageid=p0000000001
> (If this is not live when you look, email me and I will turn it on )
>
> Why doesn't the xsl template (above) work?
>
> The servlet basically accesses a "slave's" or "site-to-be-edited's"
> ServletContext and looks for the value of an attribute that matches the
> pageid and returns a stream with setContentType("text/xml").  The value of
> the attribute is a String read from the File (which is a well-formed
DocBook
> XML document) which was loaded in the from the filesytem at webapp
startup.I
> am most definitely open to suggestions on how to store a particular site's
> XML content in java objects (I am trying to avoid a DB to make it as
generic
> as possible) and how to deliver them to an XSL.
>
> Thanks,
> Rob
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords