Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / %SYS namespace / %CSP.Rule
Private  Storage   

%CSP.Rule


class %CSP.Rule extends
%CSP.AbstractAtom

The %CSP.Rule class is the super class of all rule generated classes that represent elements within the DOM model.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
10 18


Summary


Properties
Children Closed Family HasEndTag LineNumber
NewSection Parent Rule TagAttributes TagName
Text TextOnly

Methods
%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnNew
%OriginalNamespace %PackageName %RemoveFromSaveSet %SerializeObject
%SetModified %ValidateObject AddChildElement GetAttribute
GetAttributesOrdered HasValue InitAttribute InnerText
IsDefined OnMatch PopDefaultSection PushDefaultSection
QuoteAttribute RenderDefaultEndTag RenderDefaultStartTag RenderEndTag
RenderStartTag SetAttribute ValidateTag WriteCSPServer
WriteCSPText WriteExpressionText WriteServer WriteText

Subclasses
%CSP.Document %CSP.Element %CSP.MatchLanguage
%CSP.RuleBlock %CSP.RuleElement %CSP.TagLanguage
%CSP.TagMethod %CSP.TagMoveToEnd

Properties


• property Children as list of %CSP.AbstractAtom;
A list of any sub-items contained within this element.
• property Closed as %Boolean [ InitialExpression = 0 ];
A boolean value specifying whether this element is self-closed.
• property Family as %String;
A string specifying the rule family.
• property HasEndTag as %Boolean [ InitialExpression = 0 ];
A boolean value specifying whether this element has an end tag.
• property LineNumber as %Integer;
This attribute speficies the line number on which this tag starts.
• property NewSection as %String;
If not "", this rule will start a new section named NewSection.
• property Rule as %String;
A string specifying the rule name.
• property TagAttributes as array of %String;
An array of strings containing the HTML properties associated with this tag. The array is indexed by property name and contains property values.
• property Text as %String;
This attribute always returns "". Is it to be called by parent classes' InnerText() method.
• property TextOnly as %Integer [ InitialExpression = 0 ];
A integer value specifying how tags are to be handled within the body content of this tag: TextOnly=0 Normal parsing of tags TextOnly=1 Tags are ignored in the body content and always treated as text. TextOnly=2 Tags are processed only if a matching rule is found. Otherwise the tag is treated as text.

Methods


• method %OnNew(initval As %String = "") as %Status
New method can set TagName property.
• method AddChildElement(atom As %CSP.AbstractAtom) as %Status
Add an child atom to this element.
• method GetAttribute(name As %String, default As %String = "") as %String
Get the value of the HTML attribute name for this element. The value will have ##( )## and ##' '## resolved.
• method GetAttributesOrdered(ByRef paramsordered)
Return all the parameters in a ordered array.
• method HasValue(name As %String) as %Boolean
Indicate if HTML attribute name has a value.
• method InitAttribute(name As %String, value As %String, order As %Integer = 0, quote As %String = "")
Set the HTML attribute name for this element to value.
• method InnerText() as %String
Get the children of this tag as text
• method IsDefined(name As %String) as %Boolean
Indicate if HTML attribute name is defined.
• private method NewExprName() as %String
Generate internal name to be used for a new attribute whose name is given by a CSP expression.
• classmethod OnMatch(rule As %CSP.Rule) as %Status
Default OnMatch method for rules is to do nothing. OnMatch may be overridden by user rules.
• method QuoteAttribute(name As %String, default As %String = "") as %String
Get the value of the HTML attribute name for this element. Return the value as a quoted string with #()#, ##( )## and ##' '## resolved.
• method RenderDefaultEndTag() as %Status
Exposes default rendering of tag without needing to use ##super. Writes code into the routine builder object that will do the default rendering for an end tag.
• method RenderDefaultStartTag() as %Status
Exposes default rendering of tag without needing to use ##super. Writes code into the routine builder object that will do the default rendering for a begin tag.
• method RenderEndTag() as %Status
Default rendering of the end tag is a no operation RenderEndTag may be overridden by user rules.
• private method RenderOneAttribute(name, value, quote, sep) as %String
Render a single attribute of this CSP tag.
• method RenderStartTag() as %Status
Default rendering of the start tag is to just continue RenderStartTag may be overridden by user rules.
• method SetAttribute(name As %String, value As %String)
Set the HTML attribute name for this element to value.
• method ValidateTag() as %Status
Validate that rule attributes are valid.