eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::Comment':

Home

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

Class: Comment (in XML)


Inheritance:

   Object
   |
   +--XML::Node
      |
      +--XML::Comment

Package:
stx:goodies/xml/vw
Category:
XML-VW-Nodes
Version:
rev: 1.15 date: 2022/07/21 11:21:37
user: cg
file: Comment.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


This class represents an XML comment. XML comments may appear anywhere in an XML document outside other markup or within the document type declaration at places allowed by grammar.

 XML comments are delimited by the start-tag '<!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!--' and the end-tag '-->'. 

According to the XML 1.0 specification, for compatibilty, double-hyphens (the string '--') must not occur within comments.

Instance Variables:
	text    <String>  contents of the comment element


Instance protocol:

accessing
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
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)

comparing
o  = anXmlComment
(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)

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

o  printCanonicalOn: aStream

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
(comment from inherited method)
self printAsOneLineOn: aStream

testing
o  isComment

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; Sun, 22 Dec 2024 02:12:28 GMT