XML Tutorial/XML Schema/timeDuration — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:26, 26 мая 2010
A gestation period of about three and a half months.
<source lang="xml">
File: Schema.xsd <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru" elementFormDefault="qualified"> <xs:element name="gestation" type="xs:timeDuration" />
</xs:schema>
File: Data.xml <?xml version="1.0"?> <gestation xmlns="http://www.wbex.ru">P3M15D</gestation> Notice that you don"t have to specify all of the units. Only the initial P is always required. If the period contains time data, you must also add the T.</source>