This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
xquery document() alternatives?
- From: "Lucian Gheorghe" <lucian_in_kobe at hotmail dot com>
- To: kawa at sources dot redhat dot com
- Date: Fri, 03 Jan 2003 17:24:38 +0900
- Subject: xquery document() alternatives?
- Bcc:
<Marc Martinez
<does anybody have suggestions on how to get around the xquery document()
<function's requirement for a url-accessible source?
....
Not sure this is what you need. I used this in a java module loadable into
xquery to implement a function that queries a xml database and returns a
document (like a wrapper over document())
//result is a java.lang.String that represents an XML - the result of a
search on our xml //database
SourceMessages messages = new SourceMessages();
TreeList doc = new TreeList();
XMLParser parser
= new XMLParser(new LineBufferedReader( new
java.io.StringReader(result)),
(Consumer) new NamespaceResolver(doc),messages);
doc.beginDocument();
parser.parse();
if (messages.seenErrors())
throw new SyntaxException(messages);
doc.endDocument();
Then u can use doc as a document.
Hope I got the right meaning from your question .
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail