What is miscellaneous XQuery data type

In this article we are going to explain miscellaneous XQuery data type.
  • 1944

The XQuery  miscellaneous data types are anyURI, boolean,  hexBinary, float, double, QName etc. XQuery miscellaneous have contain different data types-

  • Boolean data type

             The boolean data type is used to specify the mathematical concept of binary-valued logic: true or false. Boolean data type is derived from xdt:anyAtomicType. Here True means one(1) and false means zero(0).

Boolean has the following constraining facets-

  • pattern
  • whiteSpace

Example of boolean data type

<xs:attribute name="value" type="xs:boolean"/>

<values value="true">456</values>

<values value="false">45</values>

  • Binary data type

    Binary data type is used to specify binary data. It have two binary data type

  1. The hexBinary represents hexa binary data and derived from xdt:anyAtomicType.

  2. The base64Binary dataType represents base64-encoded binary data and derived from xdt:anyAtomicType

Example of binary data type

<xs:attribute name="value" type="xs:hexBinary"/>

  • AnyURI data type
    The anyURI data type is used to specify a Uniform Resource Identifier Reference (URI).Derived from data type xdt:anyAtomicType.

anyURI has the following constraining facets-

  • length

  • minLength

  • maxLength

  • pattern

  • enumeration

  • whiteSpace

Example of anyURI data type

<xs:attribute name="src" type="xs:anyURI"/>

<valueof src="www.google.com">

Further Readings

You may also want to read these related articles: here
 
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

 

 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.