Solved

XPath and XQuery:   xs:decimal as a function

Posted on 2015-01-21
1
66 Views
Last Modified: 2015-01-22
In my particular tool I can not use format-number.  

I have seen references to xs:deciaml used as a function, and it apparently is offered by my tool

Assuming I want the equivalent of the following:

format-number(123, '0.009')

Open in new window


How would I do this with xs:deciaml ?

Thanks
0
Comment
Question by:Anthony Lucia
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 40563758
explain why you can't use format-number()
read: tell us more about your environment

xs:decimal casts a number to decimal if possible, but it is XPath 2.0 functionality
xs:decimal
- only works as a function in environments that also support format-number()
- does not format!, only casts

It could be that you are using some obscure subset of XQuery that does not serialize... then you need to take serialization outside the tool
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now