Re: Base Data Type vs Data Type in Field Node Property
- From: "Tomas Restrepo \(MVP\)" <tomasr@xxxxxxxx>
- Date: Fri, 5 Aug 2005 09:45:00 -0500
Mary,
>
> Can anyone explain the difference between these two properties in simple
> English?
>
> If I specify the Derived By property as Restriction, additional properties
> will be enabled. That's fine, and no need to mention this in your
> explanation. I just wonder, when to use Data Type. I mean should I specify
> the Data Type property too when I have specified the Base Data Type?
Usually, in the biztalk schema editor one deals mostly with elements and
attributes. When you create an element field, biztalk usually generates a
schema underneath with an <xs:element>. It also gives it a type by using the
type attribute on the node:
<xs:element name="field" type="xs:boolean"/>
Now, the type is actually defined in the Data Type property you can see in
the property grid for the element. However, if you change the Base Data Type
property, what happens is that the editor removes the type attribute from
the element definition, and then gives it an anonymous type that inherits
from the specified base XSD type. Example:
<xs:element name="Field">
<xs:simpleType>
<xs:restriction base="xs:boolean" />
</xs:simpleType>
</xs:element>
Notice how there's no type attribute on the element anymore, it is NOT
needed, since you're already specifying the type (a custom type that refines
the basic xs:boolean type). Now you can go ahead and add to the simpleType
definition any facets you need by adjusting the other properties, like
Pattern, minLength and so on. So, no, you either specify one, or the other.
It's interesting to mention that one does something similar for record
nodes, though through the use of the Data Structure property (which for
records is the equivalent of the Data Type property for other node types).
--
Tomas Restrepo
tomasr@xxxxxxxx
http://www.winterdom.com/
.
- References:
- Base Data Type vs Data Type in Field Node Property
- From: Mary L
- Base Data Type vs Data Type in Field Node Property
- Prev by Date: Re: Biztalk 2006 Applications
- Next by Date: Re: Splitting xml files using Document and Envelope Schemas
- Previous by thread: Base Data Type vs Data Type in Field Node Property
- Next by thread: Biztalk 2006 Applications
- Index(es):
Relevant Pages
|