datatypes-src.xml 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/css" href="chapter.css"?>
  3. <chapter id="datatypes.xml">
  4. <title>Datatype Reference Guide</title>
  5. <para>This chapter provides a quick reference to all of the datatypes W3C XML Schema defines. Each datatype is listed with the list of its Relax NG datatype parameters (this list correspond to the list of W3C XML Schema facets available for the datatype with the exception of the <literal>whiteSpace</literal> facet which is not supported by Relax NG), as well as information about what it represents and how. For the so called "secondary datatypes" (i.e. the W3C XML Schema builtin types which are derived from another builtin type), the synopsis shows the formal definition of the type using W3C XML Schema syntax. Examples are given for all these datatypes.</para>
  6. <refentry id="ch16-77006">
  7. <refmeta>
  8. <refentrytitle>xsd:anyURI</refentrytitle>
  9. </refmeta>
  10. <refnamediv>
  11. <indexterm id="IXT-16-166124"><primary>xsd:anyURI type</primary></indexterm><refname>xsd:anyURI</refname>
  12. <refpurpose>URI (Uniform Resource Identifier).
  13. </refpurpose>
  14. </refnamediv>
  15. <refsect1>
  16. <title>Derived from:</title>
  17. <para>xsd:anySimpleType </para>
  18. </refsect1>
  19. <refsect1>
  20. <title>Primary:</title>
  21. <para>xsd:anyURI </para>
  22. </refsect1>
  23. <refsect1>
  24. <title>Known subtypes:</title>
  25. <para>none</para>
  26. </refsect1>
  27. <refsect1>
  28. <title>Facets:</title>
  29. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  30. <emphasis>xsd:whiteSpace</emphasis>
  31. </para>
  32. </refsect1>
  33. <refsynopsisdiv>
  34. <synopsis>
  35. &lt;xsd:simpleType name="anyURI" id="anyURI"&gt;
  36. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  37. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  38. &lt;/xsd:restriction&gt;&lt;/xsd:simpleType&gt;
  39. </synopsis>
  40. </refsynopsisdiv>
  41. <refsect1>
  42. <title>Description</title>
  43. <para>This datatype corresponds normatively to the XLink
  44. <literal>href</literal> attribute. Its value space includes the URIs
  45. defined by the RFCs 2396 and 2732, but its lexical space
  46. doesn't require the character escapes needed to
  47. include non-ASCII characters in URIs.
  48. </para>
  49. </refsect1>
  50. <refsect1>
  51. <title>Restrictions</title>
  52. <para>Relative URIs are not "absolutized"
  53. by W3C XML Schema. A pattern defined as:
  54. </para>
  55. <programlisting>&lt;data type="xsd:anyURI"&gt;
  56. &lt;choice"&gt;
  57. &lt;value type="xsd:anyURI">http://www.w3.org/TR/xmlschema-0/&lt;/value&gt;
  58. &lt;value type="xsd:anyURI">http://www.w3.org/TR/xmlschema-1/&lt;/value&gt;
  59. &lt;value type="xsd:anyURI">http://www.w3.org/TR/xmlschema-2/&lt;/value&gt;
  60. &lt;/choice&gt;
  61. &lt;/data&gt;</programlisting>
  62. <para>should not match the <literal>href</literal> attribute in this
  63. instance element:
  64. </para>
  65. <programlisting>&lt;a xml:base="http://www.w3.org/TR/" href="xmlschema-1/"&gt;
  66. XML Schema Part 2: Datatypes
  67. &lt;/a&gt; </programlisting>
  68. <para>The Recommendation states that "it is impractical
  69. for processors to check that a value is a context-appropriate URI
  70. reference," freeing schema processors from having to
  71. validate the correctness of the URI.
  72. </para>
  73. </refsect1>
  74. <refsect1>
  75. <title>Example</title>
  76. <programlisting>&lt;define name="httpURI"&gt;
  77. &lt;data type="xsd:anyURI"&gt;
  78. &lt;param name="pattern">http://.*&lt;param&gt;
  79. &lt;/data&gt;
  80. &lt;/define&gt;</programlisting>
  81. </refsect1>
  82. </refentry>
  83. <refentry id="ch16-77011">
  84. <refmeta>
  85. <refentrytitle>xsd:base64Binary</refentrytitle>
  86. </refmeta>
  87. <refnamediv>
  88. <indexterm id="IXT-16-166125"><primary>xsd:base64Binary type</primary></indexterm><refname>xsd:base64Binary</refname>
  89. <refpurpose>Binary content coded as "base64".
  90. </refpurpose>
  91. </refnamediv>
  92. <refsect1>
  93. <title>Derived from:</title>
  94. <para>xsd:anySimpleType </para>
  95. </refsect1>
  96. <refsect1>
  97. <title>Primary:</title>
  98. <para>xsd:base64Binary </para>
  99. </refsect1>
  100. <refsect1>
  101. <title>Known subtypes:</title>
  102. <para>none</para>
  103. </refsect1>
  104. <refsect1>
  105. <title>Facets:</title>
  106. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  107. <emphasis>xsd:whiteSpace</emphasis>
  108. </para>
  109. </refsect1>
  110. <refsynopsisdiv>
  111. <synopsis>
  112. &lt;xsd:simpleType name="base64Binary" id="base64Binary"&gt;
  113. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  114. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  115. &lt;/xsd:restriction&gt;
  116. &lt;/xsd:simpleType&gt;
  117. </synopsis>
  118. </refsynopsisdiv>
  119. <refsect1>
  120. <title>Description</title>
  121. <para>The value space of <literal>xsd:base64Binary</literal> is the set of
  122. arbitrary binary contents. Its lexical space is the same set after
  123. base64 coding. This coding is described in Section 6.8 of RFC 2045.
  124. </para>
  125. </refsect1>
  126. <refsect1>
  127. <title>Restrictions</title>
  128. <para>RFC 2045 has been defined to transfer binary contents over text-based
  129. mail systems. It imposes a line break at least every 76 characters to
  130. avoid the inclusion of arbitrary line breaks by the mail systems.
  131. Sending base64 content without line breaks is nevertheless a common
  132. usage for applications such as SOAP and the W3C XML Schema Working
  133. Group. After a request from other W3C Working Groups, the W3C XML
  134. Schema Working Group decided to remove the obligation to include
  135. these line breaks from the constraints on the lexical space. (This
  136. decision was made after the publication of the W3C XML Schema
  137. Recommendation and has been included in a release of the errata.)
  138. </para>
  139. </refsect1>
  140. <refsect1>
  141. <title>Example</title>
  142. <programlisting>&lt;define name="picture"&gt;
  143. &lt;attribute name="type">
  144. &lt;ref name="graphicalFormat"/&gt;
  145. &lt;/attribute>
  146. &lt;data type="xsd:base64Binary"&gt;
  147. &lt;/define&gt;</programlisting>
  148. </refsect1>
  149. </refentry>
  150. <refentry id="ch16-77016">
  151. <refmeta>
  152. <refentrytitle>xsd:boolean</refentrytitle>
  153. </refmeta>
  154. <refnamediv>
  155. <indexterm id="IXT-16-166126"><primary>xsd:boolean type</primary></indexterm><refname>xsd:boolean</refname>
  156. <refpurpose>Boolean (true or false).
  157. </refpurpose>
  158. </refnamediv>
  159. <refsect1>
  160. <title>Derived from:</title>
  161. <para>xsd:anySimpleType </para>
  162. </refsect1>
  163. <refsect1>
  164. <title>Primary:</title>
  165. <para>xsd:boolean </para>
  166. </refsect1>
  167. <refsect1>
  168. <title>Known subtypes:</title>
  169. <para>none</para>
  170. </refsect1>
  171. <refsect1>
  172. <title>Facets:</title>
  173. <para>xsd:pattern, <emphasis>xsd:whiteSpace</emphasis> </para>
  174. </refsect1>
  175. <refsynopsisdiv>
  176. <synopsis>
  177. &lt;xsd:simpleType name="boolean" id="boolean"&gt;
  178. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  179. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  180. &lt;/xsd:restriction&gt;
  181. &lt;/xsd:simpleType&gt;
  182. </synopsis>
  183. </refsynopsisdiv>
  184. <refsect1>
  185. <title>Description</title>
  186. <para>The value space of <literal>xsd:boolean</literal> is
  187. "true" and
  188. "false," and its lexical space
  189. accepts true, false, and also "1"
  190. (for true) and "0" (for false).
  191. </para>
  192. </refsect1>
  193. <refsect1>
  194. <title>Restrictions</title>
  195. <para>This datatype cannot be localized&#8212;for instance, to accept
  196. "vrai" and
  197. "faux" instead of
  198. "true" and
  199. "false".
  200. </para>
  201. </refsect1>
  202. <refsect1>
  203. <title>Example</title>
  204. <programlisting>&lt;book id="b0836217462" available="true"/&gt;</programlisting>
  205. </refsect1>
  206. </refentry>
  207. <refentry id="ch16-77021">
  208. <refmeta>
  209. <refentrytitle>xsd:byte</refentrytitle>
  210. </refmeta>
  211. <refnamediv>
  212. <indexterm id="IXT-16-166127"><primary>xsd:byte type</primary></indexterm><refname>xsd:byte</refname>
  213. <refpurpose>Signed value of 8 bits.
  214. </refpurpose>
  215. </refnamediv>
  216. <refsect1>
  217. <title>Derived from:</title>
  218. <para>xsd:short </para>
  219. </refsect1>
  220. <refsect1>
  221. <title>Primary:</title>
  222. <para>xsd:decimal </para>
  223. </refsect1>
  224. <refsect1>
  225. <title>Known subtypes:</title>
  226. <para>none</para>
  227. </refsect1>
  228. <refsect1>
  229. <title>Facets:</title>
  230. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  231. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  232. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  233. </para>
  234. </refsect1>
  235. <refsynopsisdiv>
  236. <synopsis>
  237. &lt;xsd:simpleType name="byte" id="byte"&gt;
  238. &lt;xsd:restriction base="xsd:short"&gt;
  239. &lt;xsd:minInclusive value="-128"/&gt;
  240. &lt;xsd:maxInclusive value="127"/&gt;
  241. &lt;/xsd:restriction&gt;
  242. &lt;/xsd:simpleType&gt;
  243. </synopsis>
  244. </refsynopsisdiv>
  245. <refsect1>
  246. <title>Description</title>
  247. <para>The value space of <literal>xsd:byte</literal> is the integers between
  248. -128 and 127, i.e., the signed values that can fit in a word of 8
  249. bits. Its lexical space allows an optional sign and leading zeros
  250. before the significant digits.
  251. </para>
  252. </refsect1>
  253. <refsect1>
  254. <title>Restrictions</title>
  255. <para>The lexical space does not allow values expressed in other numeration
  256. bases (such as hexadecimal, octal, or binary).
  257. </para>
  258. </refsect1>
  259. <refsect1>
  260. <title>Example</title>
  261. <para>Valid values for byte include 27, -34, +105, and 0. </para>
  262. <para>Invalid values include 0A, 1524, and INF.</para>
  263. </refsect1>
  264. </refentry>
  265. <refentry id="ch16-77026">
  266. <refmeta>
  267. <refentrytitle>xsd:date</refentrytitle>
  268. </refmeta>
  269. <refnamediv>
  270. <indexterm id="IXT-16-166128"><primary>xsd:date type</primary></indexterm><refname>xsd:date</refname>
  271. <refpurpose>Gregorian calendar date.
  272. </refpurpose>
  273. </refnamediv>
  274. <refsect1>
  275. <title>Derived from:</title>
  276. <para>xsd:anySimpleType </para>
  277. </refsect1>
  278. <refsect1>
  279. <title>Primary:</title>
  280. <para>xsd:date </para>
  281. </refsect1>
  282. <refsect1>
  283. <title>Known subtypes:</title>
  284. <para>none</para>
  285. </refsect1>
  286. <refsect1>
  287. <title>Facets:</title>
  288. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  289. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  290. </para>
  291. </refsect1>
  292. <refsynopsisdiv>
  293. <synopsis>
  294. &lt;xsd:simpleType name="date" id="date"&gt;
  295. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  296. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  297. &lt;/xsd:restriction&gt;
  298. &lt;/xsd:simpleType&gt;
  299. </synopsis>
  300. </refsynopsisdiv>
  301. <refsect1>
  302. <title>Description</title>
  303. <para>This datatype is modeled after the calendar dates defined in Chapter
  304. 5.2.1 of ISO 8601. Its value space is the set of Gregorian calendar
  305. dates as defined by this standard; i.e., a one-day-long period of
  306. time. Its lexical space is the ISO 8601 extended format
  307. "[-]CCYY-MM-DD[Z|(+|-)hh:mm]" with
  308. an optional timezone. Timezones that are not specified are considered
  309. "undetermined."
  310. </para>
  311. </refsect1>
  312. <refsect1>
  313. <title>Restrictions</title>
  314. <para>The basic format of ISO 8601 calendar dates
  315. "CCYYMMDD" is not supported.
  316. </para>
  317. <para>The other forms of dates available in ISO 8601&#8212;ordinal dates
  318. defined by the year and the number of the day in the year and dates
  319. identified by calendar week and day numbers&#8212;are not supported.
  320. </para>
  321. <para>As the value space is defined by reference to ISO 8601, there is no
  322. support for any calendar system other than Gregorian.
  323. </para>
  324. <para>As the lexical space is also defined as reference to ISO 8601, there
  325. is no support for any localization such as different orders for date
  326. parts or named months.
  327. </para>
  328. <para>The order relation between dates with and without timezone is
  329. partial: they can be compared only outside of a +/- 14 hours
  330. interval.
  331. </para>
  332. <para>There is a dissension between ISO 8601 which defines a day as a
  333. period of time of 24 hours, and W3C XML Schema, which indicates that
  334. a date is a "one-day long, non-periodic instance . .
  335. . independent of how many hours this day has." Even
  336. though technically right (some days do not last exactly 24 hours
  337. because of leap seconds), this definition is not coherent with the
  338. definition of <literal>xsd:duration</literal> for which a day is
  339. always exactly 24 hours long.
  340. </para>
  341. </refsect1>
  342. <refsect1>
  343. <title>Example</title>
  344. <para>Valid values include: <literal>"2001-10-26"</literal>,
  345. <literal>"2001-10-26+02:00"</literal>,
  346. <literal>"2001-10-26Z"</literal>,
  347. <literal>"2001-10-26+00:00"</literal>,
  348. <literal>"-2001-10-26"</literal>, or
  349. <literal>"-20000-04-01"</literal>.
  350. </para>
  351. <para>The following values would be invalid: <literal>"2001-10"</literal>
  352. (all the parts must be specified), <literal>"2001-10-32"</literal>
  353. (the days part (32) is out of range),
  354. <literal>"2001-13-26+02:00"</literal> (the month part (13) is out of
  355. range), or <literal>"01-10-26"</literal> (the century part is
  356. missing).
  357. </para>
  358. </refsect1>
  359. </refentry>
  360. <refentry id="ch16-77031">
  361. <refmeta>
  362. <refentrytitle>xsd:dateTime</refentrytitle>
  363. </refmeta>
  364. <refnamediv>
  365. <indexterm id="IXT-16-166129"><primary>xsd:dateTime type</primary></indexterm><refname>xsd:dateTime</refname>
  366. <refpurpose>Instant of time (Gregorian calendar).
  367. </refpurpose>
  368. </refnamediv>
  369. <refsect1>
  370. <title>Derived from:</title>
  371. <para>xsd:anySimpleType </para>
  372. </refsect1>
  373. <refsect1>
  374. <title>Primary:</title>
  375. <para>xsd:dateTime </para>
  376. </refsect1>
  377. <refsect1>
  378. <title>Known subtypes:</title>
  379. <para>none</para>
  380. </refsect1>
  381. <refsect1>
  382. <title>Facets:</title>
  383. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  384. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  385. </para>
  386. </refsect1>
  387. <refsynopsisdiv>
  388. <synopsis>
  389. &lt;xsd:simpleType name="dateTime" id="dateTime"&gt;
  390. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  391. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  392. &lt;/xsd:restriction&gt;
  393. &lt;/xsd:simpleType&gt;
  394. </synopsis>
  395. </refsynopsisdiv>
  396. <refsect1>
  397. <title>Description</title>
  398. <para>This datatype describes instants identified by the combination of a
  399. date and a time. Its value space is described as a
  400. "combination of date and time of
  401. day" in Chapter 5.4 of ISO 8601. Its lexical space
  402. is the extended format
  403. "[-]CCYY-MM-DDThh:mm:ss[Z|(+|-)hh:mm]".
  404. The timezone may be specified as
  405. "Z" (UTC) or
  406. "(+|-)hh:mm." Timezones that are
  407. not specified are considered
  408. "undetermined."
  409. </para>
  410. </refsect1>
  411. <refsect1>
  412. <title>Restrictions</title>
  413. <para>The basic format of ISO 8601 calendar datetimes
  414. "CCYYMMDDThhmmss" is not supported.
  415. </para>
  416. <para>The other forms of datetimes available in ISO 8601&#8212;ordinal
  417. dates defined by the year and the number of the day in the year and
  418. dates identified by calendar week and day numbers&#8212;are not
  419. supported.
  420. </para>
  421. <para>As the value space is defined by reference to ISO 8601, there is no
  422. support for any calendar system other than Gregorian.
  423. </para>
  424. <para>As the lexical space is also defined as reference to ISO 8601, there
  425. is no support for any localization such as different orders for date
  426. parts or named months.
  427. </para>
  428. <para>The order relation between datetimes with and without timezone is
  429. partial: they can be compared only outside of a +/- 14 hours
  430. interval.
  431. </para>
  432. </refsect1>
  433. <refsect1>
  434. <title>Example</title>
  435. <para>Valid values for <literal>xsd:dateTime</literal> include:
  436. <literal>"2001-10-26T21:32:52"</literal>,
  437. <literal>"2001-10-26T21:32:52+02:00"</literal>,
  438. <literal>"2001-10-26T19:32:52Z"</literal>,
  439. <literal>"2001-10-26T19:32:52+00:00"</literal>,
  440. <literal>"-2001-10-26T21:32:52"</literal>, or
  441. <literal>"2001-10-26T21:32:52.12679"</literal>.
  442. </para>
  443. <para>The following values would be invalid:
  444. <literal>"2001-10-26"</literal> (all the parts must be specified),
  445. <literal>"2001-10-26T21:32"</literal> (all the parts must be
  446. specified), <literal>"2001-10-26T25:32:52+02:00"</literal> (the hours
  447. part (25) is out of range), or <literal>"01-10-26T21:32"</literal>
  448. (all the parts must be specified).
  449. </para>
  450. </refsect1>
  451. </refentry>
  452. <refentry id="ch16-77036">
  453. <refmeta>
  454. <refentrytitle>xsd:decimal</refentrytitle>
  455. </refmeta>
  456. <refnamediv>
  457. <indexterm id="IXT-16-166130"><primary>xsd:decimal type</primary></indexterm><refname>xsd:decimal</refname>
  458. <refpurpose>Decimal numbers.
  459. </refpurpose>
  460. </refnamediv>
  461. <refsect1>
  462. <title>Derived from:</title>
  463. <para>xsd:anySimpleType </para>
  464. </refsect1>
  465. <refsect1>
  466. <title>Primary:</title>
  467. <para>xsd:decimal </para>
  468. </refsect1>
  469. <refsect1>
  470. <title>Known subtypes:</title>
  471. <para>xsd:integer </para>
  472. </refsect1>
  473. <refsect1>
  474. <title>Facets:</title>
  475. <para>xsd:enumeration, xsd:fractionDigits, xsd:maxExclusive, xsd:maxInclusive,
  476. xsd:minExclusive, xsd:minInclusive, xsd:pattern, xsd:totalDigits,
  477. <emphasis>xsd:whiteSpace</emphasis>
  478. </para>
  479. </refsect1>
  480. <refsynopsisdiv>
  481. <synopsis>
  482. &lt;xsd:simpleType name="decimal" id="decimal"&gt;
  483. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  484. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  485. &lt;/xsd:restriction&gt;
  486. &lt;/xsd:simpleType&gt;
  487. </synopsis>
  488. </refsynopsisdiv>
  489. <refsect1>
  490. <title>Description</title>
  491. <para><literal>xsd:decimal</literal> is the datatype that represents the set
  492. of all the decimal numbers with arbitrary lengths. Its lexical space
  493. allows any number of insignificant leading and trailing zeros (after
  494. the decimal point).
  495. </para>
  496. </refsect1>
  497. <refsect1>
  498. <title>Restrictions</title>
  499. <para>The decimal separator is always a point
  500. (".") and no thousand separator may
  501. be added. There is no support for scientific notations.
  502. </para>
  503. </refsect1>
  504. <refsect1>
  505. <title>Example</title>
  506. <para>Valid values include: <literal>"123.456"</literal>,
  507. <literal>"+1234.456"</literal>, <literal>"-1234.456"</literal>,
  508. <literal>"-.456"</literal>, or <literal>"-456"</literal>.
  509. </para>
  510. <para>The following values would be invalid: <literal>"1 234.456"</literal>
  511. (spaces are forbidden), <literal>"1234.456E+2"</literal> (scientific
  512. notation (<literal>"E+2"</literal>) is forbidden), <literal>"+
  513. 1234.456"</literal> (spaces are forbidden), or
  514. <literal>"+1,234.456"</literal> (delimiters between thousands are
  515. forbidden).
  516. </para>
  517. </refsect1>
  518. </refentry>
  519. <refentry id="ch16-77041">
  520. <refmeta>
  521. <refentrytitle>xsd:double</refentrytitle>
  522. </refmeta>
  523. <refnamediv>
  524. <indexterm id="IXT-16-166131"><primary>xsd:double type</primary></indexterm><refname>xsd:double</refname>
  525. <refpurpose>IEEE 64 bit floating point.
  526. </refpurpose>
  527. </refnamediv>
  528. <refsect1>
  529. <title>Derived from:</title>
  530. <para>xsd:anySimpleType </para>
  531. </refsect1>
  532. <refsect1>
  533. <title>Primary:</title>
  534. <para>xsd:double </para>
  535. </refsect1>
  536. <refsect1>
  537. <title>Known subtypes:</title>
  538. <para>none</para>
  539. </refsect1>
  540. <refsect1>
  541. <title>Facets:</title>
  542. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  543. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  544. </para>
  545. </refsect1>
  546. <refsynopsisdiv>
  547. <synopsis>
  548. &lt;xsd:simpleType name="double" id="double"&gt;
  549. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  550. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  551. &lt;/xsd:restriction&gt;
  552. &lt;/xsd:simpleType&gt;
  553. </synopsis>
  554. </refsynopsisdiv>
  555. <refsect1>
  556. <title>Description</title>
  557. <para>The value space of <literal>xsd:double</literal> is
  558. "double" (64 bits) floating-point
  559. numbers as defined by the IEEE. The lexical space uses a decimal
  560. format with optional scientific notation. The match between lexical
  561. (powers of 10) and value (powers of 2) spaces is approximate and done
  562. on the closest value.
  563. </para>
  564. <para>This datatype differentiates positive (0) and negative (-0) zeros,
  565. and includes the special values
  566. "-INF" (negative infinity),
  567. "INF" (positive infinity) and
  568. "NaN" (Not a Number).
  569. </para>
  570. <para>Note that the lexical spaces of <literal>xsd:float</literal> and
  571. <literal>xsd:double</literal> are exactly the same; the only
  572. difference is the precision used to convert the values in the value
  573. space.
  574. </para>
  575. </refsect1>
  576. <refsect1>
  577. <title>Restrictions</title>
  578. <para>The decimal separator is always a point
  579. (".") and no thousands separator
  580. may be used.
  581. </para>
  582. </refsect1>
  583. <refsect1>
  584. <title>Examples</title>
  585. <para>Valid values include: <literal>"123.456"</literal>,
  586. <literal>"+1234.456"</literal>, <literal>"-1.2344e56"</literal>,
  587. <literal>"-.45E-6"</literal>, <literal>"INF"</literal>,
  588. <literal>"-INF"</literal>, or <literal>"NaN"</literal>.
  589. </para>
  590. <para>The following values would be invalid: <literal>"1234.4E
  591. 56"</literal> (spaces are forbidden), <literal>"1E+2.5"</literal>
  592. (the power of 10 must be an integer), <literal>"+INF"</literal>
  593. (positive infinity doesn't expect a sign), or
  594. <literal>"NAN"</literal> (capitalization matters in special values).
  595. </para>
  596. </refsect1>
  597. </refentry>
  598. <refentry id="ch16-77046">
  599. <refmeta>
  600. <refentrytitle>xsd:duration</refentrytitle>
  601. </refmeta>
  602. <refnamediv>
  603. <indexterm id="IXT-16-166132"><primary>xsd:duration type</primary></indexterm><refname>xsd:duration</refname>
  604. <refpurpose>Time durations.
  605. </refpurpose>
  606. </refnamediv>
  607. <refsect1>
  608. <title>Derived from:</title>
  609. <para>xsd:anySimpleType </para>
  610. </refsect1>
  611. <refsect1>
  612. <title>Primary:</title>
  613. <para>xsd:duration </para>
  614. </refsect1>
  615. <refsect1>
  616. <title>Known subtypes:</title>
  617. <para>none</para>
  618. </refsect1>
  619. <refsect1>
  620. <title>Facets:</title>
  621. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  622. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  623. </para>
  624. </refsect1>
  625. <refsynopsisdiv>
  626. <synopsis>
  627. &lt;xsd:simpleType name="duration" id="duration"&gt;
  628. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  629. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  630. &lt;/xsd:restriction&gt;
  631. &lt;/xsd:simpleType&gt;
  632. </synopsis>
  633. </refsynopsisdiv>
  634. <refsect1>
  635. <title>Description</title>
  636. <para>Durations may be expressed using all the parts of a datetime (from
  637. year to fractions of second) and are, therefore, defined as a
  638. "six-dimensional space." Note that
  639. because the relation between some of these date parts (such as the
  640. number of days in a month) is not fixed, the order relationship
  641. between durations is only partial and the result of a comparison
  642. between two durations may be undetermined.
  643. </para>
  644. <para>The lexical space of <literal>xsd:duration</literal> is the format
  645. defined by ISO 8601 under the form
  646. "PnYnMnDTnHnMnS," in which the
  647. capital letters are delimiters and can be omitted when the
  648. corresponding member is not used.
  649. </para>
  650. <para>Although some durations are undetermined, this is fixed as soon as a
  651. starting point is fixed for the duration. W3C XML Schema relies on
  652. this feature to define the algorithm to use to compare two durations.
  653. Four datetimes have been chosen, which produce the greatest
  654. deviations when durations are added. A duration will be considered
  655. bigger than another when the result of its addition to these four
  656. dates is consistently bigger than the result of the addition of the
  657. other duration to these same four datetimes. These datetimes are:
  658. "1696-09-01T00:00:00Z",
  659. "1697-02-01T00:00:00Z,"
  660. "1903-03-01T00:00:00Z," and
  661. "1903-07-01T00:00:00Z."
  662. </para>
  663. </refsect1>
  664. <refsect1>
  665. <title>Restrictions</title>
  666. <para>The lexical space cannot be customized.</para>
  667. </refsect1>
  668. <refsect1>
  669. <title>Example</title>
  670. <para>Valid values include <literal>"PT1004199059S"</literal>,
  671. <literal>"PT130S"</literal>, <literal>"PT2M10S"</literal>,
  672. <literal>"P1DT2S"</literal>, <literal>"-P1Y"</literal>, or
  673. <literal>"P1Y2M3DT5H20M30.123S"</literal>.
  674. </para>
  675. <para>The following values would be invalid: <literal>"1Y"</literal>
  676. (leading <literal>"P"</literal> is missing), <literal>"P1S"</literal>
  677. (<literal>"T"</literal> separator is missing),
  678. <literal>"P-1Y"</literal> (all parts must be positive),
  679. <literal>"P1M2Y"</literal> (parts order is significant and
  680. <literal>Y</literal> must precede <literal>M</literal>), or
  681. <literal>"P1Y-1M"</literal> (all parts must be positive).
  682. </para>
  683. </refsect1>
  684. </refentry>
  685. <refentry id="ch16-77051">
  686. <refmeta>
  687. <refentrytitle>xsd:ENTITIES</refentrytitle>
  688. </refmeta>
  689. <refnamediv>
  690. <indexterm id="IXT-16-166133"><primary>xsd:ENTITIES type</primary></indexterm><refname>xsd:ENTITIES</refname>
  691. <refpurpose>Whitespace separated list of unparsed entity references.
  692. </refpurpose>
  693. </refnamediv>
  694. <refsect1>
  695. <title>Derived from:</title>
  696. <para>xsd:ENTITY </para>
  697. </refsect1>
  698. <refsect1>
  699. <title>Primary:</title>
  700. <para>none</para>
  701. </refsect1>
  702. <refsect1>
  703. <title>Known subtypes:</title>
  704. <para>none</para>
  705. </refsect1>
  706. <refsect1>
  707. <title>Facets:</title>
  708. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:whiteSpace </para>
  709. </refsect1>
  710. <refsynopsisdiv>
  711. <synopsis>
  712. &lt;xsd:simpleType name="ENTITIES" id="ENTITIES"&gt;
  713. &lt;xsd:restriction&gt;
  714. &lt;xsd:simpleType&gt;
  715. &lt;xsd:list&gt;
  716. &lt;xsd:simpleType&gt;
  717. &lt;xsd:restriction base="xsd:ENTITY"/&gt;
  718. &lt;/xsd:simpleType&gt;
  719. &lt;/xsd:list&gt;
  720. &lt;/xsd:simpleType&gt;
  721. &lt;xsd:minLength value="1"/&gt;
  722. &lt;/xsd:restriction&gt;
  723. &lt;/xsd:simpleType&gt;
  724. </synopsis>
  725. </refsynopsisdiv>
  726. <refsect1>
  727. <title>Description</title>
  728. <para><literal>xsd:ENTITIES</literal> is derived by a list from
  729. <literal>xsd:ENTITY</literal>. It represents lists of unparsed entity
  730. references. Each part of this entity reference is a nonqualified name
  731. (<literal>xsd:NCName</literal>) and must be declared as an unparsed
  732. entity in an internal or external DTD.
  733. </para>
  734. </refsect1>
  735. <refsect1>
  736. <title>Restrictions</title>
  737. <para>Unparsed entities have been defined in XML 1.0 as a way to include
  738. non-XML content in a XML document, but most of the applications
  739. prefer to define links (such as those defined in (X)HTML to include
  740. images or other multimedia objects).
  741. </para>
  742. <para>W3C XML Schema does not provide alternative ways to declare unparsed
  743. entities. A DTD is needed to do so.
  744. </para>
  745. </refsect1>
  746. </refentry>
  747. <refentry id="ch16-77056">
  748. <refmeta>
  749. <refentrytitle>xsd:ENTITY</refentrytitle>
  750. </refmeta>
  751. <refnamediv>
  752. <indexterm id="IXT-16-166134"><primary>xsd:ENTITY type</primary></indexterm><refname>xsd:ENTITY</refname>
  753. <refpurpose>Reference to an unparsed entity.
  754. </refpurpose>
  755. </refnamediv>
  756. <refsect1>
  757. <title>Derived from:</title>
  758. <para>xsd:NCName </para>
  759. </refsect1>
  760. <refsect1>
  761. <title>Primary:</title>
  762. <para>xsd:string </para>
  763. </refsect1>
  764. <refsect1>
  765. <title>Known subtypes:</title>
  766. <para>xsd:ENTITIES </para>
  767. </refsect1>
  768. <refsect1>
  769. <title>Facets:</title>
  770. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  771. xsd:whiteSpace
  772. </para>
  773. </refsect1>
  774. <refsynopsisdiv>
  775. <synopsis>
  776. &lt;xsd:simpleType name="ENTITY" id="ENTITY"&gt;
  777. &lt;xsd:restriction base="xsd:NCName"/&gt;
  778. &lt;/xsd:simpleType&gt;
  779. </synopsis>
  780. </refsynopsisdiv>
  781. <refsect1>
  782. <title>Description</title>
  783. <para><literal>xsd:ENTITY</literal> is an entity reference, i.e., a
  784. nonqualified name (<literal>xsd:NCName</literal>) that has been
  785. declared as an unparsed entity in an internal or external DTD.
  786. </para>
  787. </refsect1>
  788. <refsect1>
  789. <title>Restrictions</title>
  790. <para>Unparsed entities are defined in XML 1.0 as a way to include non-XML
  791. content in XML document, but most of the applications prefer to
  792. define links (such as those defined in (X)HTML to include images or
  793. other multimedia objects).
  794. </para>
  795. <para>W3C XML Schema does not provide alternative ways to declare unparsed
  796. entities. A DTD is needed to do so.
  797. </para>
  798. </refsect1>
  799. </refentry>
  800. <refentry id="ch16-77061">
  801. <refmeta>
  802. <refentrytitle>xsd:float</refentrytitle>
  803. </refmeta>
  804. <refnamediv>
  805. <indexterm id="IXT-16-166135"><primary>xsd:float type</primary></indexterm><refname>xsd:float</refname>
  806. <refpurpose>IEEE 32 bit floating point.
  807. </refpurpose>
  808. </refnamediv>
  809. <refsect1>
  810. <title>Derived from:</title>
  811. <para>xsd:anySimpleType </para>
  812. </refsect1>
  813. <refsect1>
  814. <title>Primary:</title>
  815. <para>xsd:float </para>
  816. </refsect1>
  817. <refsect1>
  818. <title>Known subtypes:</title>
  819. <para>none</para>
  820. </refsect1>
  821. <refsect1>
  822. <title>Facets:</title>
  823. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  824. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  825. </para>
  826. </refsect1>
  827. <refsynopsisdiv>
  828. <synopsis>
  829. &lt;xsd:simpleType name="float" id="float"&gt;
  830. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  831. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  832. &lt;/xsd:restriction&gt;
  833. &lt;/xsd:simpleType&gt;
  834. </synopsis>
  835. </refsynopsisdiv>
  836. <refsect1>
  837. <title>Description</title>
  838. <para>The value space of <literal>xsd:float</literal> is
  839. "float" (32 bits) floating-point
  840. numbers as defined by the IEEE. The lexical space uses a decimal
  841. format with optional scientific notation. The match between lexical
  842. (powers of 10) and value (powers of 2) spaces is approximate and is
  843. done on the closest value.
  844. </para>
  845. <para>This datatype differentiates positive (0) and negative (-0) zeros,
  846. and includes the special values
  847. "-INF" (negative infinity),
  848. "INF" (positive infinity), and
  849. "NaN" (Not a Number).
  850. </para>
  851. <para>Note that the lexical spaces of <literal>xsd:float</literal> and
  852. <literal>xsd:double</literal> are exactly the same; the only
  853. difference is the precision used to convert the values in the value
  854. space.
  855. </para>
  856. </refsect1>
  857. <refsect1>
  858. <title>Restrictions</title>
  859. <para>The decimal separator is always a point
  860. (".") and no thousands separator
  861. may be added.
  862. </para>
  863. </refsect1>
  864. <refsect1>
  865. <title>Example</title>
  866. <para>Valid values include: <literal>"123.456"</literal>,
  867. <literal>"+1234.456"</literal>, <literal>"-1.2344e56"</literal>,
  868. <literal>"-.45E-6"</literal>, <literal>"INF"</literal>,
  869. <literal>"-INF"</literal>, or <literal>"NaN"</literal>.
  870. </para>
  871. <para>The following values would be invalid: <literal>"1234.4E
  872. 56"</literal> (spaces are forbidden), <literal>"1E+2.5"</literal>
  873. (the power of 10 must be an integer), <literal>"+INF"</literal>
  874. (positive infinity doesn't expect a sign), or
  875. <literal>"NAN"</literal> (capitalization matters in special values).
  876. </para>
  877. </refsect1>
  878. </refentry>
  879. <refentry id="ch16-77066">
  880. <refmeta>
  881. <refentrytitle>xsd:gDay</refentrytitle>
  882. </refmeta>
  883. <refnamediv>
  884. <indexterm id="IXT-16-166136"><primary>xsd:gDay type</primary></indexterm><refname>xsd:gDay</refname>
  885. <refpurpose>Recurring period of time: monthly day.
  886. </refpurpose>
  887. </refnamediv>
  888. <refsect1>
  889. <title>Derived from:</title>
  890. <para>xsd:anySimpleType </para>
  891. </refsect1>
  892. <refsect1>
  893. <title>Primary:</title>
  894. <para>xsd:gDay </para>
  895. </refsect1>
  896. <refsect1>
  897. <title>Known subtypes:</title>
  898. <para>none</para>
  899. </refsect1>
  900. <refsect1>
  901. <title>Facets:</title>
  902. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  903. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  904. </para>
  905. </refsect1>
  906. <refsynopsisdiv>
  907. <synopsis>
  908. &lt;xsd:simpleType name="gDay" id="gDay"&gt;
  909. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  910. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  911. &lt;/xsd:restriction&gt;
  912. &lt;/xsd:simpleType&gt;
  913. </synopsis>
  914. </refsynopsisdiv>
  915. <refsect1>
  916. <title>Description</title>
  917. <para>The value space of <literal>xsd:gDay</literal> is the periods of one
  918. calendar day recurring each calendar month (such as the third of the
  919. month); its lexical space follows the ISO 8601 syntax for such
  920. periods (i.e., " -- -DD") with
  921. an optional timezone.
  922. </para>
  923. <para>When needed, days are reduced to fit in the length of the months, so
  924. <literal>---31</literal> would occur on the the 28th of February of
  925. nonleap years.
  926. </para>
  927. </refsect1>
  928. <refsect1>
  929. <title>Restrictions</title>
  930. <para>The period (one month) and the duration (one day) are fixed, and no
  931. calendars other than the Gregorian are supported.
  932. </para>
  933. </refsect1>
  934. <refsect1>
  935. <title>Example</title>
  936. <para>Valid values include <literal>"---01"</literal>,
  937. <literal>"---01Z"</literal>, <literal>"---01+02:00"</literal>,
  938. <literal>"---01-04:00"</literal>, <literal>"---15"</literal>, or
  939. <literal>"---31"</literal>.
  940. </para>
  941. <para>The following values would be invalid: <literal>"--30-"</literal>
  942. (the format must be <literal>"---DD"</literal>),
  943. <literal>"---35"</literal> (the day is out of range),
  944. <literal>"---5"</literal> (all the digits must be supplied), or
  945. <literal>"15"</literal> (missing leading <literal>"---"</literal>).
  946. </para>
  947. </refsect1>
  948. </refentry>
  949. <refentry id="ch16-77071">
  950. <refmeta>
  951. <refentrytitle>xsd:gMonth</refentrytitle>
  952. </refmeta>
  953. <refnamediv>
  954. <indexterm id="IXT-16-166137"><primary>xsd:gMonth type</primary></indexterm><refname>xsd:gMonth</refname>
  955. <refpurpose>Recurring period of time: yearly month.
  956. </refpurpose>
  957. </refnamediv>
  958. <refsect1>
  959. <title>Derived from:</title>
  960. <para>xsd:anySimpleType </para>
  961. </refsect1>
  962. <refsect1>
  963. <title>Primary:</title>
  964. <para>xsd:gMonth </para>
  965. </refsect1>
  966. <refsect1>
  967. <title>Known subtypes:</title>
  968. <para>none</para>
  969. </refsect1>
  970. <refsect1>
  971. <title>Facets:</title>
  972. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  973. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  974. </para>
  975. </refsect1>
  976. <refsynopsisdiv>
  977. <synopsis>
  978. &lt;xsd:simpleType name="gMonth" id="gMonth"&gt;
  979. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  980. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  981. &lt;/xsd:restriction&gt;
  982. &lt;/xsd:simpleType&gt;
  983. </synopsis>
  984. </refsynopsisdiv>
  985. <refsect1>
  986. <title>Description</title>
  987. <para>The value space of <literal>xsd:gMonth</literal> is the period of one
  988. calendar month recurring each calendar year (such as the month of
  989. April); its lexical space should follow the ISO 8601 syntax for such
  990. periods (i.e., " -- MM") with an
  991. optional timezone. However, there is a typo in the W3C XML Schema
  992. Recommendation where the format is defined as
  993. " -- MM -- -- . Even though an
  994. erratum should be published to bring the W3C XML Schema inline with
  995. ISO 8601, most of the current schema processors will expect the
  996. (bogus) format " -- MM -- -- .
  997. In the example, we follow the correct ISO 8601 format.
  998. </para>
  999. </refsect1>
  1000. <refsect1>
  1001. <title>Restrictions</title>
  1002. <para>The period (one year) and the duration (one month) are fixed, and no
  1003. calendars other than the Gregorian are supported.
  1004. </para>
  1005. <para>Because of the typo in the W3C XML Schema Specification, users must
  1006. choose between a bogus format, which works on the current version of
  1007. the tools, or a correct format, which conforms to ISO 8601.
  1008. </para>
  1009. </refsect1>
  1010. <refsect1>
  1011. <title>Example</title>
  1012. <para>Valid values include <literal>"--05"</literal>,
  1013. <literal>"--11Z"</literal>, <literal>"--11+02:00"</literal>,
  1014. <literal>"--11-04:00"</literal>, or <literal>"--02"</literal>.
  1015. </para>
  1016. <para>The following values would be invalid: <literal>"-01-"</literal> (the
  1017. format must be <literal>"--MM"</literal>), <literal>"--13"</literal>
  1018. (the month is out of range), <literal>"--1"</literal> (both digits
  1019. must be provided), or <literal>"01"</literal> (leading " -- " are
  1020. missing).
  1021. </para>
  1022. </refsect1>
  1023. </refentry>
  1024. <refentry id="ch16-77076">
  1025. <refmeta>
  1026. <refentrytitle>xsd:gMonthDay</refentrytitle>
  1027. </refmeta>
  1028. <refnamediv>
  1029. <indexterm id="IXT-16-166138"><primary>xsd:gMonthDay type</primary></indexterm><refname>xsd:gMonthDay</refname>
  1030. <refpurpose>Recurring period of time: yearly day.
  1031. </refpurpose>
  1032. </refnamediv>
  1033. <refsect1>
  1034. <title>Derived from:</title>
  1035. <para>xsd:anySimpleType </para>
  1036. </refsect1>
  1037. <refsect1>
  1038. <title>Primary:</title>
  1039. <para>xsd:gMonthDay </para>
  1040. </refsect1>
  1041. <refsect1>
  1042. <title>Known subtypes:</title>
  1043. <para>none</para>
  1044. </refsect1>
  1045. <refsect1>
  1046. <title>Facets:</title>
  1047. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  1048. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  1049. </para>
  1050. </refsect1>
  1051. <refsynopsisdiv>
  1052. <synopsis>
  1053. &lt;xsd:simpleType name="gMonthDay" id="gMonthDay"&gt;
  1054. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  1055. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  1056. &lt;/xsd:restriction&gt;
  1057. &lt;/xsd:simpleType&gt;
  1058. </synopsis>
  1059. </refsynopsisdiv>
  1060. <refsect1>
  1061. <title>Description</title>
  1062. <para>The value space of <literal>xsd:gMonthDay</literal> is the period of
  1063. one calendar day recurring each calendar year (such as the third of
  1064. April); its lexical space follows the ISO 8601 syntax for such
  1065. periods (i.e., " -- MM-DD") with
  1066. an optional timezone.
  1067. </para>
  1068. <para>When needed, days are reduced to fit in the length of the months, so
  1069. <literal>--02-29</literal> would occur on the the 28th of February of
  1070. nonleap years.
  1071. </para>
  1072. </refsect1>
  1073. <refsect1>
  1074. <title>Restrictions</title>
  1075. <para>The period (one year) and the duration (one day) are fixed, and no
  1076. calendars other than the Gregorian are supported.
  1077. </para>
  1078. </refsect1>
  1079. <refsect1>
  1080. <title>Example</title>
  1081. <para>Valid values include <literal>"--05-01"</literal>,
  1082. <literal>"--11-01Z"</literal>, <literal>"--11-01+02:00"</literal>,
  1083. <literal>"--11-01-04:00"</literal>, <literal>"--11-15"</literal>, or
  1084. <literal>"--02-29"</literal>.
  1085. </para>
  1086. <para>The following values would be invalid: <literal>"-01-30-"</literal>
  1087. (the format must be <literal>"--MM-DD"</literal>),
  1088. <literal>"--01-35"</literal> (the day part is out of range),
  1089. <literal>"--1-5"</literal> (the leading zeros are missing), or
  1090. <literal>"01-15"</literal> (the leading <literal>"--"</literal> are
  1091. missing).
  1092. </para>
  1093. </refsect1>
  1094. </refentry>
  1095. <refentry id="ch16-77081">
  1096. <refmeta>
  1097. <refentrytitle>xsd:gYear</refentrytitle>
  1098. </refmeta>
  1099. <refnamediv>
  1100. <indexterm id="IXT-16-166139"><primary>xsd:gYear type</primary></indexterm><refname>xsd:gYear</refname>
  1101. <refpurpose>Period of one year.
  1102. </refpurpose>
  1103. </refnamediv>
  1104. <refsect1>
  1105. <title>Derived from:</title>
  1106. <para>xsd:anySimpleType </para>
  1107. </refsect1>
  1108. <refsect1>
  1109. <title>Primary:</title>
  1110. <para>xsd:gYear </para>
  1111. </refsect1>
  1112. <refsect1>
  1113. <title>Known subtypes:</title>
  1114. <para>none</para>
  1115. </refsect1>
  1116. <refsect1>
  1117. <title>Facets:</title>
  1118. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  1119. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  1120. </para>
  1121. </refsect1>
  1122. <refsynopsisdiv>
  1123. <synopsis>
  1124. &lt;xsd:simpleType name="gYear" id="gYear"&gt;
  1125. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  1126. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  1127. &lt;/xsd:restriction&gt;
  1128. &lt;/xsd:simpleType&gt;
  1129. </synopsis>
  1130. </refsynopsisdiv>
  1131. <refsect1>
  1132. <title>Description</title>
  1133. <para>The value space of <literal>xsd:gYear</literal> is the period of one
  1134. calendar year (such as the year 2002); its lexical space follows the
  1135. ISO 8601 syntax for such periods (i.e.,
  1136. "YYYY") with an optional timezone.
  1137. </para>
  1138. </refsect1>
  1139. <refsect1>
  1140. <title>Restrictions</title>
  1141. <para>The duration (one year) is fixed, and no calendars other than the
  1142. Gregorian are supported.
  1143. </para>
  1144. </refsect1>
  1145. <refsect1>
  1146. <title>Example</title>
  1147. <para>Valid values include <literal>"2001"</literal>,
  1148. <literal>"2001+02:00"</literal>, <literal>"2001Z"</literal>,
  1149. <literal>"2001+00:00"</literal>, <literal>"-2001"</literal>, or
  1150. <literal>"-20000"</literal>.
  1151. </para>
  1152. <para>The following values would be invalid: <literal>"01"</literal> (the
  1153. century part is missing) or <literal>"2001-12"</literal> (month parts
  1154. are forbidden).
  1155. </para>
  1156. </refsect1>
  1157. </refentry>
  1158. <refentry id="ch16-77086">
  1159. <refmeta>
  1160. <refentrytitle>xsd:gYearMonth</refentrytitle>
  1161. </refmeta>
  1162. <refnamediv>
  1163. <indexterm id="IXT-16-166140"><primary>xsd:gYearMonth type</primary></indexterm><refname>xsd:gYearMonth</refname>
  1164. <refpurpose>Period of one month.
  1165. </refpurpose>
  1166. </refnamediv>
  1167. <refsect1>
  1168. <title>Derived from:</title>
  1169. <para>xsd:anySimpleType </para>
  1170. </refsect1>
  1171. <refsect1>
  1172. <title>Primary:</title>
  1173. <para>xsd:gYearMonth </para>
  1174. </refsect1>
  1175. <refsect1>
  1176. <title>Known subtypes:</title>
  1177. <para>none</para>
  1178. </refsect1>
  1179. <refsect1>
  1180. <title>Facets:</title>
  1181. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  1182. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  1183. </para>
  1184. </refsect1>
  1185. <refsynopsisdiv>
  1186. <synopsis>
  1187. &lt;xsd:simpleType name="gYearMonth" id="gYearMonth"&gt;
  1188. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  1189. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  1190. &lt;/xsd:restriction&gt;
  1191. &lt;/xsd:simpleType&gt;
  1192. </synopsis>
  1193. </refsynopsisdiv>
  1194. <refsect1>
  1195. <title>Description</title>
  1196. <para>The value space of <literal>xsd:gYearMonth</literal> is the period of
  1197. one calendar month (such as the month of February 2002); its lexical
  1198. space follows the ISO 8601 syntax for such periods (i.e.,
  1199. "YYYY-MM") with an optional
  1200. timezone.
  1201. </para>
  1202. </refsect1>
  1203. <refsect1>
  1204. <title>Restrictions</title>
  1205. <para>The duration (one month) is fixed, and no calendars other than the
  1206. Gregorian are supported.
  1207. </para>
  1208. </refsect1>
  1209. <refsect1>
  1210. <title>Example</title>
  1211. <para>Valid values include <literal>"2001-10"</literal>,
  1212. <literal>"2001-10+02:00"</literal>, <literal>"2001-10Z"</literal>,
  1213. <literal>"2001-10+00:00"</literal>, <literal>"-2001-10"</literal>, or
  1214. <literal>"-20000-04"</literal>.
  1215. </para>
  1216. <para>The following values would be invalid: <literal>"2001"</literal> (the
  1217. month part is missing), <literal>"2001-13"</literal> (the month part
  1218. is out of range), <literal>"2001-13-26+02:00"</literal> (the month
  1219. part is out of range), or <literal>"01-10"</literal> (the century
  1220. part is missing).
  1221. </para>
  1222. </refsect1>
  1223. </refentry>
  1224. <refentry id="ch16-77091">
  1225. <refmeta>
  1226. <refentrytitle>xsd:hexBinary</refentrytitle>
  1227. </refmeta>
  1228. <refnamediv>
  1229. <indexterm id="IXT-16-166141"><primary>xsd:hexBinary type</primary></indexterm><refname>xsd:hexBinary</refname>
  1230. <refpurpose>Binary contents coded in hexadecimal.
  1231. </refpurpose>
  1232. </refnamediv>
  1233. <refsect1>
  1234. <title>Derived from:</title>
  1235. <para>xsd:anySimpleType </para>
  1236. </refsect1>
  1237. <refsect1>
  1238. <title>Primary:</title>
  1239. <para>xsd:hexBinary </para>
  1240. </refsect1>
  1241. <refsect1>
  1242. <title>Known subtypes:</title>
  1243. <para>none</para>
  1244. </refsect1>
  1245. <refsect1>
  1246. <title>Facets:</title>
  1247. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  1248. <emphasis>xsd:whiteSpace</emphasis>
  1249. </para>
  1250. </refsect1>
  1251. <refsynopsisdiv>
  1252. <synopsis>
  1253. &lt;xsd:simpleType name="hexBinary" id="hexBinary"&gt;
  1254. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  1255. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  1256. &lt;/xsd:restriction&gt;
  1257. &lt;/xsd:simpleType&gt;
  1258. </synopsis>
  1259. </refsynopsisdiv>
  1260. <refsect1>
  1261. <title>Description</title>
  1262. <para>The value space of <literal>xsd:hexBinary</literal> is the set of all
  1263. binary contents; its lexical space is a simple coding of each octet
  1264. as its hexadecimal value.
  1265. </para>
  1266. </refsect1>
  1267. <refsect1>
  1268. <title>Restrictions</title>
  1269. <para>This datatype should not be confused with another encoding called
  1270. BinHex that is not supported by W3C XML Schema. Other popular binary
  1271. text encodings (such as uuXXcode, Quote Printable, BinHex, aencode,
  1272. or base85, to name few) are not supported by the W3C XML Schema.
  1273. </para>
  1274. <para>The expansion factor is high since each binary octet is coded as two
  1275. characters (i.e., four octets if the document is encoded with
  1276. UTF-16).
  1277. </para>
  1278. </refsect1>
  1279. <refsect1>
  1280. <title>Example</title>
  1281. <para>A UTF-8 XML header such as:</para>
  1282. <programlisting>"&lt;?xml version="1.0" encoding="UTF-8"?&gt;"</programlisting>
  1283. <para>encoded would be:</para>
  1284. <programlisting>"3f3c6d78206c657673726f693d6e3122302e20226e656f636964676e223d54552d4622383e3f"</programlisting>
  1285. </refsect1>
  1286. </refentry>
  1287. <refentry id="ch16-77096">
  1288. <refmeta>
  1289. <refentrytitle>xsd:ID</refentrytitle>
  1290. </refmeta>
  1291. <refnamediv>
  1292. <indexterm id="IXT-16-166142"><primary>xsd:ID type</primary></indexterm><refname>xsd:ID</refname>
  1293. <refpurpose>Definition of unique identifiers.
  1294. </refpurpose>
  1295. </refnamediv>
  1296. <refsect1>
  1297. <title>Derived from:</title>
  1298. <para>xsd:NCName </para>
  1299. </refsect1>
  1300. <refsect1>
  1301. <title>Primary:</title>
  1302. <para>xsd:string </para>
  1303. </refsect1>
  1304. <refsect1>
  1305. <title>Known subtypes:</title>
  1306. <para>none</para>
  1307. </refsect1>
  1308. <refsect1>
  1309. <title>Facets:</title>
  1310. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  1311. xsd:whiteSpace
  1312. </para>
  1313. </refsect1>
  1314. <refsynopsisdiv>
  1315. <synopsis>
  1316. &lt;xsd:simpleType name="ID" id="ID"&gt;
  1317. &lt;xsd:restriction base="xsd:NCName"/&gt;
  1318. &lt;/xsd:simpleType&gt;
  1319. </synopsis>
  1320. </refsynopsisdiv>
  1321. <refsect1>
  1322. <title>Description</title>
  1323. <para>The purpose of the <literal>xsd:ID</literal> datatype is to define
  1324. unique identifiers that are global to a document and emulate the ID
  1325. attribute type available in the XML DTDs.
  1326. </para>
  1327. <para>Unlike their DTD counterparts, W3C XML Schema ID datatypes can be
  1328. used to define not only attributes, but also simple element content.
  1329. </para>
  1330. <para>For both attributes and simple element content, the lexical domain of
  1331. these datatypes is the lexical domain of XML nonqualified names
  1332. (<literal>xsd:NCName</literal>).
  1333. </para>
  1334. <para>Identifiers defined using this datatype are global to a document and
  1335. provide a way to uniquely identify their containing element, whatever
  1336. its type and name is.
  1337. </para>
  1338. <para>The constraint added by this datatype beyond the
  1339. <literal>xsd:NCName</literal> datatype from which it is derived is
  1340. that the values of all the attributes and elements that have an ID
  1341. datatype in a document must be unique.
  1342. </para>
  1343. <para>Note that this datatype is laxer than the ID datatype from the DTD compatibility datatype library and does allow both using this datatypes for elements and defining multiple type assignment to attributes defined as ID depending on their location in the schema.</para>
  1344. </refsect1>
  1345. <refsect1>
  1346. <title>Restrictions</title>
  1347. <para>Applications that need to maintain a level of compatibility with DTDs
  1348. should not use this datatype for elements but should reserve it for
  1349. attributes.
  1350. </para>
  1351. <para>The lexical domain (<literal>xsd:NCName</literal>) of this datatype
  1352. doesn't allow the definition of numerical
  1353. identifiers or identifiers containing whitespaces.
  1354. </para>
  1355. </refsect1>
  1356. <refsect1>
  1357. <title>Example</title>
  1358. <programlisting>&lt;element name="book"&gt;
  1359. &lt;element name="isbn">
  1360. &lt;data type="xsd:int"/&gt;
  1361. &lt;/element>
  1362. &lt;element name="title">
  1363. &lt;data type="xsd:string"/&gt;
  1364. &lt;/element>
  1365. &lt;element name="author-ref"&gt;
  1366. &lt;attribute name="ref">
  1367. &lt;data type="xsd:IDREF"/&gt;
  1368. &lt;/attribute>
  1369. &lt;/element&gt;
  1370. &lt;element name="character-refs">
  1371. &lt;data type="xsd:IDREFS"/&gt;
  1372. &lt;/element&gt;
  1373. &lt;attribute name="identifier">
  1374. &lt;data type="xsd:ID"/&gt;
  1375. &lt;/attribute>
  1376. &lt;/element&gt;</programlisting>
  1377. </refsect1>
  1378. </refentry>
  1379. <refentry id="ch16-77101">
  1380. <refmeta>
  1381. <refentrytitle>xsd:IDREF</refentrytitle>
  1382. </refmeta>
  1383. <refnamediv>
  1384. <indexterm id="IXT-16-166143"><primary>xsd:IDREF type</primary></indexterm><refname>xsd:IDREF</refname>
  1385. <refpurpose>Definition of references to unique identifiers.
  1386. </refpurpose>
  1387. </refnamediv>
  1388. <refsect1>
  1389. <title>Derived from:</title>
  1390. <para>xsd:NCName </para>
  1391. </refsect1>
  1392. <refsect1>
  1393. <title>Primary:</title>
  1394. <para>xsd:string </para>
  1395. </refsect1>
  1396. <refsect1>
  1397. <title>Known subtypes:</title>
  1398. <para>xsd:IDREFS </para>
  1399. </refsect1>
  1400. <refsect1>
  1401. <title>Facets:</title>
  1402. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  1403. xsd:whiteSpace
  1404. </para>
  1405. </refsect1>
  1406. <refsynopsisdiv>
  1407. <synopsis>
  1408. &lt;xsd:simpleType name="IDREF" id="IDREF"&gt;
  1409. &lt;xsd:restriction base="xsd:NCName"/&gt;
  1410. &lt;/xsd:simpleType&gt;
  1411. </synopsis>
  1412. </refsynopsisdiv>
  1413. <refsect1>
  1414. <title>Description</title>
  1415. <para>The <literal>xsd:IDREF</literal> datatype defines references to the
  1416. identifiers defined by the ID datatype and, therefore, emulates the
  1417. IDREF attribute type of the XML DTDs, even though it can be used for
  1418. simple content elements as well as for attributes.
  1419. </para>
  1420. <para>The lexical space of <literal>xsd:IDREF</literal> is, like the lexical
  1421. space of <literal>xsd:ID</literal>, nonqualified XML names (NCName).
  1422. </para>
  1423. <para>The constraint added by this datatype beyond the
  1424. <literal>xsd:NCName</literal> datatype from which it is derived is the
  1425. values of all the attributes and elements that have a
  1426. <literal>xsd:IDREF</literal> datatype must match an ID defined within
  1427. the same document.
  1428. </para>
  1429. </refsect1>
  1430. <refsect1>
  1431. <title>Restrictions</title>
  1432. <para>Applications that need to maintain a level of compatibility with DTDs
  1433. should not use this datatype for elements but should reserve it for
  1434. attributes.
  1435. </para>
  1436. <para>The lexical domain (NCName) of this datatype doesn't
  1437. allow definition of numerical key references or references containing
  1438. whitespaces.
  1439. </para>
  1440. </refsect1>
  1441. <refsect1>
  1442. <title>Example</title>
  1443. <programlisting>&lt;element name="book"&gt;
  1444. &lt;element name="isbn">
  1445. &lt;data type="xsd:int"/&gt;
  1446. &lt;/element>
  1447. &lt;element name="title">
  1448. &lt;data type="xsd:string"/&gt;
  1449. &lt;/element>
  1450. &lt;element name="author-ref"&gt;
  1451. &lt;attribute name="ref">
  1452. &lt;data type="xsd:IDREF"/&gt;
  1453. &lt;/attribute>
  1454. &lt;/element&gt;
  1455. &lt;element name="character-refs">
  1456. &lt;data type="xsd:IDREFS"/&gt;
  1457. &lt;/element&gt;
  1458. &lt;attribute name="identifier">
  1459. &lt;data type="xsd:ID"/&gt;
  1460. &lt;/attribute>
  1461. &lt;/element&gt;</programlisting>
  1462. </refsect1>
  1463. </refentry>
  1464. <refentry id="ch16-77106">
  1465. <refmeta>
  1466. <refentrytitle>xsd:IDREFS</refentrytitle>
  1467. </refmeta>
  1468. <refnamediv>
  1469. <indexterm id="IXT-16-166144"><primary>xsd:IDREFS type</primary></indexterm><refname>xsd:IDREFS</refname>
  1470. <refpurpose>Definition of lists of references to unique identifiers.
  1471. </refpurpose>
  1472. </refnamediv>
  1473. <refsect1>
  1474. <title>Derived from:</title>
  1475. <para>xsd:IDREF </para>
  1476. </refsect1>
  1477. <refsect1>
  1478. <title>Primary:</title>
  1479. <para>none</para>
  1480. </refsect1>
  1481. <refsect1>
  1482. <title>Known subtypes:</title>
  1483. <para>none</para>
  1484. </refsect1>
  1485. <refsect1>
  1486. <title>Facets:</title>
  1487. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:whiteSpace </para>
  1488. </refsect1>
  1489. <refsynopsisdiv>
  1490. <synopsis>
  1491. &lt;xsd:simpleType name="IDREFS" id="IDREFS"&gt;
  1492. &lt;xsd:restriction&gt;
  1493. &lt;xsd:simpleType&gt;
  1494. &lt;xsd:list&gt;
  1495. &lt;xsd:simpleType&gt;
  1496. &lt;xsd:restriction base="xsd:IDREF"/&gt;
  1497. &lt;/xsd:simpleType&gt;
  1498. &lt;/xsd:list&gt;
  1499. &lt;/xsd:simpleType&gt;
  1500. &lt;xsd:minLength value="1"/&gt;
  1501. &lt;/xsd:restriction&gt;
  1502. &lt;/xsd:simpleType&gt;
  1503. </synopsis>
  1504. </refsynopsisdiv>
  1505. <refsect1>
  1506. <title>Description</title>
  1507. <para><literal>xsd:IDREFS</literal> is derived as a list from
  1508. <literal>xsd:IDREF</literal> and, thus, represents
  1509. whitespace-separated lists of references to identifiers defined using
  1510. the ID datatype.
  1511. </para>
  1512. <para>The lexical space of <literal>xsd:IDREFS</literal> is the lexical
  1513. space of a list of <literal>xsd:NCName</literal> values with a minimum
  1514. length of one element (<literal>xsd:IDREFS</literal> cannot be empty
  1515. lists).
  1516. </para>
  1517. <para><literal>xsd:IDREFS</literal> emulates the
  1518. <literal>IDREFS</literal> attribute type of the XML DTDs, even
  1519. though it can be used to define simple content elements as well as
  1520. attributes.
  1521. </para>
  1522. </refsect1>
  1523. <refsect1>
  1524. <title>Restrictions</title>
  1525. <para>Applications that need to maintain a level of compatibility with DTDs
  1526. should not use this datatype for elements but should reserve it for
  1527. attributes.
  1528. </para>
  1529. <para>The lexical domain (lists of <literal>xsd:NCName</literal>) of this
  1530. datatype doesn't allow definition of lists of
  1531. numerical key references or references containing whitespaces.
  1532. </para>
  1533. </refsect1>
  1534. <refsect1>
  1535. <title>Example</title>
  1536. <programlisting>&lt;element name="book"&gt;
  1537. &lt;element name="isbn">
  1538. &lt;data type="xsd:int"/&gt;
  1539. &lt;/element>
  1540. &lt;element name="title">
  1541. &lt;data type="xsd:string"/&gt;
  1542. &lt;/element>
  1543. &lt;element name="author-ref"&gt;
  1544. &lt;attribute name="ref">
  1545. &lt;data type="xsd:IDREF"/&gt;
  1546. &lt;/attribute>
  1547. &lt;/element&gt;
  1548. &lt;element name="character-refs">
  1549. &lt;data type="xsd:IDREFS"/&gt;
  1550. &lt;/element&gt;
  1551. &lt;attribute name="identifier">
  1552. &lt;data type="xsd:ID"/&gt;
  1553. &lt;/attribute>
  1554. &lt;/element&gt;</programlisting>
  1555. </refsect1>
  1556. </refentry>
  1557. <refentry id="ch16-77111">
  1558. <refmeta>
  1559. <refentrytitle>xsd:int</refentrytitle>
  1560. </refmeta>
  1561. <refnamediv>
  1562. <indexterm id="IXT-16-166145"><primary>xsd:int type</primary></indexterm><refname>xsd:int</refname>
  1563. <refpurpose>32 bit signed integers.
  1564. </refpurpose>
  1565. </refnamediv>
  1566. <refsect1>
  1567. <title>Derived from:</title>
  1568. <para>xsd:long </para>
  1569. </refsect1>
  1570. <refsect1>
  1571. <title>Primary:</title>
  1572. <para>xsd:decimal </para>
  1573. </refsect1>
  1574. <refsect1>
  1575. <title>Known subtypes:</title>
  1576. <para>xsd:short </para>
  1577. </refsect1>
  1578. <refsect1>
  1579. <title>Facets:</title>
  1580. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  1581. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  1582. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  1583. </para>
  1584. </refsect1>
  1585. <refsynopsisdiv>
  1586. <synopsis>
  1587. &lt;xsd:simpleType name="int" id="int"&gt;
  1588. &lt;xsd:restriction base="xsd:long"&gt;
  1589. &lt;xsd:minInclusive value="-2147483648"/&gt;
  1590. &lt;xsd:maxInclusive value="2147483647"/&gt;
  1591. &lt;/xsd:restriction&gt;
  1592. &lt;/xsd:simpleType&gt;
  1593. </synopsis>
  1594. </refsynopsisdiv>
  1595. <refsect1>
  1596. <title>Description</title>
  1597. <para>The value space of <literal>xsd:int</literal> is the set of common
  1598. single size integers (32 bits), i.e., the integers between
  1599. -2147483648 and 2147483647, its lexical space allows any number of
  1600. insignificant leading zeros.
  1601. </para>
  1602. </refsect1>
  1603. <refsect1>
  1604. <title>Restrictions</title>
  1605. <para>The decimal point (even when followed only by insignificant zeros) is
  1606. forbidden.
  1607. </para>
  1608. <para>-0 and +0 are considered equal, which is different from the behavior
  1609. of <literal>xsd:float</literal> and <literal>xsd:double</literal>.
  1610. </para>
  1611. </refsect1>
  1612. <refsect1>
  1613. <title>Example</title>
  1614. <para>Valid values include <literal>"-2147483648"</literal>,
  1615. <literal>"0"</literal>, <literal>"-0000000000000000000005"</literal>,
  1616. or <literal>"2147483647"</literal>.
  1617. </para>
  1618. <para>Invalid values include <literal>"-2147483649"</literal> and
  1619. <literal>"1."</literal>.
  1620. </para>
  1621. </refsect1>
  1622. </refentry>
  1623. <refentry id="ch16-77116">
  1624. <refmeta>
  1625. <refentrytitle>xsd:integer</refentrytitle>
  1626. </refmeta>
  1627. <refnamediv>
  1628. <indexterm id="IXT-16-166146"><primary>xsd:integer type</primary></indexterm><refname>xsd:integer</refname>
  1629. <refpurpose>Signed integers of arbitrary length.
  1630. </refpurpose>
  1631. </refnamediv>
  1632. <refsect1>
  1633. <title>Derived from:</title>
  1634. <para>xsd:decimal </para>
  1635. </refsect1>
  1636. <refsect1>
  1637. <title>Primary:</title>
  1638. <para>xsd:decimal </para>
  1639. </refsect1>
  1640. <refsect1>
  1641. <title>Known subtypes:</title>
  1642. <para>xsd:nonPositiveInteger, xsd:long, xsd:nonNegativeInteger </para>
  1643. </refsect1>
  1644. <refsect1>
  1645. <title>Facets:</title>
  1646. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  1647. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  1648. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  1649. </para>
  1650. </refsect1>
  1651. <refsynopsisdiv>
  1652. <synopsis>
  1653. &lt;xsd:simpleType name="integer" id="integer"&gt;
  1654. &lt;xsd:restriction base="xsd:decimal"&gt;
  1655. &lt;xsd:fractionDigits value="0" fixed="true"/&gt;
  1656. &lt;/xsd:restriction&gt;
  1657. &lt;/xsd:simpleType&gt;
  1658. </synopsis>
  1659. </refsynopsisdiv>
  1660. <refsect1>
  1661. <title>Description</title>
  1662. <para>The value space of <literal>xsd:integer</literal> includes the set of
  1663. all the signed integers, with no restriction on range. Its lexical
  1664. space allows any number of insignificant leading zeros.
  1665. </para>
  1666. </refsect1>
  1667. <refsect1>
  1668. <title>Restrictions</title>
  1669. <para>The decimal point (even when followed only by insignificant zeros) is
  1670. forbidden.
  1671. </para>
  1672. <para>-0 and +0 are considered equal, which is different from the behavior
  1673. of <literal>xsd:float</literal> and <literal>xsd:double</literal>.
  1674. </para>
  1675. </refsect1>
  1676. <refsect1>
  1677. <title>Example</title>
  1678. <para>Valid values for <literal>xsd:integer</literal> include
  1679. <literal>"-123456789012345678901234567890"</literal>,
  1680. <literal>"2147483647"</literal>, <literal>"0"</literal>, or
  1681. <literal>"-0000000000000000000005"</literal>.
  1682. </para>
  1683. <para>Invalid values include <literal>"1."</literal>,
  1684. <literal>"2.6"</literal>, and <literal>"A"</literal>.
  1685. </para>
  1686. </refsect1>
  1687. </refentry>
  1688. <refentry id="ch16-77121">
  1689. <refmeta>
  1690. <refentrytitle>xsd:language</refentrytitle>
  1691. </refmeta>
  1692. <refnamediv>
  1693. <indexterm id="IXT-16-166147"><primary>xsd:language type</primary></indexterm><refname>xsd:language</refname>
  1694. <refpurpose>RFC 1766 language codes.
  1695. </refpurpose>
  1696. </refnamediv>
  1697. <refsect1>
  1698. <title>Derived from:</title>
  1699. <para>xsd:token </para>
  1700. </refsect1>
  1701. <refsect1>
  1702. <title>Primary:</title>
  1703. <para>xsd:string </para>
  1704. </refsect1>
  1705. <refsect1>
  1706. <title>Known subtypes:</title>
  1707. <para>none</para>
  1708. </refsect1>
  1709. <refsect1>
  1710. <title>Facets:</title>
  1711. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  1712. xsd:whiteSpace
  1713. </para>
  1714. </refsect1>
  1715. <refsynopsisdiv>
  1716. <synopsis>
  1717. &lt;xsd:simpleType name="language" id="language"&gt;
  1718. &lt;xsd:restriction base="xsd:token"&gt;
  1719. &lt;xsd:pattern
  1720. value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]{1,8})(-[a-zA-Z]{1,8})*"
  1721. /&gt;
  1722. &lt;/xsd:restriction&gt;
  1723. &lt;/xsd:simpleType&gt;
  1724. </synopsis>
  1725. </refsynopsisdiv>
  1726. <refsect1>
  1727. <title>Description</title>
  1728. <para>The lexical and value spaces of <literal>xsd:language</literal> are
  1729. the set of language codes defined by the RFC 1766.
  1730. </para>
  1731. </refsect1>
  1732. <refsect1>
  1733. <title>Restrictions</title>
  1734. <para>Although the schema for schema defines a minimal test to perform
  1735. expressed as patterns (see the Definition), the lexical space is the
  1736. set of existing language codes.
  1737. </para>
  1738. </refsect1>
  1739. <refsect1>
  1740. <title>Example</title>
  1741. <para>Some valid values for this datatype are: <literal>"en"</literal>,
  1742. <literal>"en-US"</literal>, <literal>"fr"</literal>, or
  1743. <literal>"fr-FR"</literal>.
  1744. </para>
  1745. </refsect1>
  1746. </refentry>
  1747. <refentry id="ch16-77126">
  1748. <refmeta>
  1749. <refentrytitle>xsd:long</refentrytitle>
  1750. </refmeta>
  1751. <refnamediv>
  1752. <indexterm id="IXT-16-166148"><primary>xsd:long type</primary></indexterm><refname>xsd:long</refname>
  1753. <refpurpose>64 bit signed integers.
  1754. </refpurpose>
  1755. </refnamediv>
  1756. <refsect1>
  1757. <title>Derived from:</title>
  1758. <para>xsd:integer </para>
  1759. </refsect1>
  1760. <refsect1>
  1761. <title>Primary:</title>
  1762. <para>xsd:decimal </para>
  1763. </refsect1>
  1764. <refsect1>
  1765. <title>Known subtypes:</title>
  1766. <para>xsd:int </para>
  1767. </refsect1>
  1768. <refsect1>
  1769. <title>Facets:</title>
  1770. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  1771. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  1772. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  1773. </para>
  1774. </refsect1>
  1775. <refsynopsisdiv>
  1776. <synopsis>
  1777. &lt;xsd:simpleType name="long" id="long"&gt;
  1778. &lt;xsd:restriction base="xsd:integer"&gt;
  1779. &lt;xsd:minInclusive value="-9223372036854775808"/&gt;
  1780. &lt;xsd:maxInclusive value="9223372036854775807"/&gt;
  1781. &lt;/xsd:restriction&gt;
  1782. &lt;/xsd:simpleType&gt;
  1783. </synopsis>
  1784. </refsynopsisdiv>
  1785. <refsect1>
  1786. <title>Description</title>
  1787. <para>The value space of <literal>xsd:long</literal> is the set of common
  1788. double-size integers (64 bits), i.e., the integers between
  1789. -9223372036854775808 and 9223372036854775807; its lexical space
  1790. allows any number of insignificant leading zeros.
  1791. </para>
  1792. </refsect1>
  1793. <refsect1>
  1794. <title>Restrictions</title>
  1795. <para>The decimal point (even when followed only by insignificant zeros) is
  1796. forbidden.
  1797. </para>
  1798. </refsect1>
  1799. <refsect1>
  1800. <title>Example</title>
  1801. <para>Valid values for <literal>xsd:long</literal> include
  1802. <literal>"-9223372036854775808"</literal>, <literal>"0"</literal>,
  1803. <literal>"-0000000000000000000005"</literal>, or
  1804. <literal>"9223372036854775807"</literal>.
  1805. </para>
  1806. <para>Invalid values include <literal>"9223372036854775808"</literal> and
  1807. <literal>"1."</literal>.
  1808. </para>
  1809. </refsect1>
  1810. </refentry>
  1811. <refentry id="ch16-77131">
  1812. <refmeta>
  1813. <refentrytitle>xsd:Name</refentrytitle>
  1814. </refmeta>
  1815. <refnamediv>
  1816. <indexterm id="IXT-16-166149"><primary>xsd:Name type</primary></indexterm><refname>xsd:Name</refname>
  1817. <refpurpose>XML 1.O names.
  1818. </refpurpose>
  1819. </refnamediv>
  1820. <refsect1>
  1821. <title>Derived from:</title>
  1822. <para>xsd:token </para>
  1823. </refsect1>
  1824. <refsect1>
  1825. <title>Primary:</title>
  1826. <para>xsd:string </para>
  1827. </refsect1>
  1828. <refsect1>
  1829. <title>Known subtypes:</title>
  1830. <para>xsd:NCName </para>
  1831. </refsect1>
  1832. <refsect1>
  1833. <title>Facets:</title>
  1834. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  1835. xsd:whiteSpace
  1836. </para>
  1837. </refsect1>
  1838. <refsynopsisdiv>
  1839. <synopsis>
  1840. &lt;xsd:simpleType name="Name" id="Name"&gt;
  1841. &lt;xsd:restriction base="xsd:token"&gt;
  1842. &lt;xsd:pattern value="\i\c*"/&gt;
  1843. &lt;/xsd:restriction&gt;
  1844. &lt;/xsd:simpleType&gt;
  1845. </synopsis>
  1846. </refsynopsisdiv>
  1847. <refsect1>
  1848. <title>Description</title>
  1849. <para>The lexical and value spaces of <literal>xsd:Name</literal> are the
  1850. tokens (<literal>NMTOKEN</literal>) that conform to the definition of
  1851. a name in XML 1.0.
  1852. </para>
  1853. </refsect1>
  1854. <refsect1>
  1855. <title>Restrictions</title>
  1856. <para>Following XML 1.0, those names may contain colons
  1857. (":"), but no special meaning is
  1858. attached to these characters. Another datatype
  1859. (<literal>xsd:QName</literal>) should be used for qualified names when
  1860. they use namespaces prefixes.
  1861. </para>
  1862. </refsect1>
  1863. <refsect1>
  1864. <title>Example</title>
  1865. <para>Valid values include <literal>"Snoopy"</literal>,
  1866. <literal>"CMS"</literal>, or <literal>"_1950-10-04_10:00"</literal>.
  1867. </para>
  1868. <para>Invalid values include <literal>"0836217462"</literal> (a
  1869. <literal>xsd:Name</literal> cannot start with a number) or
  1870. <literal>"bold,brash"</literal> (commas are forbidden).
  1871. </para>
  1872. </refsect1>
  1873. </refentry>
  1874. <refentry id="ch16-77136">
  1875. <refmeta>
  1876. <refentrytitle>xsd:NCName</refentrytitle>
  1877. </refmeta>
  1878. <refnamediv>
  1879. <indexterm id="IXT-16-166150"><primary>xsd:NCName type</primary></indexterm><refname>xsd:NCName</refname>
  1880. <refpurpose>Unqualified names.
  1881. </refpurpose>
  1882. </refnamediv>
  1883. <refsect1>
  1884. <title>Derived from:</title>
  1885. <para>xsd:Name </para>
  1886. </refsect1>
  1887. <refsect1>
  1888. <title>Primary:</title>
  1889. <para>xsd:string </para>
  1890. </refsect1>
  1891. <refsect1>
  1892. <title>Known subtypes:</title>
  1893. <para>xsd:ID, xsd:IDREF, xsd:ENTITY </para>
  1894. </refsect1>
  1895. <refsect1>
  1896. <title>Facets:</title>
  1897. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  1898. xsd:whiteSpace
  1899. </para>
  1900. </refsect1>
  1901. <refsynopsisdiv>
  1902. <synopsis>
  1903. &lt;xsd:simpleType name="NCName" id="NCName"&gt;
  1904. &lt;xsd:restriction base="xsd:Name"&gt;
  1905. &lt;xsd:pattern value="[\i-[:]][\c-[:]]*"/&gt;
  1906. &lt;/xsd:restriction&gt;
  1907. &lt;/xsd:simpleType&gt;
  1908. </synopsis>
  1909. </refsynopsisdiv>
  1910. <refsect1>
  1911. <title>Description</title>
  1912. <para>The lexical and value spaces of <literal>xsd:NCName</literal> are the
  1913. names (<literal>Name</literal>) that conform to the definition of a
  1914. <literal>NCName</literal> in the Recommendation
  1915. "Namespaces in XML 1.0"&#8212;i.e.,
  1916. all the XML 1.0 names that do not contain colons
  1917. (":").
  1918. </para>
  1919. </refsect1>
  1920. <refsect1>
  1921. <title>Restrictions</title>
  1922. <para>This datatype allows characters such as
  1923. "-" and may need additional
  1924. constraints to match the notion of name in your favorite programming
  1925. language or database system.
  1926. </para>
  1927. </refsect1>
  1928. <refsect1>
  1929. <title>Example</title>
  1930. <para>Valid values include <literal>"Snoopy"</literal>,
  1931. <literal>"CMS"</literal>, <literal>"_1950-10-04_10-00"</literal>, or
  1932. <literal>"bold_brash"</literal>.
  1933. </para>
  1934. <para>Invalid values include <literal>"_1950-10-04:10-00"</literal> or
  1935. <literal>"bold:brash"</literal> (colons are forbidden).
  1936. </para>
  1937. </refsect1>
  1938. </refentry>
  1939. <refentry id="ch16-77141">
  1940. <refmeta>
  1941. <refentrytitle>xsd:negativeInteger</refentrytitle>
  1942. </refmeta>
  1943. <refnamediv>
  1944. <indexterm id="IXT-16-166151"><primary>xsd:negativeInteger type</primary></indexterm><refname>xsd:negativeInteger</refname>
  1945. <refpurpose>Strictly negative integers of arbitrary length.
  1946. </refpurpose>
  1947. </refnamediv>
  1948. <refsect1>
  1949. <title>Derived from:</title>
  1950. <para>xsd:nonPositiveInteger </para>
  1951. </refsect1>
  1952. <refsect1>
  1953. <title>Primary:</title>
  1954. <para>xsd:decimal </para>
  1955. </refsect1>
  1956. <refsect1>
  1957. <title>Known subtypes:</title>
  1958. <para>none</para>
  1959. </refsect1>
  1960. <refsect1>
  1961. <title>Facets:</title>
  1962. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  1963. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  1964. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  1965. </para>
  1966. </refsect1>
  1967. <refsynopsisdiv>
  1968. <synopsis>
  1969. &lt;xsd:simpleType name="negativeInteger" id="negativeInteger"&gt;
  1970. &lt;xsd:restriction base="xsd:nonPositiveInteger"&gt;
  1971. &lt;xsd:maxInclusive value="-1"/&gt;
  1972. &lt;/xsd:restriction&gt;
  1973. &lt;/xsd:simpleType&gt;
  1974. </synopsis>
  1975. </refsynopsisdiv>
  1976. <refsect1>
  1977. <title>Description</title>
  1978. <para>The value space of <literal>xsd:negativeInteger</literal> includes the
  1979. set of all the strictly negative integers (excluding zero), with no
  1980. restriction of range. Its lexical space allows any number of
  1981. insignificant leading zeros.
  1982. </para>
  1983. </refsect1>
  1984. <refsect1>
  1985. <title>Restrictions</title>
  1986. <para>The decimal point (even when followed only by insignificant zeros) is
  1987. forbidden.
  1988. </para>
  1989. </refsect1>
  1990. <refsect1>
  1991. <title>Example</title>
  1992. <para>Valid values for <literal>xsd:negativeInteger</literal> include
  1993. <literal>"-123456789012345678901234567890"</literal>,
  1994. <literal>"-1"</literal>, or
  1995. <literal>"-0000000000000000000005"</literal>.
  1996. </para>
  1997. <para>Invalid values include <literal>"0"</literal> or
  1998. <literal>"-1."</literal>.
  1999. </para>
  2000. </refsect1>
  2001. </refentry>
  2002. <refentry id="ch16-77146">
  2003. <refmeta>
  2004. <refentrytitle>xsd:NMTOKEN</refentrytitle>
  2005. </refmeta>
  2006. <refnamediv>
  2007. <indexterm id="IXT-16-166152"><primary>xsd:NMTOKEN type</primary></indexterm><refname>xsd:NMTOKEN</refname>
  2008. <refpurpose>XML 1.0 name token (NMTOKEN).
  2009. </refpurpose>
  2010. </refnamediv>
  2011. <refsect1>
  2012. <title>Derived from:</title>
  2013. <para>xsd:token </para>
  2014. </refsect1>
  2015. <refsect1>
  2016. <title>Primary:</title>
  2017. <para>xsd:string </para>
  2018. </refsect1>
  2019. <refsect1>
  2020. <title>Known subtypes:</title>
  2021. <para>xsd:NMTOKENS </para>
  2022. </refsect1>
  2023. <refsect1>
  2024. <title>Facets:</title>
  2025. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  2026. xsd:whiteSpace
  2027. </para>
  2028. </refsect1>
  2029. <refsynopsisdiv>
  2030. <synopsis>
  2031. &lt;xsd:simpleType name="NMTOKEN" id="NMTOKEN"&gt;
  2032. &lt;xsd:restriction base="xsd:token"&gt;
  2033. &lt;xsd:pattern value="\c+"/&gt;
  2034. &lt;/xsd:restriction&gt;
  2035. &lt;/xsd:simpleType&gt;
  2036. </synopsis>
  2037. </refsynopsisdiv>
  2038. <refsect1>
  2039. <title>Description</title>
  2040. <para>The lexical and value spaces of <literal>xsd:NMTOKEN</literal> are the
  2041. set of XML 1.0 "name tokens," i.e.,
  2042. tokens composed of characters, digits,
  2043. ".",
  2044. ":",
  2045. "-", and the characters defined by
  2046. Unicode, such as "combining" or
  2047. "extender".
  2048. </para>
  2049. </refsect1>
  2050. <refsect1>
  2051. <title>Restrictions</title>
  2052. <para>This type is usually called a
  2053. "token."
  2054. </para>
  2055. </refsect1>
  2056. <refsect1>
  2057. <title>Example</title>
  2058. <para>Valid values include <literal>"Snoopy"</literal>,
  2059. <literal>"CMS"</literal>, <literal>"1950-10-04"</literal>, or
  2060. <literal>"0836217462"</literal>.
  2061. </para>
  2062. <para>Invalid values include <literal>"brought</literal>
  2063. <literal>classical</literal> <literal>music</literal>
  2064. <literal>to</literal> <literal>the</literal>
  2065. <literal>Peanuts</literal> <literal>strip"</literal> (spaces are
  2066. forbidden) or <literal>"bold,brash"</literal> (commas are forbidden).
  2067. </para>
  2068. </refsect1>
  2069. </refentry>
  2070. <refentry id="ch16-77151">
  2071. <refmeta>
  2072. <refentrytitle>xsd:NMTOKENS</refentrytitle>
  2073. </refmeta>
  2074. <refnamediv>
  2075. <indexterm id="IXT-16-166153"><primary>xsd:NMTOKENS type</primary></indexterm><refname>xsd:NMTOKENS</refname>
  2076. <refpurpose>List of XML 1.0 name token (NMTOKEN).
  2077. </refpurpose>
  2078. </refnamediv>
  2079. <refsect1>
  2080. <title>Derived from:</title>
  2081. <para>xsd:NMTOKEN </para>
  2082. </refsect1>
  2083. <refsect1>
  2084. <title>Primary:</title>
  2085. <para>none</para>
  2086. </refsect1>
  2087. <refsect1>
  2088. <title>Known subtypes:</title>
  2089. <para>none</para>
  2090. </refsect1>
  2091. <refsect1>
  2092. <title>Facets:</title>
  2093. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:whiteSpace </para>
  2094. </refsect1>
  2095. <refsynopsisdiv>
  2096. <synopsis>
  2097. &lt;xsd:simpleType name="NMTOKENS" id="NMTOKENS"&gt;
  2098. &lt;xsd:restriction&gt;
  2099. &lt;xsd:simpleType&gt;
  2100. &lt;xsd:list&gt;
  2101. &lt;xsd:simpleType&gt;
  2102. &lt;xsd:restriction base="xsd:NMTOKEN"/&gt;
  2103. &lt;/xsd:simpleType&gt;
  2104. &lt;/xsd:list&gt;
  2105. &lt;/xsd:simpleType&gt;
  2106. &lt;xsd:minLength value="1"/&gt;
  2107. &lt;/xsd:restriction&gt;
  2108. &lt;/xsd:simpleType&gt;
  2109. </synopsis>
  2110. </refsynopsisdiv>
  2111. <refsect1>
  2112. <title>Description</title>
  2113. <para><literal>xsd:NMTOKENS</literal> is derived by list from
  2114. <literal>xsd:NMTOKEN</literal> and represents whitespace-separated
  2115. lists of XML 1.0 name tokens.
  2116. </para>
  2117. </refsect1>
  2118. <refsect1>
  2119. <title>Restrictions</title>
  2120. <para>None.</para>
  2121. </refsect1>
  2122. <refsect1>
  2123. <title>Example</title>
  2124. <para>Valid values include <literal>"Snoopy"</literal>,
  2125. <literal>"CMS"</literal>, <literal>"1950-10-04"</literal>,
  2126. <literal>"0836217462 0836217463"</literal>, or
  2127. <literal>"brought</literal> <literal>classical</literal>
  2128. <literal>music</literal> <literal>to</literal> <literal>the</literal>
  2129. <literal>Peanuts</literal> <literal>strip"</literal> (note that, in
  2130. this case, the sentence is considered as a list of words).
  2131. </para>
  2132. <para>Invalid values include <literal>"brought</literal>
  2133. <literal>classical</literal> <literal>music</literal>
  2134. <literal>to</literal> <literal>the</literal>
  2135. <literal>"Peanuts"</literal> <literal>strip"</literal> (quotes are
  2136. forbidden) or <literal>"bold,brash"</literal> (commas are forbidden).
  2137. </para>
  2138. </refsect1>
  2139. </refentry>
  2140. <refentry id="ch16-77156">
  2141. <refmeta>
  2142. <refentrytitle>xsd:nonNegativeInteger</refentrytitle>
  2143. </refmeta>
  2144. <refnamediv>
  2145. <indexterm id="IXT-16-166154"><primary>xsd:nonNegativeInteger type</primary></indexterm><refname>xsd:nonNegativeInteger</refname>
  2146. <refpurpose>Integers of arbitrary length positive or equal to zero.
  2147. </refpurpose>
  2148. </refnamediv>
  2149. <refsect1>
  2150. <title>Derived from:</title>
  2151. <para>xsd:integer </para>
  2152. </refsect1>
  2153. <refsect1>
  2154. <title>Primary:</title>
  2155. <para>xsd:decimal </para>
  2156. </refsect1>
  2157. <refsect1>
  2158. <title>Known subtypes:</title>
  2159. <para>xsd:unsignedLong, xsd:positiveInteger </para>
  2160. </refsect1>
  2161. <refsect1>
  2162. <title>Facets:</title>
  2163. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2164. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2165. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2166. </para>
  2167. </refsect1>
  2168. <refsynopsisdiv>
  2169. <synopsis>
  2170. &lt;xsd:simpleType name="nonNegativeInteger" id="nonNegativeInteger"&gt;
  2171. &lt;xsd:restriction base="xsd:integer"&gt;
  2172. &lt;xsd:minInclusive value="0"/&gt;
  2173. &lt;/xsd:restriction&gt;
  2174. &lt;/xsd:simpleType&gt;
  2175. </synopsis>
  2176. </refsynopsisdiv>
  2177. <refsect1>
  2178. <title>Description</title>
  2179. <para>The value space of <literal>xsd:nonNegativeInteger</literal> includes
  2180. the set of all the integers greater than or equal to zero, with no
  2181. restriction of range. Its lexical space allows any number of
  2182. insignificant leading zeros.
  2183. </para>
  2184. </refsect1>
  2185. <refsect1>
  2186. <title>Restrictions</title>
  2187. <para>The decimal point (even when followed only by insignificant zeros) is
  2188. forbidden.
  2189. </para>
  2190. </refsect1>
  2191. <refsect1>
  2192. <title>Example</title>
  2193. <para>Valid values include
  2194. <literal>"+123456789012345678901234567890"</literal>,
  2195. <literal>"0"</literal>, <literal>"0000000000000000000005"</literal>,
  2196. or <literal>"2147483647"</literal>.
  2197. </para>
  2198. <para>Invalid values include <literal>"1."</literal> or
  2199. <literal>"-1."</literal>.
  2200. </para>
  2201. </refsect1>
  2202. </refentry>
  2203. <refentry id="ch16-77161">
  2204. <refmeta>
  2205. <refentrytitle>xsd:nonPositiveInteger</refentrytitle>
  2206. </refmeta>
  2207. <refnamediv>
  2208. <indexterm id="IXT-16-166155"><primary>xsd:nonPositiveInteger type</primary></indexterm><refname>xsd:nonPositiveInteger</refname>
  2209. <refpurpose>Integers of arbitrary length negative or equal to zero.
  2210. </refpurpose>
  2211. </refnamediv>
  2212. <refsect1>
  2213. <title>Derived from:</title>
  2214. <para>xsd:integer </para>
  2215. </refsect1>
  2216. <refsect1>
  2217. <title>Primary:</title>
  2218. <para>xsd:decimal </para>
  2219. </refsect1>
  2220. <refsect1>
  2221. <title>Known subtypes:</title>
  2222. <para>xsd:negativeInteger </para>
  2223. </refsect1>
  2224. <refsect1>
  2225. <title>Facets:</title>
  2226. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2227. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2228. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2229. </para>
  2230. </refsect1>
  2231. <refsynopsisdiv>
  2232. <synopsis>
  2233. &lt;xsd:simpleType name="nonPositiveInteger" id="nonPositiveInteger"&gt;
  2234. &lt;xsd:restriction base="xsd:integer"&gt;
  2235. &lt;xsd:maxInclusive value="0"/&gt;
  2236. &lt;/xsd:restriction&gt;
  2237. &lt;/xsd:simpleType&gt;
  2238. </synopsis>
  2239. </refsynopsisdiv>
  2240. <refsect1>
  2241. <title>Description</title>
  2242. <para>The value space of <literal>xsd:nonPositiveInteger</literal> includes
  2243. the set of all the integers less than or equal to zero, with no
  2244. restriction of range. Its lexical space allows any number of
  2245. insignificant leading zeros.
  2246. </para>
  2247. </refsect1>
  2248. <refsect1>
  2249. <title>Restrictions</title>
  2250. <para>The decimal point (even when followed only by insignificant zeros) is
  2251. forbidden.
  2252. </para>
  2253. </refsect1>
  2254. <refsect1>
  2255. <title>Example</title>
  2256. <para>Valid values include
  2257. <literal>"-123456789012345678901234567890"</literal>,
  2258. <literal>"0"</literal>, <literal>"-0000000000000000000005"</literal>,
  2259. or <literal>"-2147483647"</literal>.
  2260. </para>
  2261. <para>Invalid values include <literal>"-1."</literal> or
  2262. <literal>"1."</literal>.
  2263. </para>
  2264. </refsect1>
  2265. </refentry>
  2266. <refentry id="ch16-77166">
  2267. <refmeta>
  2268. <refentrytitle>xsd:normalizedString</refentrytitle>
  2269. </refmeta>
  2270. <refnamediv>
  2271. <indexterm id="IXT-16-166156"><primary>xsd:normalizedString type</primary></indexterm><refname>xsd:normalizedString</refname>
  2272. <refpurpose>Whitespace-replaced strings.
  2273. </refpurpose>
  2274. </refnamediv>
  2275. <refsect1>
  2276. <title>Derived from:</title>
  2277. <para>xsd:string </para>
  2278. </refsect1>
  2279. <refsect1>
  2280. <title>Primary:</title>
  2281. <para>xsd:string </para>
  2282. </refsect1>
  2283. <refsect1>
  2284. <title>Known subtypes:</title>
  2285. <para>xsd:token </para>
  2286. </refsect1>
  2287. <refsect1>
  2288. <title>Facets:</title>
  2289. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  2290. xsd:whiteSpace
  2291. </para>
  2292. </refsect1>
  2293. <refsynopsisdiv>
  2294. <synopsis>
  2295. &lt;xsd:simpleType name="normalizedString" id="normalizedString"&gt;
  2296. &lt;xsd:restriction base="xsd:string"&gt;
  2297. &lt;xsd:whiteSpace value="replace"/&gt;
  2298. &lt;/xsd:restriction&gt;
  2299. &lt;/xsd:simpleType&gt;
  2300. </synopsis>
  2301. </refsynopsisdiv>
  2302. <refsect1>
  2303. <title>Description</title>
  2304. <para>The lexical space of <literal>xsd:normalizedString</literal> is
  2305. unconstrained (any valid XML character may be used), and its value
  2306. space is the set of strings after whitespace replacement (i.e., after
  2307. any occurrence of <literal>#x9</literal> (tab),
  2308. <literal>#xA</literal> (linefeed), and <literal>#xD</literal>
  2309. (carriage return) have been replaced by an occurrence of
  2310. <literal>#x20</literal> (space) without any whitespace collapsing).
  2311. </para>
  2312. </refsect1>
  2313. <refsect1>
  2314. <title>Restrictions</title>
  2315. <para>This is the only datatype that performs whitespace replacement
  2316. without collapsing. When whitespaces are not significant,
  2317. <literal>xsd:token</literal> is preferred.
  2318. </para>
  2319. <para>This datatype corresponds to neither the XPath function
  2320. <literal>normalize-space( )</literal> (which performs whitespace
  2321. trimming and collapsing) nor to the DOM
  2322. "normalize" method (which is a
  2323. merge of adjacent text objects).
  2324. </para>
  2325. </refsect1>
  2326. <refsect1>
  2327. <title>Example</title>
  2328. <para>The value of the element:</para>
  2329. <programlisting>&lt;title lang="en"&gt;
  2330. Being a Dog Is
  2331. a Full-Time Job
  2332. &lt;/title&gt;"</programlisting>
  2333. <para>is the string: <literal>"</literal> <literal>Being</literal>
  2334. <literal>a</literal> <literal>Dog</literal> <literal>Is</literal>
  2335. <literal>a</literal> <literal>Full-Time</literal>
  2336. <literal>Job</literal> <literal>"</literal>, where all the
  2337. whitespaces have been replaced by spaces if the title element is a
  2338. type <literal>xsd:normalizedString</literal>.
  2339. </para>
  2340. </refsect1>
  2341. </refentry>
  2342. <refentry id="ch16-77171">
  2343. <refmeta>
  2344. <refentrytitle>xsd:NOTATION</refentrytitle>
  2345. </refmeta>
  2346. <refnamediv>
  2347. <indexterm id="IXT-16-166157"><primary>xsd:NOTATION type</primary></indexterm><refname>xsd:NOTATION</refname>
  2348. <refpurpose>Emulation of the XML 1.0 feature.
  2349. </refpurpose>
  2350. </refnamediv>
  2351. <refsect1>
  2352. <title>Derived from:</title>
  2353. <para>xsd:anySimpleType </para>
  2354. </refsect1>
  2355. <refsect1>
  2356. <title>Primary:</title>
  2357. <para>xsd:NOTATION </para>
  2358. </refsect1>
  2359. <refsect1>
  2360. <title>Known subtypes:</title>
  2361. <para>none</para>
  2362. </refsect1>
  2363. <refsect1>
  2364. <title>Facets:</title>
  2365. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  2366. <emphasis>xsd:whiteSpace</emphasis>
  2367. </para>
  2368. </refsect1>
  2369. <refsynopsisdiv>
  2370. <synopsis>
  2371. &lt;xsd:simpleType name="NOTATION" id="NOTATION"&gt;
  2372. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  2373. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  2374. &lt;/xsd:restriction&gt;
  2375. &lt;/xsd:simpleType&gt;
  2376. </synopsis>
  2377. </refsynopsisdiv>
  2378. <refsect1>
  2379. <title>Description</title>
  2380. <para>For W3C XML Schema, the value and lexical spaces of <literal>xsd:NOTATION</literal> are
  2381. references to notations declared though the
  2382. <literal>xsd:notation</literal> element. This element doesn't exist in Relax NG where this datatype can be seen as a synonym for <literal>xsd:QName</literal> with backward compatibility for W3C XML Schema.</para>
  2383. </refsect1>
  2384. <refsect1>
  2385. <title>Restrictions</title>
  2386. <para>Notations are very seldom used in real-world applications.</para>
  2387. <para>One cannot use <literal>xsd:notation</literal> directly, but must
  2388. derive it as shown in the Example.
  2389. </para>
  2390. </refsect1>
  2391. <refsect1>
  2392. <title>Example</title>
  2393. <programlisting>&lt;xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  2394. &lt;xsd:notation name="jpeg" public="image/jpeg"
  2395. system="file:///usr/bin/xv"/&gt;
  2396. &lt;xsd:notation name="gif" public="image/gif"
  2397. system="file:///usr/bin/xv"/&gt;
  2398. &lt;xsd:notation name="png" public="image/png"
  2399. system="file:///usr/bin/xv"/&gt;
  2400. &lt;xsd:notation name="svg" public="image/svg"
  2401. system="file:///usr/bin/xsmiles"/&gt;
  2402. &lt;xsd:notation name="pdf" public="application/pdf"
  2403. system="file:///usr/bin/acroread"/&gt;
  2404. &lt;xsd:simpleType name="graphicalFormat"&gt;
  2405. &lt;xsd:restriction base="xsd:NOTATION"&gt;
  2406. &lt;xsd:enumeration value="jpeg"/&gt;
  2407. &lt;xsd:enumeration value="gif"/&gt;
  2408. &lt;xsd:enumeration value="png"/&gt;
  2409. &lt;xsd:enumeration value="svg"/&gt;
  2410. &lt;xsd:enumeration value="pdf"/&gt;
  2411. &lt;/xsd:restriction&gt;
  2412. &lt;/xsd:simpleType&gt;
  2413. &lt;xsd:element name="picture"&gt;
  2414. &lt;xsd:complexType&gt;
  2415. &lt;xsd:simpleContent&gt;
  2416. &lt;xsd:extension base="xsd:base64Binary"&gt;
  2417. &lt;xsd:attribute name="type" type="graphicalFormat"/&gt;
  2418. &lt;/xsd:extension&gt;
  2419. &lt;/xsd:simpleContent&gt;
  2420. &lt;/xsd:complexType&gt;
  2421. &lt;/xsd:element&gt;
  2422. &lt;/xsd:schema&gt;</programlisting>
  2423. </refsect1>
  2424. </refentry>
  2425. <refentry id="ch16-77176">
  2426. <refmeta>
  2427. <refentrytitle>xsd:positiveInteger</refentrytitle>
  2428. </refmeta>
  2429. <refnamediv>
  2430. <indexterm id="IXT-16-166158"><primary>xsd:positiveInteger type</primary></indexterm><refname>xsd:positiveInteger</refname>
  2431. <refpurpose>Strictly positive integers of arbitrary length.
  2432. </refpurpose>
  2433. </refnamediv>
  2434. <refsect1>
  2435. <title>Derived from:</title>
  2436. <para>xsd:nonNegativeInteger </para>
  2437. </refsect1>
  2438. <refsect1>
  2439. <title>Primary:</title>
  2440. <para>xsd:decimal </para>
  2441. </refsect1>
  2442. <refsect1>
  2443. <title>Known subtypes:</title>
  2444. <para>none</para>
  2445. </refsect1>
  2446. <refsect1>
  2447. <title>Facets:</title>
  2448. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2449. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2450. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2451. </para>
  2452. </refsect1>
  2453. <refsynopsisdiv>
  2454. <synopsis>
  2455. &lt;xsd:simpleType name="positiveInteger" id="positiveInteger"&gt;
  2456. &lt;xsd:restriction base="xsd:nonNegativeInteger"&gt;
  2457. &lt;xsd:minInclusive value="1"/&gt;
  2458. &lt;/xsd:restriction&gt;
  2459. &lt;/xsd:simpleType&gt;
  2460. </synopsis>
  2461. </refsynopsisdiv>
  2462. <refsect1>
  2463. <title>Description</title>
  2464. <para>The value space of <literal>xsd:positiveInteger</literal> includes the
  2465. set of the strictly positive integers (excluding zero), with no
  2466. restriction of range. Its lexical space allows any number of
  2467. insignificant leading zeros.
  2468. </para>
  2469. </refsect1>
  2470. <refsect1>
  2471. <title>Restrictions</title>
  2472. <para>The decimal point (even when followed only by insignificant zeros) is
  2473. forbidden.
  2474. </para>
  2475. </refsect1>
  2476. <refsect1>
  2477. <title>Example</title>
  2478. <para>Valid values include
  2479. <literal>"123456789012345678901234567890"</literal>,
  2480. <literal>"1"</literal>, or
  2481. <literal>"0000000000000000000005"</literal>.
  2482. </para>
  2483. <para>Invalid values include <literal>"0"</literal> or
  2484. <literal>"1."</literal>.
  2485. </para>
  2486. </refsect1>
  2487. </refentry>
  2488. <refentry id="ch16-77181">
  2489. <refmeta>
  2490. <refentrytitle>xsd:QName</refentrytitle>
  2491. </refmeta>
  2492. <refnamediv>
  2493. <indexterm id="IXT-16-166159"><primary>xsd:QName type</primary></indexterm><refname>xsd:QName</refname>
  2494. <refpurpose>Namespaces in XML qualified names.
  2495. </refpurpose>
  2496. </refnamediv>
  2497. <refsect1>
  2498. <title>Derived from:</title>
  2499. <para>xsd:anySimpleType </para>
  2500. </refsect1>
  2501. <refsect1>
  2502. <title>Primary:</title>
  2503. <para>xsd:QName </para>
  2504. </refsect1>
  2505. <refsect1>
  2506. <title>Known subtypes:</title>
  2507. <para>none</para>
  2508. </refsect1>
  2509. <refsect1>
  2510. <title>Facets:</title>
  2511. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  2512. <emphasis>xsd:whiteSpace</emphasis>
  2513. </para>
  2514. </refsect1>
  2515. <refsynopsisdiv>
  2516. <synopsis>
  2517. &lt;xsd:simpleType name="QName" id="QName"&gt;
  2518. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  2519. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  2520. &lt;/xsd:restriction&gt;
  2521. &lt;/xsd:simpleType&gt;
  2522. </synopsis>
  2523. </refsynopsisdiv>
  2524. <refsect1>
  2525. <title>Description</title>
  2526. <para>The lexical space of <literal>xsd:QName</literal> is the qualified
  2527. names per Namespace in XML, i.e., a local name (which is a
  2528. <literal>xsd:NCName</literal>) with an optional prefix (itself a
  2529. <literal>xsd:NCName</literal>), separated by a colon
  2530. (":"), where the prefix is declared
  2531. a namespace prefix in the scope of the element carrying the value.
  2532. Its value space comprises the pairs (namespace URI, local name) in
  2533. which the namespace URI is the URI associated to the prefix in the
  2534. namespace declaration.
  2535. </para>
  2536. </refsect1>
  2537. <refsect1>
  2538. <title>Restrictions</title>
  2539. <para>It is impossible to apply a pattern on the namespace URI.</para>
  2540. <para>The usage of <literal>QNames</literal> in elements and attributes is
  2541. controversial since it creates a dependency between the content of
  2542. the document and its markup. However, the official position of the
  2543. W3C doesn't discourage this practice.
  2544. </para>
  2545. </refsect1>
  2546. <refsect1>
  2547. <title>Example</title>
  2548. <para>W3C XML Schema itself has already given us some examples of QNames.
  2549. When we wrote <literal>"&lt;xsd:attribute name="lang"
  2550. type="xsd:language"/&gt;"</literal>, the type attribute was a
  2551. <literal>xsd:QName</literal> and its value was the tuple
  2552. <literal>{"http://www.w3.org/2001/XMLSchema",</literal>
  2553. <literal>"language"}</literal> because the URI
  2554. <literal>"http://www.w3.org/2001/XMLSchema"</literal> had been
  2555. assigned to the prefix <literal>"xsd:"</literal>. If there had been no
  2556. namespace declaration for this prefix, the type attribute would have
  2557. been considered invalid.
  2558. </para>
  2559. </refsect1>
  2560. </refentry>
  2561. <refentry id="ch16-77186">
  2562. <refmeta>
  2563. <refentrytitle>xsd:short</refentrytitle>
  2564. </refmeta>
  2565. <refnamediv>
  2566. <indexterm id="IXT-16-166160"><primary>xsd:short type</primary></indexterm><refname>xsd:short</refname>
  2567. <refpurpose>32 bit signed integers.
  2568. </refpurpose>
  2569. </refnamediv>
  2570. <refsect1>
  2571. <title>Derived from:</title>
  2572. <para>xsd:int </para>
  2573. </refsect1>
  2574. <refsect1>
  2575. <title>Primary:</title>
  2576. <para>xsd:decimal </para>
  2577. </refsect1>
  2578. <refsect1>
  2579. <title>Known subtypes:</title>
  2580. <para>xsd:byte </para>
  2581. </refsect1>
  2582. <refsect1>
  2583. <title>Facets:</title>
  2584. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2585. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2586. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2587. </para>
  2588. </refsect1>
  2589. <refsynopsisdiv>
  2590. <synopsis>
  2591. &lt;xsd:simpleType name="short" id="short"&gt;
  2592. &lt;xsd:restriction base="xsd:int"&gt;
  2593. &lt;xsd:minInclusive value="-32768"/&gt;
  2594. &lt;xsd:maxInclusive value="32767"/&gt;
  2595. &lt;/xsd:restriction&gt;
  2596. &lt;/xsd:simpleType&gt;
  2597. </synopsis>
  2598. </refsynopsisdiv>
  2599. <refsect1>
  2600. <title>Description</title>
  2601. <para>The value space of <literal>xsd:short</literal> is the set of common
  2602. short integers (16 bits), i.e., the integers between -32768 and
  2603. 32767; its lexical space allows any number of insignificant leading
  2604. zeros.
  2605. </para>
  2606. </refsect1>
  2607. <refsect1>
  2608. <title>Restrictions</title>
  2609. <para>The decimal point (even when followed only by insignificant zeros) is
  2610. forbidden.
  2611. </para>
  2612. </refsect1>
  2613. <refsect1>
  2614. <title>Example</title>
  2615. <para>Valid values include <literal>"-32768"</literal>,
  2616. <literal>"0"</literal>, <literal>"-0000000000000000000005"</literal>,
  2617. or <literal>"32767"</literal>.
  2618. </para>
  2619. <para>Invalid values include <literal>"32768"</literal> and
  2620. <literal>"1."</literal>.
  2621. </para>
  2622. </refsect1>
  2623. </refentry>
  2624. <refentry id="ch16-77191">
  2625. <refmeta>
  2626. <refentrytitle>xsd:string</refentrytitle>
  2627. </refmeta>
  2628. <refnamediv>
  2629. <indexterm id="IXT-16-166161"><primary>xsd:string type</primary></indexterm><refname>xsd:string</refname>
  2630. <refpurpose>Any string.
  2631. </refpurpose>
  2632. </refnamediv>
  2633. <refsect1>
  2634. <title>Derived from:</title>
  2635. <para>xsd:anySimpleType </para>
  2636. </refsect1>
  2637. <refsect1>
  2638. <title>Primary:</title>
  2639. <para>xsd:string </para>
  2640. </refsect1>
  2641. <refsect1>
  2642. <title>Known subtypes:</title>
  2643. <para>xsd:normalizedString </para>
  2644. </refsect1>
  2645. <refsect1>
  2646. <title>Facets:</title>
  2647. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  2648. xsd:whiteSpace
  2649. </para>
  2650. </refsect1>
  2651. <refsynopsisdiv>
  2652. <synopsis>
  2653. &lt;xsd:simpleType name="string" id="string"&gt;
  2654. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  2655. &lt;xsd:whiteSpace value="preserve"/&gt;
  2656. &lt;/xsd:restriction&gt;
  2657. &lt;/xsd:simpleType&gt;
  2658. </synopsis>
  2659. </refsynopsisdiv>
  2660. <refsect1>
  2661. <title>Description</title>
  2662. <para>The lexical and value spaces of <literal>xsd:string</literal> are the
  2663. set of all possible strings composed of any character allowed in a
  2664. XML 1.0 document without any treatment done on whitespaces.
  2665. </para>
  2666. </refsect1>
  2667. <refsect1>
  2668. <title>Restrictions</title>
  2669. <para>This is the only datatype that leaves all the whitespaces. When
  2670. whitespaces are not significant, <literal>xsd:token</literal> is
  2671. preferred.
  2672. </para>
  2673. </refsect1>
  2674. <refsect1>
  2675. <title>Example</title>
  2676. <para>The value of the following element:</para>
  2677. <programlisting>&lt;title lang="en"&gt;
  2678. Being a Dog Is
  2679. a Full-Time Job
  2680. &lt;/title&gt;</programlisting>
  2681. <para>is the full string <literal>"Being</literal> <literal>a</literal>
  2682. <literal>Dog</literal> <literal>Is</literal> <literal>a</literal>
  2683. <literal>Full-Time</literal> <literal>Job"</literal>, with all its
  2684. tabulations and CR/LF if the <literal>title</literal> element is a
  2685. <literal>xsd:string</literal> type .
  2686. </para>
  2687. </refsect1>
  2688. </refentry>
  2689. <refentry id="ch16-77196">
  2690. <refmeta>
  2691. <refentrytitle>xsd:time</refentrytitle>
  2692. </refmeta>
  2693. <refnamediv>
  2694. <indexterm id="IXT-16-166162"><primary>xsd:time type</primary></indexterm><refname>xsd:time</refname>
  2695. <refpurpose>Point in time recurring each day.
  2696. </refpurpose>
  2697. </refnamediv>
  2698. <refsect1>
  2699. <title>Derived from:</title>
  2700. <para>xsd:anySimpleType </para>
  2701. </refsect1>
  2702. <refsect1>
  2703. <title>Primary:</title>
  2704. <para>xsd:time </para>
  2705. </refsect1>
  2706. <refsect1>
  2707. <title>Known subtypes:</title>
  2708. <para>none</para>
  2709. </refsect1>
  2710. <refsect1>
  2711. <title>Facets:</title>
  2712. <para>xsd:enumeration, xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive,
  2713. xsd:minInclusive, xsd:pattern, <emphasis>xsd:whiteSpace</emphasis>
  2714. </para>
  2715. </refsect1>
  2716. <refsynopsisdiv>
  2717. <synopsis>
  2718. &lt;xsd:simpleType name="time" id="time"&gt;
  2719. &lt;xsd:restriction base="xsd:anySimpleType"&gt;
  2720. &lt;xsd:whiteSpace value="collapse" fixed="true"/&gt;
  2721. &lt;/xsd:restriction&gt;
  2722. &lt;/xsd:simpleType&gt;
  2723. </synopsis>
  2724. </refsynopsisdiv>
  2725. <refsect1>
  2726. <title>Description</title>
  2727. <para>The lexical space of <literal>xsd:time</literal> is identical to the
  2728. time part of <literal>xsd:dateTime</literal>
  2729. ("hh:mm:ss[Z|(+|-)hh:mm]"); and its
  2730. value space is the set of points in time recurring daily.
  2731. </para>
  2732. </refsect1>
  2733. <refsect1>
  2734. <title>Restrictions</title>
  2735. <para>The period (one day) is fixed and no calendars other than the
  2736. Gregorian are supported.
  2737. </para>
  2738. </refsect1>
  2739. <refsect1>
  2740. <title>Example</title>
  2741. <para>Valid values include <literal>"21:32:52"</literal>,
  2742. <literal>"21:32:52+02:00"</literal>, <literal>"19:32:52Z"</literal>,
  2743. <literal>"19:32:52+00:00"</literal>, or
  2744. <literal>"21:32:52.12679"</literal>.
  2745. </para>
  2746. <para>Invalid values include <literal>"21:32"</literal> (all the parts must
  2747. be specified), <literal>"25:25:10"</literal> (the hour part is out of
  2748. range), <literal>"-10:00:00"</literal> (the hour part is out of
  2749. range), or <literal>"1:20:10"</literal> (all the digits must be
  2750. supplied).
  2751. </para>
  2752. </refsect1>
  2753. </refentry>
  2754. <refentry id="ch16-77201">
  2755. <refmeta>
  2756. <refentrytitle>xsd:token</refentrytitle>
  2757. </refmeta>
  2758. <refnamediv>
  2759. <indexterm id="IXT-16-166163"><primary>xsd:token type</primary></indexterm><refname>xsd:token</refname>
  2760. <refpurpose>Whitespace-replaced and collapsed strings.
  2761. </refpurpose>
  2762. </refnamediv>
  2763. <refsect1>
  2764. <title>Derived from:</title>
  2765. <para>xsd:normalizedString </para>
  2766. </refsect1>
  2767. <refsect1>
  2768. <title>Primary:</title>
  2769. <para>xsd:string </para>
  2770. </refsect1>
  2771. <refsect1>
  2772. <title>Known subtypes:</title>
  2773. <para>xsd:language, xsd:NMTOKEN, xsd:Name </para>
  2774. </refsect1>
  2775. <refsect1>
  2776. <title>Facets:</title>
  2777. <para>xsd:enumeration, xsd:length, xsd:maxLength, xsd:minLength, xsd:pattern,
  2778. xsd:whiteSpace
  2779. </para>
  2780. </refsect1>
  2781. <refsynopsisdiv>
  2782. <synopsis>
  2783. &lt;xsd:simpleType name="token" id="token"&gt;
  2784. &lt;xsd:restriction base="xsd:normalizedString"&gt;
  2785. &lt;xsd:whiteSpace value="collapse"/&gt;
  2786. &lt;/xsd:restriction&gt;
  2787. &lt;/xsd:simpleType&gt;
  2788. </synopsis>
  2789. </refsynopsisdiv>
  2790. <refsect1>
  2791. <title>Description</title>
  2792. <para>The lexical and value spaces of <literal>xsd:token</literal> are the
  2793. sets of all the strings after whitespace replacement&#8212;i.e.,
  2794. after any occurrence of <literal>#x9</literal> (tab),
  2795. <literal>#xA</literal> (linefeed), and <literal>#xD</literal>
  2796. (carriage return) is replaced by an occurrence of
  2797. <literal>#x20</literal> (space) and collapsing (i.e., the contiguous
  2798. occurrences of spaces are replaced by a single space, and leading and
  2799. trailing spaces are removed).
  2800. </para>
  2801. <para>More simply said, <literal>xsd:token</literal> is the most appropriate
  2802. datatype to use for strings that do not care about whitespaces.
  2803. </para>
  2804. </refsect1>
  2805. <refsect1>
  2806. <title>Restrictions</title>
  2807. <para>The name <literal>xsd:token</literal> is misleading since whitespaces
  2808. are allowed within <literal>xsd:token</literal>.
  2809. <literal>xsd:NMTOKEN</literal> is the type corresponding to what is
  2810. usually called "tokens."
  2811. </para>
  2812. </refsect1>
  2813. <refsect1>
  2814. <title>Example</title>
  2815. <para>The element:</para>
  2816. <programlisting>&lt;title lang="en"&gt;
  2817. Being a Dog Is
  2818. a Full-Time Job
  2819. &lt;/title&gt;</programlisting>
  2820. <para>is a valid <literal>xsd:token</literal> and its value is the string
  2821. <literal>"Being</literal> <literal>a</literal> <literal>Dog</literal>
  2822. <literal>Is</literal> <literal>a</literal>
  2823. <literal>Full-Time</literal> <literal>Job"</literal>, where all the
  2824. whitespaces have been replaced by spaces, leading and trailing spaces
  2825. have been removed and contiguous sequences of spaces have been
  2826. replaced by single spaces.
  2827. </para>
  2828. </refsect1>
  2829. </refentry>
  2830. <refentry id="ch16-77206">
  2831. <refmeta>
  2832. <refentrytitle>xsd:unsignedByte</refentrytitle>
  2833. </refmeta>
  2834. <refnamediv>
  2835. <indexterm id="IXT-16-166164"><primary>xsd:unsignedByte type</primary></indexterm><refname>xsd:unsignedByte</refname>
  2836. <refpurpose>Unsigned value of 8 bits.
  2837. </refpurpose>
  2838. </refnamediv>
  2839. <refsect1>
  2840. <title>Derived from:</title>
  2841. <para>xsd:unsignedShort </para>
  2842. </refsect1>
  2843. <refsect1>
  2844. <title>Primary:</title>
  2845. <para>xsd:decimal </para>
  2846. </refsect1>
  2847. <refsect1>
  2848. <title>Known subtypes:</title>
  2849. <para>none</para>
  2850. </refsect1>
  2851. <refsect1>
  2852. <title>Facets:</title>
  2853. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2854. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2855. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2856. </para>
  2857. </refsect1>
  2858. <refsynopsisdiv>
  2859. <synopsis>
  2860. &lt;xsd:simpleType name="unsignedByte" id="unsignedBtype"&gt;
  2861. &lt;xsd:restriction base="xsd:unsignedShort"&gt;
  2862. &lt;xsd:maxInclusive value="255"/&gt;
  2863. &lt;/xsd:restriction&gt;
  2864. &lt;/xsd:simpleType&gt;
  2865. </synopsis>
  2866. </refsynopsisdiv>
  2867. <refsect1>
  2868. <title>Description</title>
  2869. <para>The value space of <literal>xsd:unsignedByte</literal> is the integers
  2870. between 0 and 255, i.e., the unsigned values that can fit in a word
  2871. of 8 bits. Its lexical space allows an optional
  2872. "+" sign and leading zeros before
  2873. the significant digits.
  2874. </para>
  2875. </refsect1>
  2876. <refsect1>
  2877. <title>Restrictions</title>
  2878. <para>The lexical space does not allow values expressed in other numeration
  2879. bases (such as hexadecimal, octal, or binary).
  2880. </para>
  2881. <para>The decimal point (even when followed only by insignificant zeros) is
  2882. forbidden.
  2883. </para>
  2884. </refsect1>
  2885. <refsect1>
  2886. <title>Example</title>
  2887. <para>Valid values include <literal>"255"</literal>,
  2888. <literal>"0"</literal>, <literal>"+0000000000000000000005"</literal>,
  2889. or <literal>"1"</literal>.
  2890. </para>
  2891. <para>Invalid values include <literal>"-1"</literal> and
  2892. <literal>"1."</literal>.
  2893. </para>
  2894. </refsect1>
  2895. </refentry>
  2896. <refentry id="ch16-77211">
  2897. <refmeta>
  2898. <refentrytitle>xsd:unsignedInt</refentrytitle>
  2899. </refmeta>
  2900. <refnamediv>
  2901. <indexterm id="IXT-16-166165"><primary>xsd:unsignedInt type</primary></indexterm><refname>xsd:unsignedInt</refname>
  2902. <refpurpose>Unsigned integer of 32 bits.
  2903. </refpurpose>
  2904. </refnamediv>
  2905. <refsect1>
  2906. <title>Derived from:</title>
  2907. <para>xsd:unsignedLong </para>
  2908. </refsect1>
  2909. <refsect1>
  2910. <title>Primary:</title>
  2911. <para>xsd:decimal </para>
  2912. </refsect1>
  2913. <refsect1>
  2914. <title>Known subtypes:</title>
  2915. <para>xsd:unsignedShort </para>
  2916. </refsect1>
  2917. <refsect1>
  2918. <title>Facets:</title>
  2919. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2920. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2921. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2922. </para>
  2923. </refsect1>
  2924. <refsynopsisdiv>
  2925. <synopsis>
  2926. &lt;xsd:simpleType name="unsignedInt" id="unsignedInt"&gt;
  2927. &lt;xsd:restriction base="xsd:unsignedLong"&gt;
  2928. &lt;xsd:maxInclusive value="4294967295"/&gt;
  2929. &lt;/xsd:restriction&gt;
  2930. &lt;/xsd:simpleType&gt;
  2931. </synopsis>
  2932. </refsynopsisdiv>
  2933. <refsect1>
  2934. <title>Description</title>
  2935. <para>The value space of <literal>xsd:unsignedInt</literal> is the integers
  2936. between 0 and 4294967295, i.e., the unsigned values that can fit in a
  2937. word of 32 bits. Its lexical space allows an optional
  2938. "+" sign and leading zeros before
  2939. the significant digits.
  2940. </para>
  2941. </refsect1>
  2942. <refsect1>
  2943. <title>Restrictions</title>
  2944. <para>The decimal point (even when followed only by insignificant zeros) is
  2945. forbidden.
  2946. </para>
  2947. </refsect1>
  2948. <refsect1>
  2949. <title>Example</title>
  2950. <para>Valid values include <literal>"4294967295"</literal>,
  2951. <literal>"0"</literal>, <literal>"+0000000000000000000005"</literal>,
  2952. or <literal>"1"</literal>.
  2953. </para>
  2954. <para>Invalid values include <literal>"-1"</literal> and
  2955. <literal>"1."</literal>.
  2956. </para>
  2957. </refsect1>
  2958. </refentry>
  2959. <refentry id="ch16-77216">
  2960. <refmeta>
  2961. <refentrytitle>xsd:unsignedLong</refentrytitle>
  2962. </refmeta>
  2963. <refnamediv>
  2964. <indexterm id="IXT-16-166166"><primary>xsd:unsignedLong type</primary></indexterm><refname>xsd:unsignedLong</refname>
  2965. <refpurpose>Unsigned integer of 64 bits.
  2966. </refpurpose>
  2967. </refnamediv>
  2968. <refsect1>
  2969. <title>Derived from:</title>
  2970. <para>xsd:nonNegativeInteger </para>
  2971. </refsect1>
  2972. <refsect1>
  2973. <title>Primary:</title>
  2974. <para>xsd:decimal </para>
  2975. </refsect1>
  2976. <refsect1>
  2977. <title>Known subtypes:</title>
  2978. <para>xsd:unsignedInt </para>
  2979. </refsect1>
  2980. <refsect1>
  2981. <title>Facets:</title>
  2982. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  2983. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  2984. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  2985. </para>
  2986. </refsect1>
  2987. <refsynopsisdiv>
  2988. <synopsis>
  2989. &lt;xsd:simpleType name="unsignedLong" id="unsignedLong"&gt;
  2990. &lt;xsd:restriction base="xsd:nonNegativeInteger"&gt;
  2991. &lt;xsd:maxInclusive value="18446744073709551615"/&gt;
  2992. &lt;/xsd:restriction&gt;
  2993. &lt;/xsd:simpleType&gt;
  2994. </synopsis>
  2995. </refsynopsisdiv>
  2996. <refsect1>
  2997. <title>Description</title>
  2998. <para>The value space of <literal>xsd:unsignedLong</literal> is the integers
  2999. between 0 and 18446744073709551615, i.e., the unsigned values that
  3000. can fit in a word of 64 bits. Its lexical space allows an optional
  3001. "+" sign and leading zeros before
  3002. the significant digits.
  3003. </para>
  3004. </refsect1>
  3005. <refsect1>
  3006. <title>Restrictions</title>
  3007. <para>The decimal point (even when followed only by insignificant zeros) is
  3008. forbidden.
  3009. </para>
  3010. </refsect1>
  3011. <refsect1>
  3012. <title>Example</title>
  3013. <para>Valid values include <literal>"18446744073709551615"</literal>,
  3014. <literal>"0"</literal>, <literal>"+0000000000000000000005"</literal>,
  3015. or <literal>"1"</literal>.
  3016. </para>
  3017. <para>Invalid values include <literal>"-1"</literal> and
  3018. <literal>"1."</literal>.
  3019. </para>
  3020. </refsect1>
  3021. </refentry>
  3022. <refentry id="ch16-77221">
  3023. <refmeta>
  3024. <refentrytitle>xsd:unsignedShort</refentrytitle>
  3025. </refmeta>
  3026. <refnamediv>
  3027. <indexterm id="IXT-16-166167"><primary>xsd:unsignedShort type</primary></indexterm><refname>xsd:unsignedShort</refname>
  3028. <refpurpose>Unsigned integer of 16 bits.
  3029. </refpurpose>
  3030. </refnamediv>
  3031. <refsect1>
  3032. <title>Derived from:</title>
  3033. <para>xsd:unsignedInt </para>
  3034. </refsect1>
  3035. <refsect1>
  3036. <title>Primary:</title>
  3037. <para>xsd:decimal </para>
  3038. </refsect1>
  3039. <refsect1>
  3040. <title>Known subtypes:</title>
  3041. <para>xsd:unsignedByte </para>
  3042. </refsect1>
  3043. <refsect1>
  3044. <title>Facets:</title>
  3045. <para>xsd:enumeration, <emphasis>xsd:fractionDigits</emphasis>,
  3046. xsd:maxExclusive, xsd:maxInclusive, xsd:minExclusive, xsd:minInclusive,
  3047. xsd:pattern, xsd:totalDigits, <emphasis>xsd:whiteSpace</emphasis>
  3048. </para>
  3049. </refsect1>
  3050. <refsynopsisdiv>
  3051. <synopsis>
  3052. &lt;xsd:simpleType name="unsignedShort" id="unsignedShort"&gt;
  3053. &lt;xsd:restriction base="xsd:unsignedInt"&gt;
  3054. &lt;xsd:maxInclusive value="65535"/&gt;
  3055. &lt;/xsd:restriction&gt;
  3056. &lt;/xsd:simpleType&gt;
  3057. </synopsis>
  3058. </refsynopsisdiv>
  3059. <refsect1>
  3060. <title>Description</title>
  3061. <para>The value space of <literal>xsd:unsignedShort</literal> is the
  3062. integers between 0 and 65535, i.e., the unsigned values that can fit
  3063. in a word of 16 bits. Its lexical space allows an optional
  3064. "+" sign and leading zeros before
  3065. the significant digits.
  3066. </para>
  3067. </refsect1>
  3068. <refsect1>
  3069. <title>Restrictions</title>
  3070. <para>The decimal point (even when followed only by insignificant zeros) is
  3071. forbidden.
  3072. </para>
  3073. </refsect1>
  3074. <refsect1>
  3075. <title>Example</title>
  3076. <para>Valid values include <literal>"65535"</literal>,
  3077. <literal>"0"</literal>, <literal>"+0000000000000000000005"</literal>,
  3078. or <literal>"1"</literal>.
  3079. </para>
  3080. <para>Invalid values include <literal>"-1"</literal> and
  3081. <literal>"1."</literal><indexterm id="IXTR3-0" class="endofrange" startref="xmlschema-IDXTERM-1116"/> <indexterm id="IXTR3-1" class="endofrange" startref="xmlschema-IDXTERM-1117"/>.
  3082. </para>
  3083. </refsect1>
  3084. </refentry>
  3085. </chapter>