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: 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

 
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.