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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2017)
-> + Issue with Processing Instruct... (2)
-> + problem converting json to XML... (2)
-> + Problem base64 decoding string... (3)
-> + Problems posting multipart for... (5)
-> + trouble with download of price... (2)
-> + Problem with http-post not bei... (3)
-> + path problem, xps_file:writeAl... (9)
-> + Xquery update support? (2)
-> + problem with Stylus studio try... (5)
-> + adding dtd reference to xml ou... (4)
-> + xquery escaping ambarsand when... (3)
-> + Whitespace problem when return... (5)
-> + Problem with namespace prefix ... (5)
-> - Sending via SFTP returns unexp... (1)
-> + Query and Sftp clent (4)
-> + xquery and try - catch (3)
-> + Query + ddtek:http-post optio... (5)
-> + Example files referenced in do... (3)
-> + Automatic Error Detection and ... (3)
-> + Working with result of ddtek:h... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Rajat NairSubject: Addnamespace using xquery
Author: Rajat Nair
Date: 07 Aug 2007 04:43 PM
Hi,
I mapped out a OAG format xml to a xcbl sox type xml using the mapping utility in stylus studio, and finally converted the generated xquery code into java.When i now pass a OAG fomat xml to this code from the command line the new xml generated does not have the namespace
"?soxtype urn:x-commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0?> <?import urn:x-commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0?> " that xcbl sox(3.0) type xml's usually have.I was wondering if there was any way to add the name space using the xquery code or during mapping of the 2 xml files??

The second question i had was when i try to generate the java code there is no option in the trial version i have to generate a standalone application as shown in the tutorial?
I hope i can get these issues resolved at the earliest.

Regards
Rj

Postnext
Ivan PedruzziSubject: Addnamespace using xquery
Author: Ivan Pedruzzi
Date: 07 Aug 2007 05:51 PM

Hi Rajat,

From your description it seems like that you are missing two processing instructons, in xquery you can write the following

processing-instruction {"soxtype"} {"commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0"},
processing-instruction {"import"} {"urn:x-commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0"}

If this is not what you are looking for could you please send the xquery code and an example of XML input and the desired result to stylus-field-report@progress.com?

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Rajat NairSubject: Addnamespace using xquery
Author: Rajat Nair
Date: 08 Aug 2007 12:54 PM
Hi ,
I added the processing instruction to the xquery file i had and now this error gets thrown out

XQuery starting.
Error on line 6 column 15 of file:///c:/conversion/first_trial.xquery:
XPST0003: XQuery syntax error in #...sox$1.0"} <OrderResponse> <#:
Unexpected token ">" beyond end of query
Exception in thread "main" ; SystemID: file:///c:/conversion/first_trial.xquery;
Line#: 6; Column#: 15
net.sf.saxon.trans.StaticError: XQuery syntax error in #...sox$1.0"} <OrderRespo
nse> <#:
Unexpected token ">" beyond end of query
at net.sf.saxon.query.QueryParser.grumble(QueryParser.java:325)
at net.sf.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:136)

at net.sf.saxon.query.QueryParser.parseQuery(QueryParser.java:260)
at net.sf.saxon.query.QueryParser.makeXQueryExpression(QueryParser.java:
99)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext
.java:452)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext
.java:487)

Regards
Rj

Posttop
Ivan PedruzziSubject: Addnamespace using xquery
Author: Ivan Pedruzzi
Date: 08 Aug 2007 04:09 PM

Rajat,

The syntax used is wrong, you have to use comma not semicolon.

...

processing-instruction {"soxtype"} {"commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0"},
processing-instruction {"import"} {"urn:x-commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0"},
<OrderResponse>


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

   
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.