eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::NodeTag':

Home

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

Class: NodeTag (in XML)


Inheritance:

   Object
   |
   +--XML::NodeTag

Package:
stx:goodies/xml/vw
Category:
XML-VW-Parsing
Version:
rev: 1.16 date: 2021/01/20 14:49:58
user: cg
file: NodeTag.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


In XML all elements or nodes are delimited by start and end tags (or empty-element tags) and instances of this class are used to represent the name which appears in those tags. The name is composed of a simple type name

Instance Variables:
	namespace       <String> URI of the (XML) namespace of the element or attribute
	type    <String> Name of tag, used to indicate element type, within the chosen namespace
	qualifier       <String> type qualifier of the original XML document. Two NodeTags are considered equivalent if their namespace and type are equal, even if the qualifiers are different. This is primarily used only if it is desired to store the XML Document as a serialized string again. Qualiofiers are used with xmlns and xmlns:foo attributes to discover the namespace of the NodeTag.


Instance protocol:

accessing
o  expandedName

o  namespace

o  qualifier

o  type

comparing
o  < aNodeTag

o  = aNodeTag
Needed for canonical XML. REW

o  hash
Needed for canonical XML. REW

converting
o  asString

initialization
o  qualifier: q ns: ns type: typeStr

printing
o  printOn: aStream
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.

testing
o  isLike: aName
strings do not come with namespace information, so when matching a string, we
can only compare qualifier and type ... this is needed so elements in the dom tree
can be accessed by name even when xmlns or xmlns:Q attributes are in use

o  isLikeForValidation: aNodeTag
for validation purposes, nodetags are equal if qualifier and prefix are equal.
this does not work if prefixes are re-defined, but it's better than the status quo

o  isLikeString: aName



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:29:04 GMT