Solved

XPath and XQuery:   xs:decimal as a function

Posted on 2015-01-21
1
68 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

947 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

20 Experts available now in Live!

Get 1:1 Help Now