Groups | Blog | Home
all groups > dotnet xml > october 2005 >

dotnet xml : attributes and simple types- the simple made difficult


rossu
10/12/2005 12:57:06 PM
I want to do something like
<distance units="inches">15.0</distance>
for validation reasons, I want to put a facet on the value so it can't be
negative. To include an attribute, the schema editor forces me to have a
complex type. How then do I apply the facet? The .net schema editor wants
to do something like

element distance (distance)

distance
attribute units string

At this point I don't see how I can put the restriction (facet) on the
element value. The editor wants to force me to put in something on the next
Pascal Schmitt
10/12/2005 11:50:49 PM
Hello!

Try the simpleContent-Element. It allows you to create a complex type
(with attributes) wich has simple content like a simple type.


--
AddThis Social Bookmark Button