You can generate an <a href=""/> HTML element in the output of the first query, and an <a name=""/> element in the output of the second query, so that the HTML generated by one query contains links to the HTML generated by the other query. Is that what you wanted?
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay



From: Michal Mlynarczyk [mailto:meho34@gmail.com]
Sent: 25 April 2010 19:19
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] Question

I'm sorry for not having a good explanation in my previous question.
 
If I have the XMl file 
 
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<bookstore>

<book category="WEB">
  <title lang="en">Learning XML</title>
  <author>Erik T. Ray</author>
  <year>2003</year>
  <price>39.95</price>
</book>

</bookstore>

and I write an xQuery and save it as Document1.xql
 
<ul>
{
for $x in doc("books.xml")/bookstore/book/title
order by $x
return <li>{data($x)}</li>
}
</ul>
 
 
Now I go in the cmd window and type: saxon Document1.xql > output.html
 
and this creates a file called output.html which I can open in my browser.
 
Now if I have another file called Document2.xql   
 
<ul>
{
for $x in doc("books.xml")/bookstore/book/author
order by $x
return <li>{data($x)}</li>
}
</ul>
 
I would like to tern this xquery file into an output2.html have it referenced in Document1.xql.  In other words I would like to make it into a link so that when I create output1.html with the list of titles, the titles are going to be link that will lead to Document2's output2.html.
 
Thank You
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
On Sun, Apr 25, 2010 at 1:46 PM, Michael Kay <mike@saxonica.com> wrote:
I'm sorry, I don't understand what you are asking. I assume that when you say "xql", you mean XQuery. What do you mean by "parsing an XQuery file into HTML"? Do you perhaps mean evaluating the query dynamically?
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay



From: Michal Mlynarczyk [mailto:meho34@gmail.com]
Sent: 25 April 2010 18:40
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Question

When I hava a xql (example1.xql)  file and inside of it I hava a referance to another xql (example2.xql) file. Is there special code that will allow me to parse example2.xql into html, all of it done inside example1.xql?

------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help