eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::PI':

Home

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

Class: PI (in XML)


Inheritance:

   Object
   |
   +--XML::Node
      |
      +--XML::PI

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

Description:


This class represents the XML Processing Instruction element. Processing instructions allow XML documents to contain instructions for applications. The 'name' instance variable represents the target of this processing instruction and is used to identify the application to which this processing instruction is directed.

 XML processing instructions are delimited by the start-tag '<?' and the end-tag '?>'. 

According to the XML 1.0 specification, the target names "XML", "xml" and so on are reserved for standardization


Instance Variables:
	name    <XML.NodeTag>   the target of this processing instruction, used to identify the application to which this processing instruction is directed.
	text            <String>                        the processing instructions themselves


Class protocol:

instance creation
o  name: nm text: aString


Instance protocol:

accessing
o  name

o  text

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  = anXmlPI
(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)

initialization
o  name: nm text: aString

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

testing
o  isLike: aNode

o  isProcessingInstruction

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:06:08 GMT