Re: Base Data Type vs Data Type in Field Node Property



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/


.



Relevant Pages

  • Re: Big numbers
    ... entire query; they only implement part of it. ... specify the data type to use, before you can get data in a data type ... I've been talking about queries in general, not specifically ANSI SQL ...
    (comp.lang.c)
  • Re: Why in stdint.h have both least and fast integer types?
    ... There is no point making a data type "fast" if it is to be ... exactly 16 bits and another that behaves as if it has at least 16 bits. ... wouldn't prefer to specify that array as int16_t. ... architecture of the underlying machine (in this case, primary cache size) ...
    (comp.lang.c)
  • Re: Need help converting a Sined field
    ... if you are wanting the DATA TYPE of the resulting colum to be specified, you can use a data conversion function such as ... once the properties window is showing, you can type a format for your number by clicking in the appropriate column and filling the format property (if you choose from the drop-list, you can also specify the Decimal property -- specifying Decimal without Format has no effect). ... Just need a query or a way to convert the sined field into a large interger. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Excel assumes too much
    ... Steve Wilson. ... > The OpenText method allows you to specify the data type of each field. ... > Excel MVP ...
    (microsoft.public.excel.programming)

Quantcast