Class XmlSpecsHelper
Static Helper Class which contains a set of Functions which model Name and Character validations as laid out in the W3C XML and XML Namespaces specification.
Inheritance
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public static class XmlSpecsHelper
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
Fields
| Improve this Doc View SourceNamespaceXml
Namespace for XML.
Declaration
public const string NamespaceXml = "http://www.w3.org/XML/1998/namespace"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
NamespaceXmlNamespaces
Namespace for XML Namespaces.
Declaration
public const string NamespaceXmlNamespaces = "http://www.w3.org/2000/xmlns/"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
NamespaceXmlSchema
Namespace for XML Schema.
Declaration
public const string NamespaceXmlSchema = "http://www.w3.org/2001/XMLSchema#"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
SupportedTypes
Array of Constants for Data Types that are supported by the Literal Node CompareTo method.
Declaration
public static string[] SupportedTypes
Field Value
Type | Description |
---|---|
string[] |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeAnyUri
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeAnyUri = "http://www.w3.org/2001/XMLSchema#anyURI"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeBase64Binary
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeBase64Binary = "http://www.w3.org/2001/XMLSchema#base64Binary"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeBoolean
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeBoolean = "http://www.w3.org/2001/XMLSchema#boolean"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeByte
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeByte = "http://www.w3.org/2001/XMLSchema#byte"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeDate
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeDate = "http://www.w3.org/2001/XMLSchema#date"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeDateTime
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeDateTime = "http://www.w3.org/2001/XMLSchema#dateTime"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeDayTimeDuration
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeDayTimeDuration = "http://www.w3.org/2001/XMLSchema#dayTimeDuration"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeDecimal
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeDecimal = "http://www.w3.org/2001/XMLSchema#decimal"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeDouble
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeDouble = "http://www.w3.org/2001/XMLSchema#double"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeDuration
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeDuration = "http://www.w3.org/2001/XMLSchema#duration"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeFloat
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeFloat = "http://www.w3.org/2001/XMLSchema#float"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeHexBinary
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeHexBinary = "http://www.w3.org/2001/XMLSchema#hexBinary"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeInt
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeInt = "http://www.w3.org/2001/XMLSchema#int"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeInteger
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeInteger = "http://www.w3.org/2001/XMLSchema#integer"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeLong
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeLong = "http://www.w3.org/2001/XMLSchema#long"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeNegativeInteger
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeNegativeInteger = "http://www.w3.org/2001/XMLSchema#negativeInteger"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeNonNegativeInteger
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeNonNegativeInteger = "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeNonPositiveInteger
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeNonPositiveInteger = "http://www.w3.org/2001/XMLSchema#nonPositiveInteger"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypePositiveInteger
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypePositiveInteger = "http://www.w3.org/2001/XMLSchema#positiveInteger"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeShort
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeShort = "http://www.w3.org/2001/XMLSchema#short"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeString
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeString = "http://www.w3.org/2001/XMLSchema#string"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeTime
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeTime = "http://www.w3.org/2001/XMLSchema#time"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeUnsignedByte
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeUnsignedByte = "http://www.w3.org/2001/XMLSchema#unsignedByte"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeUnsignedInt
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeUnsignedInt = "http://www.w3.org/2001/XMLSchema#unsignedInt"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeUnsignedLong
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeUnsignedLong = "http://www.w3.org/2001/XMLSchema#unsignedLong"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDataTypeUnsignedShort
Data Type Uri Constants for XML Schema Data Types.
Declaration
public const string XmlSchemaDataTypeUnsignedShort = "http://www.w3.org/2001/XMLSchema#unsignedShort"
Field Value
Type | Description |
---|---|
string |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
XmlSchemaDateFormat
Date Time Formatting string which meets the specified format for xsd:date.
Declaration
public const string XmlSchemaDateFormat = "yyyy-MM-ddK"
Field Value
Type | Description |
---|---|
string |
Remarks
Use with the DateTime.ToString() method to format a DateTime into appropriate string format.
XmlSchemaDateTimeFormat
Date Time Formatting string which meets the specified format for xsd:dateTime.
Declaration
public const string XmlSchemaDateTimeFormat = "yyyy-MM-dd\\THH:mm:ss.ffffffK"
Field Value
Type | Description |
---|---|
string |
Remarks
Use with the DateTime.ToString() method to format a DateTime into appropriate string format.
XmlSchemaDateTimeFormatImprecise
Date Time Formatting string which meets the specified format for xsd:dateTime, this formatting string is imprecise in the sense that it does not preserve the fractional seconds.
Declaration
public const string XmlSchemaDateTimeFormatImprecise = "yyyy-MM-dd\\THH:mm:ssK"
Field Value
Type | Description |
---|---|
string |
Remarks
Use with the DateTime.ToString() method to format a DateTime into appropriate string format.
XmlSchemaTimeFormat
Date Time Formatting string which meets the the specified format for xsd:time.
Declaration
public const string XmlSchemaTimeFormat = "HH:mm:ss.ffffffK"
Field Value
Type | Description |
---|---|
string |
Remarks
Use with the DateTime.ToString() method to format a DateTime into appropriate string format.
XmlSchemaTimeFormatImprecise
Date Time Formatting string which meets the the specified format for xsd:time, this formatting string is imprecise in the sense that it does not preserve the fractional seconds.
Declaration
public const string XmlSchemaTimeFormatImprecise = "HH:mm:ssK"
Field Value
Type | Description |
---|---|
string |
Remarks
Use with the DateTime.ToString() method to format a DateTime into appropriate string format.
Methods
| Improve this Doc View SourceGetCompatibleSupportedDataType(string, string, bool)
Gets the Compatible Supported Data Type for the two Data Types.
Declaration
public static string GetCompatibleSupportedDataType(string type1, string type2, bool widen)
Parameters
Type | Name | Description |
---|---|---|
string | type1 | A Data Type. |
string | type2 | A Data Type. |
System.Boolean | widen | Whether the compatible type should be the wider type. |
Returns
Type | Description |
---|---|
string |
Remarks
Currently this is only immplemented sufficiently for the types it needs to know are compatible for implementing SPARQL equality and ordering semantics.
GetCompatibleSupportedDataType(string, string)
Gets the Compatible Supported Data Type for the two Data Types.
Declaration
public static string GetCompatibleSupportedDataType(string type1, string type2)
Parameters
Type | Name | Description |
---|---|---|
string | type1 | A Data Type. |
string | type2 | A Data Type. |
Returns
Type | Description |
---|---|
string |
Remarks
Currently this is only immplemented sufficiently for the types it needs to know are compatible for implementing SPARQL equality and ordering semantics.
GetCompatibleSupportedDataType(INode, INode, bool)
Gets the Compatible Supported Data Type assuming the two Nodes are Literals with support types and that those types are compatible.
Declaration
public static string GetCompatibleSupportedDataType(INode x, INode y, bool widen)
Parameters
Type | Name | Description |
---|---|---|
INode | x | A Node. |
INode | y | A Node. |
System.Boolean | widen | Whether the compatible type should be the wider type. |
Returns
Type | Description |
---|---|
string |
Remarks
Currently this is only immplemented sufficiently for the types it needs to know are compatible for implementing SPARQL equality and ordering semantics.
GetCompatibleSupportedDataType(INode, INode)
Gets the Compatible Supported Data Type assuming the two Nodes are Literals with support types and that those types are compatible.
Declaration
public static string GetCompatibleSupportedDataType(INode x, INode y)
Parameters
Type | Name | Description |
---|---|---|
INode | x | A Node. |
INode | y | A Node. |
Returns
Type | Description |
---|---|
string |
Remarks
Currently this is only immplemented sufficiently for the types it needs to know are compatible for implementing SPARQL equality and ordering semantics.
GetSupportedDataType(INode)
Gets the Data Type Uri of the given Node if it has a supported type.
Declaration
public static string GetSupportedDataType(INode n)
Parameters
Type | Name | Description |
---|---|---|
INode | n | Node. |
Returns
Type | Description |
---|---|
string |
Remarks
Only ILiteralNode's can have a Data Type.
The function only returns the Data Type Uri (as a String) if the Data Type of the Literal is one of the supported Data Types.
IsName(string)
Returns whether a String is a Name as defined by the W3C XML Specification.
Declaration
public static bool IsName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | String to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
IsNameChar(char)
Returns whether a Character is a NameChar as defined by the W3C XML Specification.
Declaration
public static bool IsNameChar(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character to Test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
IsNameStartChar(char)
Returns whether a Character is a NameChar as defined by the W3C XML Specification.
Declaration
public static bool IsNameStartChar(char c)
Parameters
Type | Name | Description |
---|---|---|
char | c | Character to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
IsNCName(string)
Returns whether a String is a NCName as defined by the W3C XML Namespaces Specification.
Declaration
public static bool IsNCName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | String to test. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
IsSupportedType(string)
Returns whether the given Type refers to one of the types supported by the LiteralNode CompareTo method.
Declaration
public static bool IsSupportedType(string type)
Parameters
Type | Name | Description |
---|---|---|
string | type | Data Type Uri. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
IsSupportedType(Uri)
Returns whether the given Type refers to one of the types supported by the LiteralNode CompareTo method.
Declaration
public static bool IsSupportedType(Uri type)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | type | Data Type Uri. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
TryGetCompatibleSupportedDataType(string, string, bool, out string)
Attempts to get the compatible datatype for the two specified data types.
Declaration
public static bool TryGetCompatibleSupportedDataType(string type1, string type2, bool widen, out string compatibleDataType)
Parameters
Type | Name | Description |
---|---|---|
string | type1 | A data type IRI string. |
string | type2 | A data type IRI string. |
System.Boolean | widen | Whether the compatible data type should be the wider type. |
string | compatibleDataType | Receives the IRI of the compatible data type, if any. |
Returns
Type | Description |
---|---|
System.Boolean | True if a compatible datatype could be found for the two data types, false otherwise. |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.
TryGetCompatibleSupportedDataType(string, string, out string)
Attempts to get the compatible datatype for the two specified data types.
Declaration
public static bool TryGetCompatibleSupportedDataType(string type1, string type2, out string compatibleDataType)
Parameters
Type | Name | Description |
---|---|---|
string | type1 | A data type IRI string. |
string | type2 | A data type IRI string. |
string | compatibleDataType | Receives the IRI of the compatible data type, if any. |
Returns
Type | Description |
---|---|
System.Boolean | True if a compatible datatype could be found for the two data types, false otherwise. |
Remarks
These are needed in the XML/RDF Parser
Also contains the Date Time format string used to format .Net's DateTime type into a String whose format conforms to the XML Schema Datatypes specification.