xpath/XMLv2__XPathNode.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 14 Nov 2018 13:13:37 +0100
changeset 306 fb9d45df523b
parent 296 ea3dbc023c80
permissions -rw-r--r--
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present - All source *.st files are now Unicode UTF8 without BOM Files are in two groups (fileOut works this way in Smalltalk/X): - containing a unicode character have "{ Encoding: utf8 }" at the header - ASCII only are without the header

"{ Package: 'stx:goodies/xmlsuite/xpath' }"

"{ NameSpace: XMLv2 }"

Object subclass:#XPathNode
	instanceVariableNames:'adaptorData adaptor'
	classVariableNames:''
	poolDictionaries:''
	category:'XML Suite-XPath'
!

Object subclass:#XPathNodePosition
	instanceVariableNames:'tagPosition attributePosition'
	classVariableNames:''
	poolDictionaries:''
	privateIn:XPathNode
!


!XPathNode methodsFor:'accessing'!

adaptor:something
    adaptor := something.
!

adaptorData
    ^ adaptorData
!

adaptorData:something
    adaptorData := something.
!

principalNodeType
    ^ adaptor principalNodeTypeOfNode: self.
! !

!XPathNode methodsFor:'node operations'!

documentPositionVector
    ^ adaptor documentPositionVectorOfNode:self.
!

identityHash
    ^ adaptor identityHashOfNode:self.
!

name
    ^ adaptor nameOfNode:self.
!

parent
    ^ adaptor parentOfNode:self.
!

position
    ^ adaptor positionOfNode:self.
!

subnodes
    ^ adaptor subnodesOfNode:self withType:#node.
!

subnodesOfType:aType
    ^ adaptor subnodesOfNode:self withType:aType.
!

text
    ^ adaptor textOfNode:self.
!

value
    ^ adaptor valueOfNode:self.
! !

!XPathNode methodsFor:'printing'!

printOn:aStream 
    ^ adaptorData printOn:aStream.
! !

!XPathNode methodsFor:'type'!

isAttribute
   ^ adaptor isNodeAttribute:self.
!

isComment
   ^ adaptor isNodeComment:self.
!

isDocument
   ^ adaptor isNodeDocument:self.
!

isElement
   ^ adaptor isNodeElement:self.
!

isText
   ^ adaptor isNodeText:self.
! !

!XPathNode::XPathNodePosition class methodsFor:'documentation'!

version
    ^'$Id$'
! !

!XPathNode::XPathNodePosition methodsFor:'accessing'!

attributePosition
    ^ attributePosition
!

attributePosition:something
    attributePosition := something.
!

tagPosition
    ^ tagPosition
!

tagPosition:something
    tagPosition := something.
! !

!XPathNode class methodsFor:'documentation'!

version
    ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/xpath/XMLv2__XPathNode.st,v 1.1 2006-09-28 16:15:17 vranyj1 Exp $'
! !