Re: [xslt] problems using document()



On Mon, Nov 08, 2004 at 02:07:02AM -0500, Daniel Veillard wrote:
> > that document() can only open XHTML files.. the URL points to an xml 
> > file, not xhtml. I think the problem might lie in the fact that the URL 
> > given:
> > http://www.realtylink.org/listings/view.cfm?list_num=404700&AgentID=032428&XML=true
> > does not end in a .xml. It points to a script the generates the xml. How 
> 
> > could I slurp the xml into a variable and then process that... using 
> > only xslt.
> 
>   No, the problem is that the output of your script is not XML
> 
> paphio:~ -> xmllint --noout 'http://www.realtylink.org/listings/view.cfm?list_num=404700&AgentID=032428&XML=true'
> http://www.realtylink.org:55: parser error : Opening and ending tag mismatch: meta line 13 and head
> </head>
>        ^
> [... pages and pages of XML errors removed ]
> 
> Fix your script to generate XML.

  Dohh ! William pointed out that the document is actually well formed
if one use the unescaped URL. So that part should be just fine:

paphio:~ -> xmllint --noout 'http://www.realtylink.org/listings/view.cfm?list_num=404700&AgentID=032428&XML=true'
paphio:~ ->

  So there is just the Result Value Tree usage in XSLT which need to be fixed.
I suggest to use the test function to check if the exslt:node-set function is
availbale and use it if present. That should increase the portability of your
stylesheet:
   http://www.w3.org/TR/xslt#function-function-available

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]