SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
XML:DTD XML:Locator XML:Writer
Class List | |
Element | |
ElementFactory | |
List | |
PCData | |
RootFactory | |
StringBuffer |
Class Summary: Element [Detail] | |
+--XML:Basic:Element.Element | |
Field Summary | |
next-: Element | |
Constructor Summary | |
InitElement(Element) | |
Method Summary | |
AddAttribute(String, AttValue): BOOLEAN Adds the attribute localName to the element elem. | |
AddCharacters(VAR StringVar, CharPos, CharPos) Adds character data to the content of element elem. | |
AddChild(Element) Adds the parsed child element child to elem. | |
CheckElement(): String Called at the very end of an XML element (after Element.MissingChild) to perform consistency checks on the whole element. | |
HasMixedContent(): BOOLEAN Returns TRUE, if element elem containes mixed content. | |
IsAttributeName(String): BOOLEAN Determines if localName is a valid name for an attribute of elem. | |
IsChildName(String): BOOLEAN Determines if localName is a valid name for a child element of elem. | |
MissingAttribute(): String Called at the end of the attribute list of a start tag to determine if any required attributes are missing. | |
MissingChild(): String Called at the end of an XML element to determine if any required child elements are missing. | |
NewChild(String): Element Creates a new instance of the child element if the child can appear at the current place in the element. | |
SetLocator(Locator) Using the locator l, the context of the element and its attributes can be determined. | |
Write(Writer) Serializes the object elem into an XML element. |
Class Summary: ElementFactory [Detail] | |
+--XML:Basic:Element.ElementFactory |
Class Summary: List [Detail] | |
+--XML:Basic:Element.List | |
Field Summary | |
head-: Element | |
tail-: Element | |
Constructor Summary | |
NewList(): List | |
Method Summary | |
Append(Element) | |
IsEmpty(): BOOLEAN | |
Write(Writer) |
Class Summary: PCData [Detail] | |
+---XML:Basic:Element.Element | +--XML:Basic:Element.PCData | |
Field Summary | |
chars-: StringBuffer | |
Inherited Fields | |
Constructor Summary | |
InitPCData(PCData) | |
NewPCData(): PCData | |
Method Summary | |
AddCharacters(VAR StringVar, CharPos, CharPos) Adds character data to the content of element pcdata. | |
Normalize(BOOLEAN, BOOLEAN) | |
Write(Writer) Serializes the object pcdata into an XML element. | |
Inherited Methods | |
From XML:Basic:Element.Element: |
Class Summary: RootFactory [Detail] | |
+--XML:Basic:Element.RootFactory | |
Constructor Summary | |
NewRootFactory(): RootFactory | |
Method Summary | |
AddFactory(StringVar, FactoryFunction) | |
NewElement(String): Element Called with the name of the root element of an XML document. |
Class Summary: StringBuffer [Detail] | |
+--XML:Basic:Element.StringBuffer | |
Field Summary | |
array-: String | |
length-: LONGINT | |
Constructor Summary | |
NewStringBuffer(StringVar): StringBuffer | |
Method Summary | |
AddCharacters(VAR StringVar, CharPos, CharPos) |
Type Summary | |
AttValue = AttValue | |
CharPos = CharPos | |
FactoryFunction = (): Element | |
String = String | |
StringVar = StringVar |
Procedure Summary | |
NewString(StringVar): String |
Class Detail: Element |
Field Detail |
FIELD next-: Element
Constructor Detail |
PROCEDURE InitElement(elem: Element)
Method Detail |
PROCEDURE (elem: Element) AddAttribute(localName: String; value: AttValue): BOOLEAN
Adds the attribute localName to the element elem. If the attribute value value is valid, result is TRUE. Otherwise, this functions returns FALSE and the parser will generate an appropriate error message. The default implementation always returns FALSE.
PROCEDURE (elem: Element) AddCharacters(VAR chars: StringVar; charsStart: CharPos; charsEnd: CharPos)
Adds character data to the content of element elem. The new characters are in the character interval `chars[charsStart..charsEnd-1]'.
PROCEDURE (elem: Element) AddChild(child: Element)
Adds the parsed child element child to elem. The object child was previously created with Element.NewChild.
PROCEDURE (elem: Element) CheckElement(): String
Called at the very end of an XML element (after Element.MissingChild) to perform consistency checks on the whole element. For example, this method makes sure that the combination of attributes and content does not violate any rules of the application.
Result is an error message if some part of the element is invalid, and NIL on success. By default, NIL is returned.
Any code that should be evaluted if an element is completed, should be placed in this method.
PROCEDURE (elem: Element) HasMixedContent(): BOOLEAN
Returns TRUE, if element elem containes mixed content. In this case, the element may contain character data other than whitespace. For element that has only element content, Element.AddCharacters is not called, and an error is signalled if the element content includes non-whitespace characters. By default, element-only content is assumed.
PROCEDURE (elem: Element) IsAttributeName(localName: String): BOOLEAN
Determines if localName is a valid name for an attribute of elem. If result is FALSE, the parser will generate an appropriate error message. By default, all attribute names are rejected.
PROCEDURE (elem: Element) IsChildName(localName: String): BOOLEAN
Determines if localName is a valid name for a child element of elem. If result is FALSE, the parser will generate an appropriate error message. By default, all child names are rejected.
PROCEDURE (elem: Element) MissingAttribute(): String
Called at the end of the attribute list of a start tag to determine if any required attributes are missing. Result is the name of one of the missing attributes, or NIL if all required attributes are present. The default behavious is to return NIL.
PROCEDURE (elem: Element) MissingChild(): String
Called at the end of an XML element to determine if any required child elements are missing. Result is the name of one of the missing childs, or NIL if all required child elements are present. By default, NIL is returned.
PROCEDURE (elem: Element) NewChild(localName: String): Element
Creates a new instance of the child element if the child can appear at the current place in the element. Otherwise, it returns NIL. The default implementation always returns NIL.
PROCEDURE (elem: Element) SetLocator(l: Locator)
Using the locator l, the context of the element and its attributes can be determined. This can be used to get the base URI relative to which an URI attribute value should be expanded. This method is called after an element has been created, and before any attribute or content data is passed on to it.
PROCEDURE (elem: Element) Write(writer: Writer)
Serializes the object elem into an XML element. The data is generated with the writer writer.
Class Detail: ElementFactory |
Class Detail: List |
Field Detail |
FIELD head-: Element
FIELD tail-: Element
Constructor Detail |
PROCEDURE NewList(): List
Method Detail |
PROCEDURE (list: List) Append(elem: Element)
PROCEDURE (list: List) IsEmpty(): BOOLEAN
PROCEDURE (list: List) Write(w: Writer)
Class Detail: PCData |
Field Detail |
FIELD chars-: StringBuffer
Constructor Detail |
PROCEDURE InitPCData(pcdata: PCData)
PROCEDURE NewPCData(): PCData
Method Detail |
PROCEDURE (pcdata: PCData) AddCharacters(VAR chars: StringVar; charsStart: CharPos; charsEnd: CharPos)
Adds character data to the content of element pcdata. The new characters are in the character interval `chars[charsStart..charsEnd-1]'.
[Description inherited from AddCharacters]
Redefines: AddCharacters
PROCEDURE (pcdata: PCData) Normalize(stripLeadingWS: BOOLEAN; stripTrailingWS: BOOLEAN)
PROCEDURE (pcdata: PCData) Write(writer: Writer)
Serializes the object pcdata into an XML element. The data is generated with the writer writer.
[Description inherited from Write]
Redefines: Write
Class Detail: RootFactory |
Constructor Detail |
PROCEDURE NewRootFactory(): RootFactory
Method Detail |
PROCEDURE (rf: RootFactory) AddFactory(name: StringVar; gen: FactoryFunction)
PROCEDURE (rf: RootFactory) NewElement(name: String): Element
Called with the name of the root element of an XML document. Result is a new instance of the element if the name is valid, or NIL otherwise.
Class Detail: StringBuffer |
Field Detail |
FIELD array-: String
FIELD length-: LONGINT
Constructor Detail |
PROCEDURE NewStringBuffer(value: StringVar): StringBuffer
Method Detail |
PROCEDURE (sb: StringBuffer) AddCharacters(VAR chars: StringVar; charsStart: CharPos; charsEnd: CharPos)
Type Detail |
TYPE AttValue = AttValue
TYPE CharPos = CharPos
TYPE FactoryFunction = (): Element
TYPE String = String
TYPE StringVar = StringVar
Procedure Detail |
PROCEDURE NewString(value: StringVar): String