|
Home > Online Product Documentation > Table of Contents > Other Parts of the XQuery FLWOR Expression Other Parts of the XQuery FLWOR ExpressionWe have explored the five clauses of the FLWOR expression that give it its name. But there are a few details we have not touched on, partly because they are not used very often. They are summarized in this section. Declaring XQuery Types
In the
Declaring types can be useful as a way of asserting what you believe the results of the expressions are, and getting an error message (rather than garbage output) if you have made a mistake. It helps other people coming along later to understand what the code is doing, and to avoid introducing errors when they make changes. Unlike types declared in other contexts such as function signatures (and unlike variables in XSLT 2.0), the types you declare must be exactly right. The system does not make any attempt to convert the actual value of the expression to the type you declare - for example it will not convert an integer to a double, or extract the string value of an attribute node. If you declare the type as string but the expression delivers an attribute node, that is a fatal error. XQuery Position Variables
If you have used XSLT and XPath, you have probably come across the
This selects all the even-numbered videos - useful if you are arranging the data in a table. You can use
There are various keywords in the
Other things you can say in the order specification include defining whether empty values of the sort key (XQuery's equivalent of null values in SQL) should go at the start or end of the sequence, and whether the sort should be stable, in the sense that items with equal sort key values preserve their original order. Multiple AssignmentsOne simple syntax note. Instead of writing
you can write:
The meaning of both is the same. This same technique applies to
|
XSLT Profiler
Stylus Studio's XSL and XSLT profiler allows you to create detailed XSLT performance metrics profiles of any stylesheet in a processor-independent way.
Airlines, Aerospace and Defense
Want to know what airlines, aerospace and defense companies are soaring high with Stylus Studio 2006? Well now you can! Come check out these leading companies and soar with Stylus Studio 2006 yourself.
Saxon XSLT Processor
Stylus Studio® has partnered with Saxonica, a leading provider of Java-based XSLT and XQuery processing components to offer a robust XSLT 1.0 and 2.0 development environment, featuring development and deployment using the Saxon XSLT processor.
Learn SQL/XML
Learn how to access and update relational databases using industry-standard SQL/XML technologies along with Stylus Studio's DB-to-XML editor and File Explorer technologies.


