Skip to content

Commit

Permalink
Add storage for textContentlength and subroutine to update it
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby White committed Nov 24, 2007
1 parent 04c6102 commit 01cd7c0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dom/m_dom_dom.f90
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ module m_dom_dom
type(documentExtras), pointer :: docExtras
type(elementOrAttributeExtras), pointer :: elExtras
type(docTypeExtras), pointer :: dtdExtras
integer :: textContentLength = 0
end type Node

type(DOMImplementation), save, target :: FoX_DOM
Expand Down Expand Up @@ -4109,6 +4110,21 @@ end function lookupPrefix
! function setUserData
! will not implement ...

subroutine updateTextContentLength(np, n)
type(Node), pointer :: np
integer, intent(in) :: n

if (n/=0) then
do while (associated(np))
np%textContentLength = np%textContentLength + n
np => getParentNode(np)
if (associated(np)) then
if (getNodeType(np)==DOCUMENT_NODE) exit
endif
enddo
endif
end subroutine updateTextContentLength

subroutine putNodesInDocument(doc, arg)
type(Node), pointer :: doc, arg
type(Node), pointer :: this, treeroot
Expand Down
15 changes: 15 additions & 0 deletions dom/m_dom_node.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,21 @@ TOHW_m_dom_treewalk(`
! function setUserData
! will not implement ...

subroutine updateTextContentLength(np, n)
type(Node), pointer :: np
integer, intent(in) :: n

if (n/=0) then
do while (associated(np))
np%textContentLength = np%textContentLength + n
np => getParentNode(np)
if (associated(np)) then
if (getNodeType(np)==DOCUMENT_NODE) exit
endif
enddo
endif
end subroutine updateTextContentLength

subroutine putNodesInDocument(doc, arg)
type(Node), pointer :: doc, arg
type(Node), pointer :: this, treeroot
Expand Down
1 change: 1 addition & 0 deletions dom/m_dom_types.m4
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ TOHW_m_dom_publics(`
type(documentExtras), pointer :: docExtras
type(elementOrAttributeExtras), pointer :: elExtras
type(docTypeExtras), pointer :: dtdExtras
integer :: textContentLength = 0
end type Node

type(DOMImplementation), save, target :: FoX_DOM
Expand Down

0 comments on commit 01cd7c0

Please sign in to comment.