Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Non-negative decimal with attribute

Reply
Thread Tools

Non-negative decimal with attribute

 
 
kanpeter
Guest
Posts: n/a
 
      10-20-2010
How can i declare some kind of element like currency which take non-
negative decimal with attribute like
<Buy currency="USD">7.8</Buy>
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      10-20-2010
kanpeter wrote:
> How can i declare some kind of element like currency which take non-
> negative decimal with attribute like
> <Buy currency="USD">7.8</Buy>


Define a simple type for the element content, then define the Buy
element and its attribute as shown in
http://www.w3.org/TR/xmlschema-0/#complexTfromSimpleT

--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
decimal.Decimal formatting python@lists.fastmail.net Python 0 07-19-2010 12:32 PM
how to convert from Decimal('1.23456789') to Decimal('1.234') valpa Python 11 03-24-2009 07:11 AM
Error: Cannot convert Decimal("0.0000") to Decimal Vitaliy Python 1 05-29-2008 10:36 AM
TypeError: unsupported operand type(s) for -: 'Decimal' and 'Decimal'. Why? Gilbert Fine Python 8 08-01-2007 01:58 AM
Decimal to Packed Decimal Conversion in C++ Ven C++ 3 08-01-2006 03:56 PM



Advertisments