Class RdfXmlSpecsHelper
Static Helper class for providing Constants and Helper functions for use by RDF/XML parsers.
Inherited Members
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public static class RdfXmlSpecsHelper
Methods
| Edit this page View SourceIsAboutAttribute(AttributeEvent)
Checks whether an attribute is an rdf:about attribute.
Declaration
[Obsolete("Use IsAboutAttribute(AttributeEvent, INamespaceMapper)", true)]
public static bool IsAboutAttribute(AttributeEvent attr)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:about attribute. |
IsAboutAttribute(AttributeEvent, INamespaceMapper)
Checks whether an attribute is an rdf:about attribute.
Declaration
public static bool IsAboutAttribute(AttributeEvent attr, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INamespaceMapper | nsMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:about attribute. |
IsAbsoluteURI(string)
Checks whether a Uri Reference is an absolute Uri.
Declaration
public static bool IsAbsoluteURI(string uriref)
Parameters
Type | Name | Description |
---|---|---|
string | uriref | Uri Reference to Test. |
Returns
Type | Description |
---|---|
bool |
Remarks
Implemented by seeing if the Uri Reference starts with a Uri scheme specifier.
IsAmbigiousAttributeName(string)
Checks whether a given Local Name is potentially ambiguous.
Declaration
public static bool IsAmbigiousAttributeName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Local Name to Test. |
Returns
Type | Description |
---|---|
bool | True if the Local Name is ambiguous. |
Remarks
This embodies Local Names which must have an rdf prefix.
IsCoreSyntaxTerm(string)
Checks whether a given QName is a Core Syntax Term.
Declaration
[Obsolete("Use IsCoreSyntaxTerm(Uri, string) instead", true)]
public static bool IsCoreSyntaxTerm(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName to Test. |
Returns
Type | Description |
---|---|
bool | True if the QName is a Core Syntax Term. |
IsCoreSyntaxTerm(Uri, string)
Checks whether a given expanded name is a Core Syntax Term.
Declaration
public static bool IsCoreSyntaxTerm(Uri nsUri, string localName)
Parameters
Type | Name | Description |
---|---|---|
Uri | nsUri | The namespace URI of the expanded name. |
string | localName | The local name part of the expanded name. |
Returns
Type | Description |
---|---|
bool | True if the expanded name is a Core Syntax Term. |
IsDataTypeAttribute(AttributeEvent)
Checks whether an attribute is an rdf:datatype attribute.
Declaration
[Obsolete("Use IsDataTypeAttribute(AttributeEvent, INestedNamespaceMapper) instead.", true)]
public static bool IsDataTypeAttribute(AttributeEvent attr)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:datatype attribute. |
IsDataTypeAttribute(AttributeEvent, INestedNamespaceMapper)
Checks whether an attribute is an rdf:datatype attribute.
Declaration
public static bool IsDataTypeAttribute(AttributeEvent attr, INestedNamespaceMapper namespaceMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INestedNamespaceMapper | namespaceMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:datatype attribute. |
IsIDAttribute(AttributeEvent)
Checks whether an attribute is an rdf:ID attribute.
Declaration
[Obsolete("Use IsIDAttribute(AttributeEvent, INamespaceMapper) instead", true)]
public static bool IsIDAttribute(AttributeEvent attr)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:ID attribute. |
Remarks
Does some validation on ID value but other validation occurs at other points in the Parsing.
IsIDAttribute(AttributeEvent, INestedNamespaceMapper)
Checks whether an attribute is an rdf:ID attribute.
Declaration
public static bool IsIDAttribute(AttributeEvent attr, INestedNamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INestedNamespaceMapper | nsMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:ID attribute. |
Remarks
Does some validation on ID value but other validation occurs at other points in the Parsing.
IsLiElement(ElementEvent, INamespaceMapper)
Checks whether a give element is an rdf:li element.
Declaration
public static bool IsLiElement(ElementEvent e, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
ElementEvent | e | The element to test. |
INamespaceMapper | nsMapper | The namespace mappings to use when expanding element QName prefixes. |
Returns
Type | Description |
---|---|
bool | True if the element is an rdf:li element, false otherwise. |
IsNodeElementUri(string)
Checks whether a given QName is valid as a Node Element Uri.
Declaration
[Obsolete("Use IsNodeElementUri(Uri, localName) instead", true)]
public static bool IsNodeElementUri(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName to Test. |
Returns
Type | Description |
---|---|
bool | True if the QName is valid. |
IsNodeElementUri(Uri, string)
Checks whether a given expanded name is valid as a Node Element Uri.
Declaration
public static bool IsNodeElementUri(Uri nsUri, string localName)
Parameters
Type | Name | Description |
---|---|---|
Uri | nsUri | The namespace URI of the expanded name. |
string | localName | The local name part of the expanded name. |
Returns
Type | Description |
---|---|
bool | True if the expanded name is valid. |
IsNodeIDAttribute(AttributeEvent)
Checks whether an attribute is an rdf:nodeID attribute.
Declaration
[Obsolete("Use IsNodeIDAttribute(AttributeEvent, INamespaceMapper) instead", true)]
public static bool IsNodeIDAttribute(AttributeEvent attr)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:nodeID attribute. |
Remarks
Does some validation on ID value but other validation occurs at other points in the Parsing.
IsNodeIDAttribute(AttributeEvent, INamespaceMapper)
Checks whether an attribute is an rdf:nodeID attribute.
Declaration
public static bool IsNodeIDAttribute(AttributeEvent attr, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INamespaceMapper | nsMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:nodeID attribute. |
Remarks
Does some validation on ID value but other validation occurs at other points in the Parsing.
IsOldTerm(string)
Checks whether a given QName is a Old Syntax Term.
Declaration
[Obsolete("Use IsOldTerm(Uri, string) instead", true)]
public static bool IsOldTerm(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName to Test. |
Returns
Type | Description |
---|---|
bool | True if the QName is a Old Syntax Term. |
IsOldTerm(Uri, string)
Checks whether a given expanded name is a Old Syntax Term.
Declaration
public static bool IsOldTerm(Uri nsUri, string localName)
Parameters
Type | Name | Description |
---|---|---|
Uri | nsUri | The namespace URI of the expanded name. |
string | localName | The local name part of the expanded name. |
Returns
Type | Description |
---|---|
bool | True if the expanded name is a Old Syntax Term. |
IsParseTypeAttribute(AttributeEvent, INestedNamespaceMapper)
Checks whether an attribute is an rdf:parseType attribute.
Declaration
public static bool IsParseTypeAttribute(AttributeEvent attr, INestedNamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INestedNamespaceMapper | nsMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:parseType attribute. |
IsPropertyAttribute(AttributeEvent)
Checks whether an attribute is an property attribute.
Declaration
[Obsolete("Use IsPropertyAttribute(AttributeEvent, INamespaceMapper)", true)]
public static bool IsPropertyAttribute(AttributeEvent attr)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
Returns
Type | Description |
---|---|
bool | True if is an property attribute. |
IsPropertyAttribute(AttributeEvent, INamespaceMapper)
Checks whether an attribute is an property attribute.
Declaration
public static bool IsPropertyAttribute(AttributeEvent attr, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INamespaceMapper | nsMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an property attribute. |
IsPropertyAttributeURI(string)
Checks whether a given QName is valid as a Property Attribute Uri.
Declaration
[Obsolete("Use IsPropertyAttributeURI(Uri, string) instead.", true)]
public static bool IsPropertyAttributeURI(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName to Test. |
Returns
Type | Description |
---|---|
bool | True if the QName is valid. |
IsPropertyAttributeURI(Uri, string)
Checks whether a given expanded name is valid as a Property Attribute Uri.
Declaration
public static bool IsPropertyAttributeURI(Uri nsUri, string localName)
Parameters
Type | Name | Description |
---|---|---|
Uri | nsUri | The namespace URI of the expanded name. |
string | localName | The local name part of the expanded name. |
Returns
Type | Description |
---|---|
bool | True if the expanded name is valid. |
IsPropertyElement(ElementEvent, INamespaceMapper)
Checks whether a given element is a valid property element.
Declaration
public static bool IsPropertyElement(ElementEvent e, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
ElementEvent | e | The element to test. |
INamespaceMapper | nsMapper | The namespace mappings to use when expanding element QName prefixes. |
Returns
Type | Description |
---|---|
bool | True if the element is valid. |
IsPropertyElementURI(string)
Checks whether a given QName is valid as a Property Element Uri.
Declaration
[Obsolete("Use IsPropertyElement(ElementEvent, INamespaceMapper) instead", true)]
public static bool IsPropertyElementURI(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName to Test. |
Returns
Type | Description |
---|---|
bool | True if the QName is valid. |
IsRdfID(string)
Validates that an ID is a valid NCName.
Declaration
public static bool IsRdfID(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | ID Value to Test. |
Returns
Type | Description |
---|---|
bool | True if the ID is valid. |
IsRdfNamespace(string)
Validates that a URI matches the RDF/XML namespace URI.
Declaration
public static bool IsRdfNamespace(string nsUri)
Parameters
Type | Name | Description |
---|---|---|
string | nsUri | The namespace URI to be validated. |
Returns
Type | Description |
---|---|
bool | True if the URI matches the RDF/XML namespace URI. |
IsRdfNamespace(Uri)
Validates that a URI matches the RDF/XML namespace URI.
Declaration
public static bool IsRdfNamespace(Uri nsUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | nsUri | The namespace URI to be validated. |
Returns
Type | Description |
---|---|
bool | True if the URI matches the RDF/XML namespace URI. |
IsRdfUriReference(string)
Validates that a URIReference is valid.
Declaration
public static bool IsRdfUriReference(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | URIReference to Test. |
Returns
Type | Description |
---|---|
bool | True. |
Remarks
Currently partially implemented, some invalid Uri References may be considered valid.
IsResourceAttribute(AttributeEvent)
Checks whether an attribute is an rdf:resource attribute.
Declaration
[Obsolete("Use IsResourceAttribute(AttributeEvent, INamespaceMapper)", true)]
public static bool IsResourceAttribute(AttributeEvent attr)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:resource attribute. |
IsResourceAttribute(AttributeEvent, INamespaceMapper)
Checks whether an attribute is an rdf:resource attribute.
Declaration
public static bool IsResourceAttribute(AttributeEvent attr, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | Attribute to Test. |
INamespaceMapper | nsMapper | The namespace prefix mappings to use when expanding the namespace prefix of the attribute. |
Returns
Type | Description |
---|---|
bool | True if is an rdf:resource attribute. |
IsSyntaxTerm(string)
Checks whether a given QName is a Syntax Term.
Declaration
[Obsolete("Use IsSyntaxTerm(Uri, string) instead", true)]
public static bool IsSyntaxTerm(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName to Test. |
Returns
Type | Description |
---|---|
bool | True if the QName is a Syntax Term. |
IsSyntaxTerm(Uri, string)
Checks whether a given expanded name is a Syntax Term.
Declaration
public static bool IsSyntaxTerm(Uri nsUri, string localName)
Parameters
Type | Name | Description |
---|---|---|
Uri | nsUri | The namespace URI of the expanded name. |
string | localName | The local name part of the expanded name. |
Returns
Type | Description |
---|---|
bool | True if the expanded name is a Syntax Term. |
IsTypeAttribute(AttributeEvent, INamespaceMapper)
Checks whether an attribute is an rdf:type attribute.
Declaration
public static bool IsTypeAttribute(AttributeEvent attr, INamespaceMapper nsMapper)
Parameters
Type | Name | Description |
---|---|---|
AttributeEvent | attr | The attribute to check. |
INamespaceMapper | nsMapper | The namespace prefix mappings to use to expand QNames. |
Returns
Type | Description |
---|---|
bool | True if the attribute is and rdf:type attribute, false otherwise. |
IsValidBaseUri(string)
Checks whether a given Base Uri can be used for relative Uri resolution.
Declaration
public static bool IsValidBaseUri(string baseUri)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri to Test. |
Returns
Type | Description |
---|---|
bool | True if the Base Uri can be used for relative Uri resolution. |
IsValidQName(string)
Determines whether a QName is valid for use in RDF/XML.
Declaration
public static bool IsValidQName(string qname)
Parameters
Type | Name | Description |
---|---|---|
string | qname | QName. |
Returns
Type | Description |
---|---|
bool |
IsValidUriRefEncoding(string)
Checks whether a given URIRef is encoded in Unicode Normal Form C.
Declaration
public static bool IsValidUriRefEncoding(string uriref)
Parameters
Type | Name | Description |
---|---|---|
string | uriref | URIRef to Test. |
Returns
Type | Description |
---|---|
bool | True if the URIRef is encoded correctly. |