Solved

XPath and XQuery:   xs:decimal as a function

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
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.

726 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