XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
rajat nairSubject: relative uri
Author: rajat nair
Date: 23 Oct 2007 04:12 PM
Hi,
I m using the Stylus studio enterprise edition and is using it to map xml to xml.I then generate java code from the resulting xquery.

1)
I checked the xquery and wherever data needs to be inserted it gives
doc('file:///c:/Documents%20and%20Settings/rnair/Desktop/ackpo.xml') which is a absolute location on my desktop.I would like to change this as the incoming xml would be via http.
2)
The xquery uri mentioned in the java code is also absolute, For example:
String xqueryUrl = "file:///c:/test.xquery";
how do i go about putting in a relative uri in its place, so that i could place it in a package and deploy it clong with the class files to the server.
Any help would be greatly appreciated

Regards
Rj

Postnext
(Deleted User) Subject: relative uri
Author: (Deleted User)
Date: 25 Oct 2007 07:43 AM
Hi,

1) if you need to read the source XML from an HTTP server, just specify its address as the argument of the doc() function(e.g. doc("http://my.server.com/file.xml") )

2) if you intend to package the Java class file inside an application server, you could place the XQuery code as a literal string in the Java code, or inside a resource bundle.

Hope this helps,
Alberto

Posttop
rajat nairSubject: relative uri
Author: rajat nair
Date: 29 Oct 2007 04:01 PM
Hi,
ty for the prompt reply i manages to get that part of the program done based on the solution but was stuck on a couple of other issues regarding empty tag o/p.

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.