XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Schematron and comma as a decimal delimiter

Hi Developers,

I have a b2b XML - message for which I need a schematron validation to check that a total amount of row amounts has been calculated correctly. Generally the rule would be described like this: 

<rule context="Invoice">
 <assert test="TotalAmount = sum(InvoiceRow/RowAmount)">
  TotalAmount doesn't match the sum of RowAmounts.
 </assert>
</rule>
 
<Invoice>
  <TotalAmount>100,00</TotalAmount>
  <InvoiceRow>  
    <RowAmount>30,00</RowAmount>
  </InvoiceRow>
  <InvoiceRow>  
    <RowAmount>70,00</RowAmount>
  </InvoiceRow>
</Invoice>

The problem is that a comma has been used as a decimal delimiter and sum() function seems to work only with dots. I tested translate() function but it seems to work only with a single node, not with a node-set. Is there any workaround available for my problem?

Thanks,

Juha Ikävalko
TIEKE Tietoyhteiskunnan kehittämiskeskus ry 
TIEKE Finnish Information Society Development Centre 
Salomonkatu 17 A, 10th floor FI-00100 Helsinki 
Tel +358 9 4763 0410 Fax +358 9 4763 0399 
juha.ikavalko@tieke.fi http://www.tieke.fi


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS