Detailed Description

Namespaces allow multiple XML elements using the same tag name to be present in a single document. https://www.w3.org/TR/2006/REC-xml-names-20060816/

Public Member Functions

 MLNamespace (string name, string prefix, string mime)
 
Document CreateDocument ()
 Creates a document from this namespace. More...
 
TextNode CreateTextNode (Document document)
 Creates a new text node relative to this namespace. More...
 
Comment CreateCommentNode (Document document)
 Creates a new comment node relative to this namespace. More...
 
Node CreateLangNode (Document document)
 Creates a new lang node relative to this namespace. More...
 
MLNamespace GetNamespace (string tag)
 Gets a namespace for the given tag. This is used when the tag isn't found in "this" namespace. More...
 

Public Attributes

string Name
 The unique name of the namespace. Typically these are URI's. More...
 
string Prefix
 The prefix applied e.g. "html" resulting in ">html:a ..<". More...
 
string MimeType
 The mimetype for this namespace. E.g. "text/html". More...
 
Type DocumentType
 The type of documents created in this namespace. More...
 
SupportedTagMeta Default
 The default node type. More...
 
Type TextNode =typeof(TextNode)
 The text node type. More...
 
Type CommentNode =typeof(Comment)
 The comment node type. More...
 
Type LangNode
 The lang node type. More...
 
string ForeignNames
 Of the form e.g. 'svg:svg,mml:math'. Allows common foreign tags from another namespace to be included without needing to declare their xmlns. More...
 
Dictionary< string, MLNamespaceForeigners
 Loaded version of ForeignNames. More...
 
Dictionary< string,
SupportedTagMeta
Tags =new Dictionary<string,SupportedTagMeta>()
 The tag lookup. Matches tag text (e.g. "div") to the Type that should be instanced. More...
 

Package Functions

void AddTag (string tags, Type elementType)
 Adds a tag to this namespace. E.g. declaring 'div' in 'xhtml'. More...
 

Properties

StyleSheet DefaultStyleSheet [get]
 The default CSS style sheet for this namespace. Contains styling for e.g. div/span etc. More...
 

Private Member Functions

void LoadForeigners ()
 Loads up the foreigners set. More...
 

Private Attributes

StyleSheet DefaultStyleSheet_
 The default CSS style sheet for this namespace. Contains styling for e.g. div/span etc. More...
 

Constructor & Destructor Documentation

Dom.MLNamespace.MLNamespace ( string  name,
string  prefix,
string  mime 
)
inline

Member Function Documentation

void Dom.MLNamespace.AddTag ( string  tags,
Type  elementType 
)
inlinepackage

Adds a tag to this namespace. E.g. declaring 'div' in 'xhtml'.

Comment Dom.MLNamespace.CreateCommentNode ( Document  document)
inline

Creates a new comment node relative to this namespace.

Document Dom.MLNamespace.CreateDocument ( )
inline

Creates a document from this namespace.

Node Dom.MLNamespace.CreateLangNode ( Document  document)
inline

Creates a new lang node relative to this namespace.

TextNode Dom.MLNamespace.CreateTextNode ( Document  document)
inline

Creates a new text node relative to this namespace.

MLNamespace Dom.MLNamespace.GetNamespace ( string  tag)
inline

Gets a namespace for the given tag. This is used when the tag isn't found in "this" namespace.

void Dom.MLNamespace.LoadForeigners ( )
inlineprivate

Loads up the foreigners set.

Member Data Documentation

Type Dom.MLNamespace.CommentNode =typeof(Comment)

The comment node type.

SupportedTagMeta Dom.MLNamespace.Default

The default node type.

StyleSheet Dom.MLNamespace.DefaultStyleSheet_
private

The default CSS style sheet for this namespace. Contains styling for e.g. div/span etc.

Type Dom.MLNamespace.DocumentType

The type of documents created in this namespace.

Dictionary<string,MLNamespace> Dom.MLNamespace.Foreigners

Loaded version of ForeignNames.

string Dom.MLNamespace.ForeignNames

Of the form e.g. 'svg:svg,mml:math'. Allows common foreign tags from another namespace to be included without needing to declare their xmlns.

Type Dom.MLNamespace.LangNode

The lang node type.

string Dom.MLNamespace.MimeType

The mimetype for this namespace. E.g. "text/html".

string Dom.MLNamespace.Name

The unique name of the namespace. Typically these are URI's.

string Dom.MLNamespace.Prefix

The prefix applied e.g. "html" resulting in "&gt;html:a ..&lt;".

Dictionary<string,SupportedTagMeta> Dom.MLNamespace.Tags =new Dictionary<string,SupportedTagMeta>()

The tag lookup. Matches tag text (e.g. "div") to the Type that should be instanced.

Type Dom.MLNamespace.TextNode =typeof(TextNode)

The text node type.

Property Documentation

StyleSheet Dom.MLNamespace.DefaultStyleSheet
get

The default CSS style sheet for this namespace. Contains styling for e.g. div/span etc.