Because I am constantly busy working on something, I have never had time to actually put everything in words and pictures. But, since you got here, then you must have already seen some part of my work - and this is the way I’m talking.I'm 23, born in Romania, student at UPG Romania in software development field. I started from 0, mostly with basic stuff, and I’m evolving every day to an expert. I'm focused on freelancing projects, from small websites, to really heavy stuff. I know that I look and act differently from most developers, but this is why you will love to work with me!

Wednesday, March 24, 2010

Declare the Coolest XQuery Variables


Here's how to declare some important variables in XQuery:

Use this variable to pass an XML tree to a XQuery query.
declare variable $v as document-node(element(*,xdt:untyped)) external;:
These declare an XQuery variable into a namespace.
declare namespace nameSpace="http://nameSpace.org";
declare variable $nameSpace:v as xs:decimal:= 0.19;
This declares an XQuery variable that acts as an XML node.
declare variable $v as node() := ...:
Declares an XQuery variable that acts as an XML attribute.
declare variable $v as attribute() := ...: 
Declares an XQuery variable that acts as a XML element.
declare variable $v as element() := ...: 

No comments: