xpath/XMLv2__XPathAxisParent.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/xmlsuite/xpath' }"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: XMLv2 }"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
XPathAxis subclass:#XPathAxisParent
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
	instanceVariableNames:''
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
	classVariableNames:''
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
	poolDictionaries:''
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	category:'XML Suite-XPath-Axes'
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
!XPathAxisParent methodsFor:'filtering'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
createNodeSetFromContext:aContext 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
    |parent|
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
    parent := (aContext documentAdaptor xpathParentOf:aContext node).
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
    ^parent 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
        ifNil:[aContext newNodeSet]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
        ifNotNil:[aContext newNodeSetWith:parent]
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
    "Modified: / 13-10-2006 / 20:42:51 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
!XPathAxisParent methodsFor:'printing'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
printOn: stream
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
    stream nextPutAll:'parent::'
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
    "Created: / 15-11-2007 / 22:06:03 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
!XPathAxisParent methodsFor:'testing'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
isXPathAxisParent
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
    ^ true
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
    "Created: / 16-11-2007 / 09:25:08 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
!XPathAxisParent methodsFor:'visiting'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
acceptVisitor:aVisitor 
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
    "Double dispatch back to the visitor, passing my type encoded in
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
     the selector (visitor pattern)"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
    "stub code automatically generated - please change if required"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
    ^ aVisitor visitXPathAxisParent:self
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
    "Created: / 17-11-2007 / 15:31:52 / janfrog"
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
! !
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
!XPathAxisParent class methodsFor:'documentation'!
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    57
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    58
version
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    59
    ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/xpath/XMLv2__XPathAxisParent.st,v 1.5 2007-11-18 08:58:16 vranyj1 Exp $'
5057afe1ec87 Initial import from CVS
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    60
! !