Solved

XPath and XQuery:   xs:decimal as a function

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle SQL syntax check  without executing 6 57
How do I remove an object from a 3 28
Eliminate additional border 1 18
Which non-HTML GUI front end to use with Java? 3 22
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

831 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