eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::Text':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Text (in XML)


Inheritance:

   Object
   |
   +--XML::Node
      |
      +--XML::Text

Package:
stx:goodies/xml/vw
Category:
XML-VW-Nodes
Version:
rev: 1.19 date: 2023/09/07 21:45:32
user: stefan
file: Text.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


This class represents an XML textual object,
i.e. a sequence of legal characters as defined in the XML 1.0 specification
and may represent markup or character data.

Instance Variables:
        text    <CharacterArray | nil>
        stripped        <Boolean>


Class protocol:

instance creation
o  text: aString


Instance protocol:

accessing
o  characterData

o  characterDataDo: aBlock

o  characterDataOnto: str

o  description

o  string

o  strip: aBoolean

o  text

o  text: aText

o  xPath
return the first xPath which uniquely refers to this node.
Going to be obsoleted by xPathAndAlternativesInto:

o  xPathAndUpTo: limit alternativesInto: aBlock
(comment from inherited method)
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

comparing
o  = anXmlText
(comment from inherited method)
return true if the receiver and the arg have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are always considered equal.
redefining it may not work as expected.

o  hash
(comment from inherited method)
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)

converting
o  asString

printing
o  prettyPrintOn: aStream depth: indent
(comment from inherited method)
self subclassResponsibility

o  printCanonicalOn: aStream
(comment from inherited method)
Print myself on the stream in the form described by James
Clark's canonical XML.

o  printHTMLOn: aStream
(comment from inherited method)
Print myself on the stream in a form usual for HTML.

o  printNoIndentOn: aStream endSpacing: endSpacingBlock spacing: spacingBlock
(comment from inherited method)
Print myself on the stream with line breaks between adjacent
elements, but no indentation.

o  printOn: aStream
text size <= 80

testing
o  isBlankText

o  isContent

o  isStripped

o  isText

visiting
o  acceptVisitor: aVisitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:10:41 GMT