[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-user
Subject:    RE: Import schema for schema aware XQuery
From:       "Cezar Andrei" <cezar () bea ! com>
Date:       2007-11-14 18:04:21
Message-ID: BF6B6CA032BA0A429BD924F96765147D58E5B4 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

What query engine are you using?

From what I know, Saxon's free implementation doesn't support schema
aware XQuery. 

On the other hand, BEA's products do support schema aware XQuery based
on XMLBeans schema type systems.

 

Cezar

 

________________________________

From: Paul Hepworth [mailto:Paul.hepworth@detica.com] 
Sent: Wednesday, November 14, 2007 9:51 AM
To: user@xmlbeans.apache.org
Subject: Import schema for schema aware XQuery

 

Hi

 

I have a situation where I need to use a schema-aware XQuery, so I can
ensure that what the query is asking for is possible in the schema.

 

I tried adding a line like this...

import schema default element namespace "" at "videos.xsd"; 

...to the beginning of my call, so I have something like this:

myXmlObject.execQuery("import schema default element namespace '' at
'videos.xsd';" + getQuery());

 

However, I get an error XPST0003 stating "Import schema must appear
earlier in the prolog".

 

So it appears that XmlBeans is adding some default statements to the
beginning of my XQuery.

 

Is there a way to get my import statement into the query in the right
place? Or is schema-aware XQuery not possible in XmlBeans?

 

Many Thanks

Paul




This message should be regarded as confidential. If you have received
this email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard
copy by an authorised signatory. The contents of this email may relate
to dealings with other companies within the Detica Group plc group of
companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP,
England.


Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle20
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>What query engine are you \
using?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>From what I know, Saxon&#8217;s free
implementation doesn&#8217;t support schema aware XQuery. \
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>On the other hand, BEA&#8217;s products do
support schema aware XQuery based on XMLBeans schema type \
systems.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Cezar<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Paul Hepworth
[mailto:Paul.hepworth@detica.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, November 14, 2007
9:51 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName \
w:st="on">user@xmlbeans.apache.org</st1:PersonName><br> <b><span \
style='font-weight:bold'>Subject:</span></b> Import schema for schema aware \
XQuery</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>Hi</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>I have a situation where I need to use a&nbsp;schema-aware
XQuery, so I can ensure that what the query is asking for is possible in the
schema.</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>I tried adding a line like this...</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span class=jkeyword><b><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";font-weight:bold'>import
schema default element namespace</span></font></b></span><strong><b><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>
</span></font></b></strong><span class=jstring><b><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
font-weight:bold'>&quot;&quot;</span></font></b></span><strong><b><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> \
</span></font></b></strong><span class=jkeyword><b><font size=2 face="Courier \
New"><span style='font-size:10.0pt; font-family:"Courier \
New";font-weight:bold'>at</span></font></b></span><strong><b><font size=2 \
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> \
</span></font></b></strong><span class=jstring><b><font size=2 face="Courier \
New"><span style='font-size:10.0pt;font-family:"Courier New"; \
font-weight:bold'>&quot;videos.xsd&quot;</span></font></b></span><strong><b><font \
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier \
New"'>;</span></font></b></strong><strong><b><font size=2 face=Tahoma><span \
style='font-size:10.0pt;font-family:Tahoma'> \
</span></font></b></strong><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>...to the beginning of my call, so I have something like
this:</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><strong><b><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier \
New"'>myXmlObject.execQuery(&quot;</span></font></b></strong><span \
class=jkeyword><b><font size=2 face="Courier New"><span style='font-size:10.0pt; \
font-family:"Courier New";font-weight:bold'>import schema default element \
namespace</span></font></b></span><strong><b><font size=2 face="Courier New"><span \
style='font-size:10.0pt;font-family:"Courier New"'>&nbsp;'' \
</span></font></b></strong><span class=jkeyword><b><font size=2 face="Courier \
New"><span style='font-size:10.0pt; font-family:"Courier \
New";font-weight:bold'>at</span></font></b></span><strong><b><font size=2 \
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> \
'</span></font></b></strong><span class=jstring><b><font size=2 face="Courier \
New"><span style='font-size:10.0pt;font-family:"Courier New"; \
font-weight:bold'>videos.xsd'</span></font></b></span><strong><b><font size=2 \
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>;&quot; + \
getQuery());</span></font></b></strong><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>However, I get an error XPST0003 stating &quot;Import
schema must appear earlier in the prolog&quot;.</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>So it appears that XmlBeans is adding some default
statements to the beginning of my XQuery.</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>Is there a way to get my import statement into the query in
the right place? Or is schema-aware XQuery not possible in \
XmlBeans?</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>Many Thanks</span></font><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>Paul</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=1
face="Times New Roman"><span style='font-size:7.5pt'><br>
<br>
<br>
This message should be regarded as confidential. If you have received this
email in error please notify the sender and destroy it immediately.<br>
Statements of intent shall only become binding when confirmed in hard copy by
an authorised signatory. The contents of this email may relate to dealings with
other companies within the Detica Group plc group of companies.<br>
<br>
Detica Limited is registered in <st1:country-region w:st="on"><st1:place \
w:st="on">England</st1:place></st1:country-region> under No: 1337451.<br>
<br>
Registered offices: <st1:PlaceName w:st="on">Surrey</st1:PlaceName> <st1:PlaceName
w:st="on">Research</st1:PlaceName> <st1:PlaceType w:st="on">Park</st1:PlaceType>,
Guildford, <st1:place w:st="on"><st1:City w:st="on">Surrey</st1:City>, \
<st1:PostalCode  w:st="on">GU2 7YP</st1:PostalCode>, <st1:country-region \
w:st="on">England</st1:country-region></st1:place>.</span></font><o:p></o:p></p>

</div>

</div>

</body>

</html>
<br>
Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic