Re: [xslt] problems using document()



On Sun, Nov 07, 2004 at 10:00:45PM -0800, Casimir Loeber wrote:
> Hey,
> 
> Thanks for the reply, the only problem is that I don't always work with 
> the same xslt processor. I need to find a way to do this that is 
> portable. I have this script deployed on some servers that use 
> sablotron, and this doesn't work with it.
> 
> Is there a solution to my problem that uses straight xslt? And you said 

  No. You use a Result Tree Fragment in the place of a node-set, they 
are not compatible, and sablotron is just not conformant to the XSLT
specification.
    http://www.w3.org/TR/xslt#section-Result-Tree-Fragments

> 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.
In general I suggest you chech the compilance of your data and tools to follow
the specifications, that will help your build interoperable solutions.

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]