|
Class: Node (in XML)
Object
|
+--XML::Node
|
+--XML::Attribute
|
+--XML::Comment
|
+--XML::Document
|
+--XML::Element
|
+--XML::Entity
|
+--XML::Notation
|
+--XML::PI
|
+--XML::Text
- Package:
- stx:goodies/xml/vw
- Category:
- XML-VW-Nodes
- Version:
- rev:
1.64
date: 2024/03/07 07:46:58
- user: cg
- file: Node.st directory: goodies/xml/vw
- module: stx stc-classLibrary: vw
An XML.Node represents a logical component of an XML Document. Logically, the
document is composed of declarations, elements, comments, character references, and
processing instructions, all of which are indicated in the document by explicit markup.
The various subclasses of XML.Node represent these various components.
Subclasses must implement the following messages:
printing
printCanonicalOn:
printHTMLOn:
printNoIndentOn:endSpacing:spacing:
Instance Variables:
parent <XML.Node | nil>
flags <SmallInteger>
inspecting
-
inspector2XMLDOMTabTreeFor: anObject
-
queries
-
isAbstract
-
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.
Twoflower
-
isHTMLBodyElement
-
accessing
-
attributeNamed: attributeName
-
##add MU 11/7/2000 13:38
-
attributes
-
-
children
-
Visualworks uses the method #children to do essentially the same as elements.
I suppose children may be the better name.
-
discard
-
speed up common cases
-
document
-
-
elements
-
Visualworks uses the method #children to do essentially the same as this. Does not do much though
-
expandedName
-
-
flags
-
-
flags: flagBits
-
-
parent
-
-
parent: aNode
-
-
parents
-
-
pathName
-
answer the path name of this node
-
selectNodes: aBlock
-
-
tag
-
-
unDiscard
-
clear the discard flag
copy
-
cloneTree
-
answer a copy of the tree, so that removal of child elements
from the copy does not affect the original node.
Make a shallowCopy to protect the parent
enumerating
-
elementsDo: aBlock
-
intentionally left blank
-
nodesDo: aBlock
-
-
nodesReverseDo: aBlock
-
-
treePosition
-
answer a SequencableCollection which holds the position of the node
in the document tree
inspecting
-
inspector2TabTree
-
extra tab to be shown in an inspector2.
-
inspectorExtraAttributes
-
extra (pseudo instvar) entries to be shown in an inspector.
namespaces
-
findNamespaceAt: qualifier
-
-
findQualifierAtNamespace: ns
-
-
namespaceAt: qualifier
-
-
qualifierAtNamespace: ns
-
printing & storing
-
canonCharacterTable
-
http:www.w3.org/TR/2001/REC-xml-c14n-20010315#Page.10 (Attribute nodes)
-
canonicalPrintString
-
-
displayOn: aGCOrStream
-
what a kludge - Dolphin and Squeak mean: printOn: a stream;
-
noIndentPrintString
-
-
prettyPrintColorizedOn: aStream
-
-
prettyPrintColorizedOn: aStream depth: indent
-
depth should be named indent
-
prettyPrintOn: aStream
-
depth should be named indent
-
prettyPrintOn: aStream depth: indent
-
self subclassResponsibility
-
printCanonical: text on: aStream
-
Print myself on the stream in the form described by
James Clark's canonical XML.
-
printCanonical: text withEscapedLineFeeds: withEscapedLineFeeds on: aStream
-
Print myself on the stream in the form described by
James Clark's canonical XML.
-
printCanonicalOn: aStream
-
Print myself on the stream in the form described by James
Clark's canonical XML.
** This method must be redefined in concrete classes (subclassResponsibility) **
-
printHTMLOn: aStream
-
Print myself on the stream in a form usual for HTML.
** This method must be redefined in concrete classes (subclassResponsibility) **
-
printNoIndentOn: aStream
-
Print myself on the stream with line breaks between adjacent
elements, but no indentation.
-
printNoIndentOn: aStream endSpacing: endSpacingBlock spacing: spacingBlock
-
Print myself on the stream with line breaks between adjacent
elements, but no indentation.
** This method must be redefined in concrete classes (subclassResponsibility) **
-
printOn: aStream
-
self printAsOneLineOn: aStream
-
simpleDescription
-
-
storeOn: aStream
-
blocked: ascii storeString not possible (recursive - element - children - parent)
queries
-
hasAncestor: aNode
-
-
hasSubNodes
-
-
precedes: aNode
-
-
xPath
-
return the first xPath which uniquely refers to this node.
Going to be obsoleted by xPathAndAlternativesInto:
-
xPathAndAlternativesInto: aBlock
-
generates the preferred xPath as return value,
in addition enumerates this xPath and alternative xPathes into aBlock:
- unique attributes among siblings
- index
Useful to offer alternative xpathes in a GUI (eg. in the XML inspector)
-
xPathAndUpTo: limitOrNil alternativesInto: aBlock
-
generates the preferred xPath as return value,
in addition enumerates this xPath and alternative xPathes into aBlock:
- unique attributes among siblings
- index
limitOrNil controls the max. number of Xpathes to be generated
(do avoid enormous combinatoric explosion)
Useful to offer alternative xpathes in a GUI (eg. in the XML inspector);
if nil, all of them are enumerated
testing
-
isAttribute
-
-
isBlankText
-
-
isComment
-
-
isContent
-
-
isDiscarded
-
-
isDocument
-
-
isElement
-
-
isEntity
-
-
isLike: aNode
-
-
isProcessingInstruction
-
-
isText
-
-
isYAXODomNode
-
-
verifyContents
-
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|