xquery

XQuery execution without a software

How can we execute Xquery embedded inside Html or with a reference to an xquery document within html? is there a JavaScript method ? or ASP DOM method ? ...

How to validate XQuery source file for XSD schema

I mean without input XML file. I'm using Saxon-EE 9.2. ...

from relational tables to nested XML output file

Using IBM DB2 database, I have a three relational tables: Project: id, title, description Topic: projectId, value Tag: projectId, value I need to produce the following XML file from the previous table: <projects> <project id="project1"> <title>title1</title> <description>desc1</description> ...

Integrate Processor in a browser?

How to integrate Saxon-EE Processor in a web browser like IE? ...

How to get SQL Server XQUERY to return something other than "There is no element named [Element]"

Apologies if this is answered elsewhere. I keep getting the error message XQuery [Mytable.XMLData.nodes()]: There is no element named 'Answer' SELECT ref.value('/','nvarchar(1000)') FROM Mytable CROSS APPLY xmldata.nodes('Answer') R(ref) - --XML of Row <Answer xmlns="http://TempNameSpace.com/AnswerData.xsd" Type="Deliverable"> <...

How to convert nested heirarchy of xml to sql table

Using MSSQL 2008 and XQUERY Consider the following XML stored in a table: <ROOT> <WrapperElement> <ParentElement ID=1> <Title>parent1</Title> <Description /> <ChildElement ID="6"> <Title>Child 4</Title> <Description /> <StartDate>2010-01-25T00:00:00</StartDate> <EndDate>2010-01-25...

Are XQuery grouping and aggregate functions always slow?

Take a simple OrderDetail table which has a Quantity and UnitPrice for each record. To get the total value of each Order with SQL it's simple as SELECT OrderID, SUM(UnitPrice*Quantity) FROM OrderDetail GROUP BY OrderID After converting the table to a XML file, using XQUERY I'm able to get the same information like this for $orderId ...

Any implementations of XQueryX?

I'm looking for a way to convert XQuery expressions into XQueryX (an XML syntax for XQuery). Does anyone know of any implementation -- say in Python or Java? ...

How to get element type in xpath?

My xml is: <record> <field name="f1"/> <id name="f2"/> <id name="f3"/> <field name="f4"/> <info/> </record> I want to loop through it in xquery like this: for $i in $records/record/field | $records/record/id return if ( .... $i is id .... ) then .... do something .... else ... do something else ... Is this possible? Ho...

XQUERY Load XML to be processed by XQIB

How can we load an xml document with xquery to be parsed by the XQIB processor integrated in IE browser. Notice that the doc("doc.xml") is not supported to use with XQIB Processor. ...

Open source XQuery projects

Do you know about any open source projects written in XQuery? The larger the better. I want to improve my XQuery skills by reading existing code. ...

How to create delte function in XQuery

I met a problem when I try to create delete function,my current codes are: Xquery: declare variable $d as xs:string; declare variable $p as xs:string; let $xp := saxon:evaluate(concat("doc('",$d,"')",$p)) return document {for $n in doc($d)/* return qsx10p8:delete($n, $xp)} declare function qsx10p8:delete ($n as node(), $xp as node()...

SQL Server 2005 XML Query

Hi, I'm new to querying XML datatype in SQL Server 2005. Anyone can help me create a query for my requirement? Here's a scenario of my column. Column Name: Cabinet /*Row 1 XML Data*/ <shelf> <box> <item type="pencil" color="blue"/> <item type="pencil" color="red"/> <item type="paper" color="white"/> <item type="ribbon" co...

xQuery local-name vs xPath with html

assuming the following html (minus the comments and "nbsp;" etc that xQuery wont process as is) why does this following code work for $first in fn:doc("file:///index.html")//element()[local-name() = "head"] return <test>{ $first }</test> and this for $first in fn:doc("file:///index.html")//head return <test>{ $first }</test> ...

XQuery - problem with recursive function

Hi all, Im new on this project and am going to write, what i thought was a simple thing. A recursive function that writes nested xml elements in x levels (denoted by a variable). So far I have come up with this, but keeps getting a compile error. Please note that i have to generate new xml , not query existing xml: xquery version "1...

Does an XML schema or DTD exist for PerformancePoint's Xml Metadata?

I wrote several XQuery statements to shred existing KPI and Dashboard metadata but I would like to validate my queries by reviewing the corresponding Xml Schema or DTD if it exists. I searched online but could not find what i was looking for. The metadata is stored in Performance Point's back end Sql Server database in the dbo.FCObjects...

How should I represent revisions in an XML database?

I would like to use an XML database like eXist to store and query editable form submissions, with a changelog storing prior versions of each document. How should I structure the database to easily query the latest version of each document? ...

Testing an XQuery Transformation

Hi, I'm using Workshop for Weblogic and I'm testing an XQuery Transformation. Both MFL and XSD are valid. But the XQuery doesn't seem to work... it gives me this error: Error occurred while executing XQuery: loader constraint violation: when resolving method "javax.xml.stream.XMLInputFactory.createXMLStreamReader(Ljava/io/Reader;)Ljava...

How to get tag parameter value with XQuery

For example i have this xml. I need to get value of parameter val of tag foo with id="two" <top> <sub id="one"> <foo id="two" val="bar" /> sometext </sub> </top> Whis this query (using Qt QXmlQuery): doc('test.xml')/top/sub[@id='one']/foo[@id='two']/<p>{@val}</p> I receive <p val="bar"/>, but I need only tex...

Copy data from one table Column another table Xml Node with many to one relation

I have two tables like this declare @Habits_new table(ID int,Habits xml default '<habits></habits>') declare @Habits_OLD table (ID varchar(50), Habit varchar(50)) Having data Like this INSERT @Habits_new values(1,'<habits><habit>Drink</habit></habits>') INSERT @Habits_new values(2,'<habits><habit>snor</habit></habits>') INSERT @Habi...