473,386 Members | 1,674 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

xquery help


(:// start/stop trace:)
(:
for $x in doc ($doc_name)/ProcessValueTrace/Trace,
$y in $x/StartTrace,
$z in $x/StopTrace
return
<Trace>
{ $y }
{ $z }

</Trace>
:)

(: open/close logical link by name - input $logicallink_name :)
(:
for $x in doc ($doc_name)/ProcessValueTrace/Trace,
$y in $x/OpenComPrimitive,
$t in $x/CloseComPrimitive
where (some $z in $y/LogicalLink satisfies
contains($z, string($logical_link_name)))
and (some $z2 in $t/LogicalLink satisfies
contains($z2, string($logical_link_name)) )

return
<Trace>

{ $y }
{ $t }

</Trace>
:)

(: open/close comprimitive by name - input $comprimitive_name :)
(:

for $x in doc ($doc_name)/ProcessValueTrace/Trace,
$y in $x/OpenComPrimitive,
$t in $x/CloseComPrimitive
where (contains($y/ShortName, string($comprimitive_name)))
and (contains($t/ShortName, string($comprimitive_name)))
return
<Trace>
{ $y }
{ $t }
</Trace>
:)
(:
let $request_ok:=false
if ($request_ok=true)
$y
else
"":)

(: result events - request - by pdu byte pattern (HEX) - input
$pdu_byte_pattern:string, $include_complete_result: boolean :)
let $doc_name:="can.xml"
let $include_complete_result:=true
let $pdu_byte_pattern:="1"

return
if ($include_complete_result=true) then

for $x in doc ($doc_name)/ProcessValueTrace/Trace
return
<Trace>
{
for $y in $x/DtsResult
let $bb:=for $xx in $y/DtsRequest where (contains($xx/PDU,
string($pdu_byte_pattern))) return $xx
return
if (not(empty($bb))) then
$y
else
""
}
</Trace>

else

for $x in doc ($doc_name)/ProcessValueTrace/Trace
return
<Trace>
{

for $y in $x/DtsResult
let $bb:=for $xx in $y/DtsRequest where (contains($xx/PDU,
string($pdu_byte_pattern))) return $xx
return
for $z in $y/DtsRequest
where (contains($z/PDU, string($pdu_byte_pattern)))
return
$z
}
</Trace>

(:
if (empty($bb)) then
""
else
return
<DtsResult>
{ $y/LogicalLink }
{ $y/ComPrimitive }

if (empty($bb)) then
""
else
</DtsResult>

:)

(: result events - request - parameter - by name - input
$parameter_name:string, $include_complete_result: boolean :)
(:
let $doc_name:="can.xml"
let $include_complete_result:=true
let $parameter_name:="localID"

return
if ($include_complete_result=true) then

for $x in doc ($doc_name)/ProcessValueTrace/Trace
return
<Trace>
{
for $y in $x/DtsResult
let $bb:=for $xx in $y/DtsRequest,
$yy in $xx/DtsRequestParameter where (contains($yy/PDU,
string($parameter_name))) return $xx
return
if (not(empty($bb))) then
$y
else
""
}
</Trace>

else

for $x in doc ($doc_name)/ProcessValueTrace/Trace
return
<Trace>
{

for $y in $x/DtsResult
return
<DtsResult>
{ $y/LogicalLink }
{ $y/ComPrimitive }
{ for $z in $y/DtsRequest
where (contains($z/PDU, string($parameter_name)))
return
$z
}
</DtsResult>
}
</Trace>
:)

Nov 7 '05 #1
0 1200

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Benjamin G. Jones | last post by:
I am having a very basic problem with XQuery. I want to use an XQuery API in Java (either Saxon or Qexo), and I have an XQuery expression that works as expeced from the command line if I specify...
4
by: Jeff Kish | last post by:
Hi. I see it appears that xquery is case senstitive for looking for particular attribute values etc. Is there a standard way around this? Say I want to see all nodes with an attribute valued...
0
by: Tony Lavinio | last post by:
Dear Stylus Studio Friends, The new year is scarcely one month old, but we already have lots to report! For starters, there's Stylus Studio 6 Release 2. The latest release of Stylus Studio...
0
by: Tony Lavinio | last post by:
Dear comp.text.xml community, Microsoft recently announced that they are dropping XQuery from their next release of the .NET Framework, 2.0 (Whidbey). Since Microsoft ships .NET Framework only...
1
by: FBS | last post by:
Hi everybody, I wonder if somebody could help me with this issue. I would like to rum some XQuery codes aginst my XML files and since I'm quite new in this area I'm not sure what to do. It is...
0
by: Stylus Studio | last post by:
DataDirect XQuery(TM) is the First Embeddable Component for XQuery That is Modeled after the XQuery API for Java(TM) (XQJ) BEDFORD, Mass.--Sept. 20, 2005--DataDirect Technologies...
2
by: BK | last post by:
I am working on system that will have a cataloging component which would essentially be a Folder/File structure. So far I have coded the Iteration over a selected folder and am displaying the...
2
by: tammo.mueller | last post by:
Hi, I'm trying to execute a xquery statement and I get always errors. It seems that only the prolog section is giving me errors. If I want to declare a namespace the xquery processor is coming...
5
by: CK | last post by:
I have the following XML in an XML column in a SQL 2005 Database. <DeliveryList xmlns="http://schemas.adventure-works.com/DeliverySchedule"> <Delivery SalesOrderID="43659"> <CustomerName>Steve...
4
by: Pascal Sartoretti | last post by:
Hello, I want to process big files (e.g. 100 MB) with XQuery. Are there XQuery processors that work in a "SAX-like" way (and not DOM-like), i.e. which don't assume that they have everything in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.