You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2001/10/22 08:25:02 UTC

cvs commit: embperl Cmd.xs DOM.xs Embperl.xs ep2.h epcmd2.c epcomp.c epdat.h epdom.c epdom.h epmain.c epparse.c

richter     01/10/21 23:25:02

  Modified:    .        Tag: Embperl2c Cmd.xs DOM.xs Embperl.xs ep2.h
                        epcmd2.c epcomp.c epdat.h epdom.c epdom.h epmain.c
                        epparse.c
  Log:
  Embperl 2 - internal tree storage rewrite
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.8   +4 -4      embperl/Cmd.xs
  
  Index: Cmd.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Cmd.xs,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- Cmd.xs	2001/04/26 13:12:45	1.1.2.7
  +++ Cmd.xs	2001/10/22 06:25:01	1.1.2.8
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Cmd.xs,v 1.1.2.7 2001/04/26 13:12:45 richter Exp $
  +#   $Id: Cmd.xs,v 1.1.2.8 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################
   
  @@ -40,7 +40,7 @@
       STRLEN nValue ;
       char * sN = SV2String (sName, nName) ;
       char * sV = SV2String (sValue, nValue) ;
  -    embperlCmd_InputCheck (pCurrReq, DomTree_self (xDomTree), xNode, sN, nName, sV, nValue, SvOK (bSetInSource)?1:0) ;
  +    embperlCmd_InputCheck (pCurrReq, DomTree_self (xDomTree), xNode, 0, sN, nName, sV, nValue, SvOK (bSetInSource)?1:0) ;
       
   
   void
  @@ -55,7 +55,7 @@
       STRLEN nValue ;
       char * sN = SV2String (sName, nName) ;
       char * sV = SV2String (sValue, nValue) ;
  -    embperlCmd_Option (pCurrReq, DomTree_self (xDomTree), xNode, sN, nName, sV, nValue,  SvOK (bSetInSource)?1:0) ;
  +    embperlCmd_Option (pCurrReq, DomTree_self (xDomTree), xNode, 0, sN, nName, sV, nValue,  SvOK (bSetInSource)?1:0) ;
       
   
   void
  @@ -64,7 +64,7 @@
       int xNode
       char * sArg
   CODE:
  -    embperlCmd_Hidden (pCurrReq, DomTree_self (xDomTree), xNode, sArg) ;
  +    embperlCmd_Hidden (pCurrReq, DomTree_self (xDomTree), xNode, 0, sArg) ;
       
   
   
  
  
  
  1.1.2.14  +20 -20    embperl/DOM.xs
  
  Index: DOM.xs
  ===================================================================
  RCS file: /home/cvs/embperl/DOM.xs,v
  retrieving revision 1.1.2.13
  retrieving revision 1.1.2.14
  diff -u -r1.1.2.13 -r1.1.2.14
  --- DOM.xs	2001/08/01 08:02:36	1.1.2.13
  +++ DOM.xs	2001/10/22 06:25:01	1.1.2.14
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: DOM.xs,v 1.1.2.13 2001/08/01 08:02:36 richter Exp $
  +#   $Id: DOM.xs,v 1.1.2.14 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################
   
  @@ -63,7 +63,7 @@
   PPCODE:
       SvGETMAGIC_P4(sText) ;
       s = SV2String (sText, l) ;
  -    Node_replaceChildWithCDATA (DomTree_self(pDomNode -> xDomTree), -1, pDomNode -> xNode, s, l, (pCurrReq -> nCurrEscMode & 3)== 3?1 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
  +    Node_replaceChildWithCDATA (DomTree_self(pDomNode -> xDomTree), pDomNode -> xNode, 0, s, l, (pCurrReq -> nCurrEscMode & 3)== 3?1 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
       pCurrReq -> nCurrEscMode = pCurrReq -> nEscMode ;
       pCurrReq -> bEscModeSet = -1 ;
       /*SvREFCNT_inc (sText) ;*/
  @@ -82,7 +82,7 @@
   PPCODE:
       SvGETMAGIC_P4(sText) ;
       s = SV2String (sText, l) ;
  -    Node_replaceChildWithCDATA (DomTree_self(xDomTree), -1, xOldChild, s, l, (pCurrReq -> nCurrEscMode & 3)== 3?1 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
  +    Node_replaceChildWithCDATA (DomTree_self(xDomTree), xOldChild, 0, s, l, (pCurrReq -> nCurrEscMode & 3)== 3?1 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
       pCurrReq -> nCurrEscMode = pCurrReq -> nEscMode ;
       pCurrReq -> bEscModeSet = -1 ;
       /*SvREFCNT_inc (sText) ;*/
  @@ -100,7 +100,7 @@
   PPCODE:
       SvGETMAGIC_P4(sText) ;
       s = SV2String (sText, l) ;
  -    Node_replaceChildWithCDATA (DomTree_self(pCurrReq -> xCurrDomTree), -1, xOldChild, s, l, (pCurrReq -> nCurrEscMode & 3)== 3?1 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
  +    Node_replaceChildWithCDATA (DomTree_self(pCurrReq -> xCurrDomTree), xOldChild, 0, s, l, (pCurrReq -> nCurrEscMode & 3)== 3?1 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
       pCurrReq -> nCurrEscMode = pCurrReq -> nEscMode ;
       pCurrReq -> bEscModeSet = -1 ;
       /*SvREFCNT_inc (sText) ;*/
  @@ -117,7 +117,7 @@
       SV * sRet  ;
   PPCODE:
       SvGETMAGIC_P4(sText) ;
  -    sRet = Node_replaceChildWithUrlDATA (pDomNode -> xDomTree, pDomNode -> xNode,sText) ;
  +    sRet = Node_replaceChildWithUrlDATA (pDomNode -> xDomTree, pDomNode -> xNode, 0, sText) ;
   
       ST(0) = sRet ;
       XSRETURN(1) ;
  @@ -130,7 +130,7 @@
       SV * sRet  ;
   PPCODE:
       SvGETMAGIC_P4(sText) ;
  -    sRet = Node_replaceChildWithUrlDATA (pCurrReq -> xCurrDomTree, xOldChild,sText) ;
  +    sRet = Node_replaceChildWithUrlDATA (pCurrReq -> xCurrDomTree, xOldChild, 0, sText) ;
   
       ST(0) = sRet ;
       XSRETURN(1) ;
  @@ -140,7 +140,7 @@
   embperl_Node_removeChild (pDomNode)
       tDomNode * pDomNode
   CODE:
  -    Node_removeChild (DomTree_self (pDomNode -> xDomTree), -1, pDomNode -> xNode) ;
  +    Node_removeChild (DomTree_self (pDomNode -> xDomTree), -1, pDomNode -> xNode, 0) ;
   
   
   void
  @@ -148,7 +148,7 @@
       int xDomTree
       int xChild
   CODE:
  -    Node_removeChild (DomTree_self (xDomTree), -1, xChild) ;
  +    Node_removeChild (DomTree_self (xDomTree), -1, xChild, 0) ;
   
   
   void
  @@ -165,9 +165,9 @@
       sT = SV2String (sText, nText) ;
       pDomTree = DomTree_self(pParentNode -> xDomTree) ;
       Node_self (pDomTree,pParentNode -> xNode) -> bFlags |= nflgModified | nflgReturn ;
  -    xNewParent = Node_cloneNode (pDomTree, pParentNode -> xNode, 1) ;
  +    xNewParent = Node_cloneNode (pDomTree, pParentNode -> xNode, 0, 1) ;
       DomTree_selfCheckpoint (pDomTree, pParentNode -> xNode, xNewParent) ;
  -    Node_appendChild (pDomTree, nType, 0, sT, nText, xNewParent, 0, 0, NULL) ;
  +    Node_appendChild (pDomTree, xNewParent, 0, nType, 0, sT, nText, 0, 0, NULL) ;
   
   
   void
  @@ -182,9 +182,9 @@
       char * sT = SV2String (sText, nText) ;
       tDomTree * pDomTree = DomTree_self(xDomTree) ;
       Node_self (pDomTree,xParent) -> bFlags |= nflgModified | nflgReturn ;
  -    xNewParent = Node_cloneNode (pDomTree, xParent, 1) ;
  +    xNewParent = Node_cloneNode (pDomTree, xParent, 0, 1) ;
       DomTree_selfCheckpoint (pDomTree, xParent, xNewParent) ;
  -    Node_appendChild (pDomTree, nType, 0, sT, nText, xNewParent, 0, 0, NULL) ;
  +    Node_appendChild (pDomTree, xNewParent, 0, nType, 0, sT, nText, 0, 0, NULL) ;
   
   
   char *
  @@ -195,7 +195,7 @@
   PREINIT:
       char * sText ;
   CODE:
  -    sText = Node_childsText (DomTree_self (xDomTree), xChild, 0, bDeep) ;
  +    sText = Node_childsText (DomTree_self (xDomTree), xChild, 0, 0, bDeep) ;
       RETVAL = sText?sText:"" ;
   OUTPUT:
       RETVAL
  @@ -228,7 +228,7 @@
   embperl_DomTree_iDiscardAfterCheckpoint (xNode)
       int xNode
   CODE:
  -    DomTree_discardAfterCheckpoint (pCurrReq -> xCurrDomTree, xNode) ;
  +    DomTree_discardAfterCheckpoint (pCurrReq -> xCurrDomTree, xNode, 0) ;
   
   #void
   #Node_parentNode (xChild)
  @@ -261,7 +261,7 @@
   
       pDomTree = DomTree_self (pDomNode -> xDomTree) ;
   
  -    Element_selfSetAttribut (pDomTree, Node_self (pDomTree, pDomNode -> xNode), sA, nAttr, sT, nText, 1) ;
  +    Element_selfSetAttribut (pDomTree, Node_self (pDomTree, pDomNode -> xNode), 0, sA, nAttr, sT, nText, 1) ;
   
   
   void
  @@ -277,7 +277,7 @@
       char * sA = SV2String (sAttr, nAttr) ;
       tDomTree * pDomTree = DomTree_self (xDomTree) ;
   
  -    Element_selfSetAttribut (pDomTree, Node_self (pDomTree, xNode), sA, nAttr, sT, nText, 1) ;
  +    Element_selfSetAttribut (pDomTree, Node_self (pDomTree, xNode), 0, sA, nAttr, sT, nText, 1) ;
   
   
   
  @@ -294,7 +294,7 @@
       sA = SV2String (sAttr, nAttr) ;
       pDomTree = DomTree_self (pDomNode -> xDomTree) ;
   
  -    Element_selfRemoveAttribut (pDomTree, Node_self (pDomTree, pDomNode -> xNode), sA, nAttr, 1) ;
  +    Element_selfRemoveAttribut (pDomTree, Node_self (pDomTree, pDomNode -> xNode), 0, sA, nAttr, 1) ;
   
   
   void
  @@ -307,7 +307,7 @@
       char * sA = SV2String (sAttr, nAttr) ;
       tDomTree * pDomTree = DomTree_self (xDomTree) ;
   
  -    Element_selfRemoveAttribut (pDomTree, Node_self (pDomTree, xNode), sA, nAttr, 1) ;
  +    Element_selfRemoveAttribut (pDomTree, Node_self (pDomTree, xNode), 0, sA, nAttr, 1) ;
   
   
   ################################################################################
  @@ -325,7 +325,7 @@
   CODE:
       pDomTree = DomTree_self (pAttr -> xDomTree) ;
   
  -    Attr_selfValue (pDomTree, Attr_self(pDomTree, pAttr -> xNode), &sAttrText) ;
  +    Attr_selfValue (pDomTree, Attr_self(pDomTree, pAttr -> xNode), 0, &sAttrText) ;
       RETVAL = newSVpv (sAttrText, ArrayGetSize (sAttrText)) ;
       StringFree (&sAttrText) ;
   OUTPUT:
  @@ -340,7 +340,7 @@
       tDomTree * pDomTree = DomTree_self (xDomTree) ;
       char * sAttrText = NULL ;
   
  -    Attr_selfValue (pDomTree, Attr_self(pDomTree, xAttr), &sAttrText) ;
  +    Attr_selfValue (pDomTree, Attr_self(pDomTree, xAttr), 0, &sAttrText) ;
       RETVAL = newSVpv (sAttrText, ArrayGetSize (sAttrText)) ;
       StringFree (&sAttrText) ;
   OUTPUT:
  
  
  
  1.29.4.24 +1 -1      embperl/Embperl.xs
  
  Index: Embperl.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.xs,v
  retrieving revision 1.29.4.23
  retrieving revision 1.29.4.24
  diff -u -r1.29.4.23 -r1.29.4.24
  --- Embperl.xs	2001/08/29 08:25:22	1.29.4.23
  +++ Embperl.xs	2001/10/22 06:25:01	1.29.4.24
  @@ -269,7 +269,7 @@
   	{
   	char * p = SvPV (sText, l) ;
           /* Node_appendChild (DomTree_self (r -> xCurrDomTree), ntypCDATA, 0, p, l, r -> xCurrNode, 0, 0) ; */
  -        r -> xCurrNode = Node_insertAfter_CDATA (p, l, (r -> nCurrEscMode & 3)== 3?1 + (r -> nCurrEscMode & 4):r -> nCurrEscMode, DomTree_self (r -> xCurrDomTree), r -> xCurrNode) ; 
  +        r -> xCurrNode = Node_insertAfter_CDATA (p, l, (r -> nCurrEscMode & 3)== 3?1 + (r -> nCurrEscMode & 4):r -> nCurrEscMode, DomTree_self (r -> xCurrDomTree), r -> xCurrNode, r -> nCurrRepeatLevel) ; 
           }
       else
   #endif
  
  
  
  1.1.2.15  +5 -1      embperl/Attic/ep2.h
  
  Index: ep2.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/ep2.h,v
  retrieving revision 1.1.2.14
  retrieving revision 1.1.2.15
  diff -u -r1.1.2.14 -r1.1.2.15
  --- ep2.h	2001/04/26 13:12:48	1.1.2.14
  +++ ep2.h	2001/10/22 06:25:01	1.1.2.15
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: ep2.h,v 1.1.2.14 2001/04/26 13:12:48 richter Exp $
  +#   $Id: ep2.h,v 1.1.2.15 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -21,6 +21,7 @@
   void embperlCmd_InputCheck (/*i/o*/ register req *     r,
   			    /*in*/ tDomTree *	    pDomTree,
   			    /*in*/ tNode	    xNode,
  +			    /*in*/ tRepeatLevel     nRepeatLevel,
   			    /*in*/ const char *     pName,
   			    /*in*/ int              nNameLen,
   			    /*in*/ const char *     pVal,
  @@ -31,6 +32,7 @@
   void embperlCmd_Option (/*i/o*/ register req *     r,
   			/*in*/ tDomTree *	    pDomTree,
   			/*in*/ tNode	    xNode,
  +		        /*in*/ tRepeatLevel     nRepeatLevel,
   			/*in*/ const char *     pName,
   			/*in*/ int              nNameLen,
   			/*in*/ const char *     pVal,
  @@ -40,11 +42,13 @@
   int embperlCmd_Hidden	(/*i/o*/ register req *     r,
   			 /*in*/ tDomTree *	    pDomTree,
   			 /*in*/ tNode		    xNode,
  +			 /*in*/ tRepeatLevel     nRepeatLevel,
   			 /*in*/ const char *	    sArg) ;
   			
   
   SV * Node_replaceChildWithUrlDATA (/*in*/ tIndex  xDomTree, 
   					  tIndex  xOldChild, 
  +				  /*in*/ tRepeatLevel     nRepeatLevel,
   					  SV *    sText) ;
       
   			 
  
  
  
  1.4.2.11  +56 -52    embperl/Attic/epcmd2.c
  
  Index: epcmd2.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epcmd2.c,v
  retrieving revision 1.4.2.10
  retrieving revision 1.4.2.11
  diff -u -r1.4.2.10 -r1.4.2.11
  --- epcmd2.c	2001/07/31 08:02:07	1.4.2.10
  +++ epcmd2.c	2001/10/22 06:25:01	1.4.2.11
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epcmd2.c,v 1.4.2.10 2001/07/31 08:02:07 richter Exp $
  +#   $Id: epcmd2.c,v 1.4.2.11 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -25,21 +25,22 @@
   
   
   
  -static embperlCmd_SetRemove (/*i/o*/ register req *     r,
  +static embperlCmd_SetRemove (/*i/o*/ register req * r,
   			     /*in*/ tDomTree *	    pDomTree,
  +			     /*in*/ tRepeatLevel    nRepeatLevel,
   			     /*in*/ tNode	    xNode,
  -			     /*in*/ const char *     pName,
  -			     /*in*/ int              nNameLen,
  -			     /*in*/ const char *     pVal,
  -			     /*in*/ int              nValLen,
  -			     /*in*/ const char *     sAttrName, 
  -			     /*in*/ int              nAttrLen,
  -                             /*in*/ int              bSetInSource) 
  +			     /*in*/ const char *    pName,
  +			     /*in*/ int             nNameLen,
  +			     /*in*/ const char *    pVal,
  +			     /*in*/ int             nValLen,
  +			     /*in*/ const char *    sAttrName, 
  +			     /*in*/ int             nAttrLen,
  +                             /*in*/ int             bSetInSource) 
   
       {
       int	    bEqual = 0 ;
       SV **   ppSV = hv_fetch(pCurrReq -> pFormHash, (char *)pName, nNameLen, 0) ;  
  -    tNodeData * pNode = Node_self (pDomTree, xNode) ;
  +    tNodeData * pNode = Node_selfLevel (pDomTree, xNode, nRepeatLevel) ;
   
       if (ppSV)
   	{
  @@ -67,13 +68,13 @@
   
   	if (bEqual)
   	    {
  -	    Element_selfSetAttribut (pDomTree, pNode, sAttrName, nAttrLen, NULL, 0, 1) ;
  +	    Element_selfSetAttribut (pDomTree, pNode, nRepeatLevel, sAttrName, nAttrLen, NULL, 0, 1) ;
   	    if (r -> bDebug & dbgInput)
   		lprintf (r, "[%d]INPU: Set Attribut: Name: '%*.*s' Value: '%*.*s' Attribute: '%*.*s'\n", r -> nPid, nNameLen, nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName) ; 
               }
   	else
   	    {
  -	    Element_selfRemoveAttribut (pDomTree, pNode, sAttrName, nAttrLen, 1) ;
  +	    Element_selfRemoveAttribut (pDomTree, pNode, nRepeatLevel, sAttrName, nAttrLen, 1) ;
   	    if (r -> bDebug & dbgInput)
   		lprintf (r, "[%d]INPU: Remove Attribut: Name: '%*.*s' Value: '%*.*s' Attribute: '%*.*s'\n", r -> nPid, nNameLen, nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName ) ; 
   	    }
  @@ -86,7 +87,7 @@
   	    if (r -> bDebug & dbgInput)
   		lprintf (r, "[%d]INPU: Has already Attribut: Name: '%*.*s' Value: '%*.*s' Attribute: '%*.*s'\n", r -> nPid, nNameLen, nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName ) ; 
   	    if ((pNode -> bFlags & (nflgModified | nflgReturn)) ==  (nflgModified | nflgReturn) && !bSetInSource) 
  -		Element_selfRemoveAttribut (pDomTree, pNode, sAttrName, nAttrLen, 1) ;
  +		Element_selfRemoveAttribut (pDomTree, pNode, nRepeatLevel, sAttrName, nAttrLen, 1) ;
               else
                   DomTree_selfCheckpoint (pDomTree, pNode -> xNdx, pNode -> xNdx) ;
   	    }
  @@ -95,7 +96,7 @@
   	    if (r -> bDebug & dbgInput)
   		lprintf (r, "[%d]INPU: No value in %%fdat for Attribut: Name: '%*.*s' Value: '%*.*s' Attribute: '%*.*s'\n", r -> nPid, nNameLen, nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName ) ; 
   	    if ((pNode -> bFlags & (nflgModified | nflgReturn)) ==  (nflgModified | nflgReturn) && bSetInSource) 
  -		Element_selfSetAttribut (pDomTree, pNode, sAttrName, nAttrLen, NULL, 0, 1) ;
  +		Element_selfSetAttribut (pDomTree, pNode, nRepeatLevel, sAttrName, nAttrLen, NULL, 0, 1) ;
               else
                   DomTree_selfCheckpoint (pDomTree, pNode -> xNdx, pNode -> xNdx) ;
   
  @@ -103,7 +104,7 @@
   
   	if ((pNode -> bFlags & nflgModified) == 0)
   	    {
  -	    pNode = Node_selfCondCloneNode (pDomTree, pNode) ;
  +	    pNode = Node_selfCondCloneNode (pDomTree, pNode, nRepeatLevel) ;
   	    pNode -> bFlags |= nflgModified | nflgReturn ; /* don't modifiy attribute again, for example in another loop iteration */
   	    }
   	}
  @@ -120,6 +121,7 @@
   void embperlCmd_InputCheck (/*i/o*/ register req *     r,
   			    /*in*/ tDomTree *	    pDomTree,
   			    /*in*/ tNode	    xNode,
  +			    /*in*/ tRepeatLevel     nRepeatLevel,
   			    /*in*/ const char *     pName,
   			    /*in*/ int              nNameLen,
   			    /*in*/ const char *     pVal,
  @@ -127,7 +129,7 @@
                               /*in*/ int              bSetInSource) 
   
       {
  -    embperlCmd_SetRemove (r, pDomTree, xNode, pName, nNameLen, pVal, nValLen, "checked", 7, bSetInSource) ;
  +    embperlCmd_SetRemove (r, pDomTree, xNode, nRepeatLevel, pName, nNameLen, pVal, nValLen, "checked", 7, bSetInSource) ;
       }
   
   
  @@ -138,9 +140,10 @@
   /* ---------------------------------------------------------------------------- */
   
   
  -void embperlCmd_Option (/*i/o*/ register req *     r,
  -			/*in*/ tDomTree *	    pDomTree,
  -			/*in*/ tNode	    xNode,
  +void embperlCmd_Option (/*i/o*/ register req *  r,
  +			/*in*/ tDomTree *	pDomTree,
  +			/*in*/ tNode	        xNode,
  +		        /*in*/ tRepeatLevel     nRepeatLevel,
   			/*in*/ const char *     pName,
   			/*in*/ int              nNameLen,
   			/*in*/ const char *     pVal,
  @@ -149,7 +152,7 @@
                            
   
       {
  -    embperlCmd_SetRemove (r, pDomTree, xNode, pName, nNameLen, pVal, nValLen, "selected", 8, bSetInSource) ;
  +    embperlCmd_SetRemove (r, pDomTree, xNode, nRepeatLevel, pName, nNameLen, pVal, nValLen, "selected", 8, bSetInSource) ;
       }
   
   
  @@ -166,6 +169,7 @@
   int embperlCmd_Hidden	(/*i/o*/ register req *     r,
   			 /*in*/ tDomTree *	    pDomTree,
   			 /*in*/ tNode		    xNode,
  +		         /*in*/ tRepeatLevel	    nRepeatLevel,
   			 /*in*/ const char *	    sArg)
   
       {
  @@ -188,13 +192,12 @@
   
       EPENTRY (CmdHidden) ;
   
  -    Node_selfCondCloneNode (pDomTree, Node_self (pDomTree, xNode)) ;
  -    pNode = Node_self (pDomTree, xNode) ;
  +    pNode = Node_selfCondCloneNode (pDomTree, Node_selfLevel (pDomTree, xNode, nRepeatLevel), nRepeatLevel) ;
   
       if ((pNode -> bFlags & nflgModified))
   	{
   	pNode -> bFlags |= nflgReturn | nflgModified ;
  -	pNewNode = Node_selfCloneNode (pDomTree, pNode, 0) ;
  +	pNewNode = Node_selfCloneNode (pDomTree, pNode, nRepeatLevel, 0) ;
   	}
       else
   	pNewNode = pNode ;
  @@ -279,17 +282,17 @@
                       {
                       char * s ;
   		    STRLEN     l ;
  -		    tNode xInputNode = Node_appendChild (pDomTree, ntypTag, 0, "input", 5, pNewNode -> xNdx, 0, 0, NULL) ;
  -                    tNode xAttr      = Node_appendChild (pDomTree, ntypAttr, 0, "type", 4, xInputNode, 0, 0, NULL) ;
  -                                       Node_appendChild (pDomTree, ntypAttrValue, 0, "hidden", 6, xAttr, 0, 0, NULL) ;
  +		    tNode xInputNode = Node_appendChild (pDomTree, pNewNode -> xNdx, nRepeatLevel, ntypTag, 0, "input", 5, 0, 0, NULL) ;
  +                    tNode xAttr      = Node_appendChild (pDomTree, xInputNode, nRepeatLevel, ntypAttr, 0, "type", 4, 0, 0, NULL) ;
  +                                       Node_appendChild (pDomTree, xAttr, nRepeatLevel, ntypAttrValue, 0, "hidden", 6, 0, 0, NULL) ;
   		    
  -                          xAttr      = Node_appendChild (pDomTree, ntypAttr, 0, "name", 4, xInputNode, 0, 0, NULL) ;
  -                                       Node_appendChild (pDomTree, ntypAttrValue, 0, pKey, nKey, xAttr, 0, 0, NULL) ;
  -                          xAttr      = Node_appendChild (pDomTree, ntypAttr, 0, "value", 5, xInputNode, 0, 0, NULL) ;
  +                          xAttr      = Node_appendChild (pDomTree, xInputNode, nRepeatLevel, ntypAttr, 0, "name", 4, 0, 0, NULL) ;
  +                                       Node_appendChild (pDomTree, xAttr, nRepeatLevel, ntypAttrValue, 0, pKey, nKey, 0, 0, NULL) ;
  +                          xAttr      = Node_appendChild (pDomTree, xInputNode, nRepeatLevel, ntypAttr, 0, "value", 5, 0, 0, NULL) ;
   
   		    s = SvPV (*ppsv, l) ;			  
   			  
  -			  Node_appendChild (pDomTree, ntypAttrValue, 0, s, l, xAttr, 0, 0, NULL) ;
  +			  Node_appendChild (pDomTree, xAttr, nRepeatLevel, ntypAttrValue, 0, s, l, 0, 0, NULL) ;
                       }
                   }
               }
  @@ -311,17 +314,17 @@
                       {
                       char * s ;
   		    STRLEN     l ;
  -		    tNode xInputNode = Node_appendChild (pDomTree, ntypTag, 0, "input", 5, pNewNode -> xNdx, 0, 0, NULL) ;
  -                    tNode xAttr      = Node_appendChild (pDomTree, ntypAttr, 0, "type", 4, xInputNode, 0, 0, NULL) ;
  -                                       Node_appendChild (pDomTree, ntypAttrValue, 0, "hidden", 6, xAttr, 0, 0, NULL) ;
  +		    tNode xInputNode = Node_appendChild (pDomTree, pNewNode -> xNdx, nRepeatLevel, ntypTag, 0, "input", 5, 0, 0, NULL) ;
  +                    tNode xAttr      = Node_appendChild (pDomTree, xInputNode, nRepeatLevel, ntypAttr, 0, "type", 4, 0, 0, NULL) ;
  +                                       Node_appendChild (pDomTree, xAttr, nRepeatLevel, ntypAttrValue, 0, "hidden", 6, 0, 0, NULL) ;
   		    
  -                          xAttr      = Node_appendChild (pDomTree, ntypAttr, 0, "name", 4, xInputNode, 0, 0, NULL) ;
  -                                       Node_appendChild (pDomTree, ntypAttrValue, 0, pKey, nKey, xAttr, 0, 0, NULL) ;
  -                          xAttr      = Node_appendChild (pDomTree, ntypAttr, 0, "value", 5, xInputNode, 0, 0, NULL) ;
  +                          xAttr      = Node_appendChild (pDomTree, xInputNode, nRepeatLevel, ntypAttr, 0, "name", 4, 0, 0, NULL) ;
  +                                       Node_appendChild (pDomTree, xAttr, nRepeatLevel, ntypAttrValue, 0, pKey, nKey, 0, 0, NULL) ;
  +                          xAttr      = Node_appendChild (pDomTree, xInputNode, nRepeatLevel, ntypAttr, 0, "value", 5, 0, 0, NULL) ;
   
   		    s = SvPV (psv, l) ;			  
   			  
  -			  Node_appendChild (pDomTree, ntypAttrValue, 0, s, l, xAttr, 0, 0, NULL) ;
  +			  Node_appendChild (pDomTree, xAttr, nRepeatLevel, ntypAttrValue, 0, s, l, 0, 0, NULL) ;
                       }
                   }
               }
  @@ -343,9 +346,10 @@
   /* ---------------------------------------------------------------------------- */
   
   
  -SV * Node_replaceChildWithUrlDATA (/*in*/ tIndex  xDomTree, 
  -					  tIndex  xOldChild, 
  -					  SV *    sText)
  +SV * Node_replaceChildWithUrlDATA (/*in*/ tIndex	xDomTree, 
  +					  tIndex	xOldChild, 
  +				   /*in*/ tRepeatLevel  nRepeatLevel,
  +					  SV *		sText)
       
       {
       STRLEN l ;
  @@ -361,7 +365,7 @@
   	int f = AvFILL(pAV)  ;
           tNode xNode ;
   
  -        xOldChild = Node_replaceChildWithCDATA (DomTree_self(xDomTree), -1, xOldChild, "", 0, 4, nflgModified | nflgReturn) ;
  +        xOldChild = Node_replaceChildWithCDATA (DomTree_self(xDomTree), xOldChild, nRepeatLevel, "", 0, 4, nflgModified | nflgReturn) ;
   
   	for (i = 0; i <= f; i++)
   	    {
  @@ -369,14 +373,14 @@
   	    if (ppSV && *ppSV)
   		{
   		s = SV2String (*ppSV, l) ;
  -                xNode = Node_appendChild (pDomTree, ntypText, 0, s, l, xOldChild, 0, 0, NULL) ;
  +                xNode = Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypText, 0, s, l, 0, 0, NULL) ;
   		if (pCurrReq -> nCurrEscMode & 2) 
  -                    Node_self (pDomTree, xNode) -> bFlags |= nflgEscUrl ;
  +                    Node_selfLevel (pDomTree, xNode, nRepeatLevel) -> bFlags |= nflgEscUrl ;
                   }
   	    if ((i & 1) == 0)
  -                Node_appendChild (pDomTree, ntypCDATA, 0, "=", 1, xOldChild, 0, 0, NULL) ;
  +                Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypCDATA, 0, "=", 1, 0, 0, NULL) ;
   	    else if (i < f)
  -                Node_appendChild (pDomTree, ntypCDATA, 0, "&amp;", 5, xOldChild, 0, 0, NULL) ;
  +                Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypCDATA, 0, "&amp;", 5, 0, 0, NULL) ;
   	    }
       
   	}
  @@ -391,34 +395,34 @@
           int         i = 0 ;
   	I32	    l32 ;
   
  -        xOldChild = Node_replaceChildWithCDATA (DomTree_self(xDomTree), -1, xOldChild, "", 0, 4, nflgModified | nflgReturn) ;
  +        xOldChild = Node_replaceChildWithCDATA (DomTree_self(xDomTree), xOldChild, nRepeatLevel, "", 0, 4, nflgModified | nflgReturn) ;
   
   	hv_iterinit (pHV) ;
   	while (pEntry = hv_iternext (pHV))
   	    {
               if (i++ > 0)
  -                Node_appendChild (pDomTree, ntypCDATA, 0, "&amp;", 5, xOldChild, 0, 0, NULL) ;
  +                Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypCDATA, 0, "&amp;", 5, 0, 0, NULL) ;
   	    pKey     = hv_iterkey (pEntry, &l32) ;
  -            xNode = Node_appendChild (pDomTree, ntypText, 0, pKey, l32, xOldChild, 0, 0, NULL) ;
  +            xNode = Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypText, 0, pKey, l32, 0, 0, NULL) ;
   	    if (pCurrReq -> nCurrEscMode & 2) 
                   Node_self (pDomTree, xNode) -> bFlags |= nflgEscUrl ;
   
  -            Node_appendChild (pDomTree, ntypCDATA, 0, "=", 1, xOldChild, 0, 0, NULL) ;
  +            Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypCDATA, 0, "=", 1, 0, 0, NULL) ;
   
   	    pSVValue = hv_iterval (pHV , pEntry) ;
   	    if (pSVValue)
   		{
   		s = SV2String (pSVValue, l) ;
  -                xNode = Node_appendChild (pDomTree, ntypText, 0, s, l, xOldChild, 0, 0, NULL) ;
  +                xNode = Node_appendChild (pDomTree, xOldChild, nRepeatLevel, ntypText, 0, s, l, 0, 0, NULL) ;
   		if (pCurrReq -> nCurrEscMode & 2) 
  -                    Node_self (pDomTree, xNode) -> bFlags |= nflgEscUrl ;
  +                    Node_selfLevel (pDomTree, xNode, nRepeatLevel) -> bFlags |= nflgEscUrl ;
                   }
               }
           }
       else
           {
           char * s = SV2String (sText, l) ;
  -        Node_replaceChildWithCDATA (DomTree_self(xDomTree), -1, xOldChild, s, l, (pCurrReq -> nCurrEscMode & 3) == 3?2 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
  +        Node_replaceChildWithCDATA (DomTree_self(xDomTree), xOldChild, nRepeatLevel, s, l, (pCurrReq -> nCurrEscMode & 3) == 3?2 + (pCurrReq -> nCurrEscMode & 4):pCurrReq -> nCurrEscMode, nflgModified | nflgReturn) ;
           }
   
       pCurrReq -> nCurrEscMode = pCurrReq -> nEscMode ;
  
  
  
  1.4.2.60  +18 -18    embperl/Attic/epcomp.c
  
  Index: epcomp.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epcomp.c,v
  retrieving revision 1.4.2.59
  retrieving revision 1.4.2.60
  diff -u -r1.4.2.59 -r1.4.2.60
  --- epcomp.c	2001/09/17 08:49:49	1.4.2.59
  +++ epcomp.c	2001/10/22 06:25:01	1.4.2.60
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epcomp.c,v 1.4.2.59 2001/09/17 08:49:49 richter Exp $
  +#   $Id: epcomp.c,v 1.4.2.60 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -551,7 +551,7 @@
       {
       const char * eq = strchr (p, ':') ;
       int nChildNo = atoi (p) ;
  -    struct tNodeData * pChildNode = Node_selfNthChild (pDomTree, pNode, nChildNo) ;
  +    struct tNodeData * pChildNode = Node_selfNthChild (pDomTree, pNode, 0, nChildNo) ;
       const char * sText = NULL ;
       
       if (pChildNode)
  @@ -590,17 +590,17 @@
       else if (nChildNo > 0)
   	{
   	nChildNo-- ;
  -	pChildNode = Node_selfNextSibling (pDomTree, pNode) ;
  +	pChildNode = Node_selfNextSibling (pDomTree, pNode, 0) ;
   	while (pChildNode && nChildNo-- > 0)
  -	    pChildNode = Node_selfNextSibling (pDomTree, pChildNode) ;
  +	    pChildNode = Node_selfNextSibling (pDomTree, pChildNode, 0) ;
   	    
   	}
       else
   	{
   	nChildNo++ ;
  -	pChildNode = Node_selfPreviousSibling (pDomTree, pNode) ;
  +	pChildNode = Node_selfPreviousSibling (pDomTree, pNode, 0) ;
   	while (pChildNode && nChildNo++ < 0)
  -	    pChildNode = Node_selfPreviousSibling (pDomTree, pChildNode) ;
  +	    pChildNode = Node_selfPreviousSibling (pDomTree, pChildNode, 0) ;
   	    
   	}
       
  @@ -835,9 +835,9 @@
       {
       if ((pCmd -> bRemoveNode & 6) && (r -> bOptions & optKeepSpaces) == 0)
   	{
  -	tNodeData *  pNextNode   = Node_selfFirstChild (pDomTree, pNode) ;
  +	tNodeData *  pNextNode   = Node_selfFirstChild (pDomTree, pNode, 0) ;
   	if ((pCmd -> bRemoveNode & 1) || !pCmd -> bCompileChilds || pNextNode == NULL || (pNextNode -> nType != ntypText && pNextNode -> nType != ntypCDATA))
  -	    pNextNode    = Node_selfNextSibling (pDomTree, pNode) ;
  +	    pNextNode    = Node_selfNextSibling (pDomTree, pNode, 0) ;
   	if (pNextNode)
   	    {
   	    const char * sText        = Node_selfNodeName (pNextNode) ;
  @@ -851,7 +851,7 @@
   	    if (p > sText)
   		{ /* remove spaces */
   		if (*p)
  -		    Node_replaceChildWithCDATA(pDomTree, -1, pNextNode -> xNdx, p, strlen (p), -1, 0) ;
  +		    Node_replaceChildWithCDATA(pDomTree, pNextNode -> xNdx, 0, p, strlen (p), -1, 0) ;
   		else
   		    Node_selfRemoveChild(pDomTree, -1, pNextNode) ;
   		}
  @@ -1051,18 +1051,18 @@
       if (pCmd -> bRemoveNode & 16)
   	{
   	tNodeData * pChild ;
  -	while (pChild = Node_selfFirstChild (pDomTree, pNode))
  +	while (pChild = Node_selfFirstChild (pDomTree, pNode, 0))
   	    {
   	    Node_selfRemoveChild (pDomTree, pNode -> xNdx, pChild) ;
   	    }
   	}
       else if (pCmd -> bRemoveNode & 32)
   	{
  -	tNodeData * pChild = Node_selfFirstChild (pDomTree, pNode) ;
  +	tNodeData * pChild = Node_selfFirstChild (pDomTree, pNode, 0) ;
   	while (pChild)
   	    {
   	    pChild -> bFlags |= nflgIgnore ;
  -            pChild = Node_selfNextSibling (pDomTree, pChild) ;
  +            pChild = Node_selfNextSibling (pDomTree, pChild, 0) ;
   
   	    }
   	}
  @@ -1334,7 +1334,7 @@
       if (pCurrReq -> bDebug & dbgParse)
   	lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d -------> parent=%d node=%d type=%d text=%s (#%d,%s)\n", 
   		     pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, 
  -		     Node_parentNode (pDomTree, pNode -> xNdx), pNode -> xNdx,
  +		     Node_parentNode (pDomTree, pNode -> xNdx, 0), pNode -> xNdx,
   		     pNode -> nType, Node_selfNodeName(pNode), nNdx, pCmd?"compile":"-") ;
       
   
  @@ -1373,13 +1373,13 @@
   	    {
               if (pAttr -> bFlags & aflgAttrChilds)
                   {
  -                tNodeData * pChild = Node_selfFirstChild (pDomTree, (tNodeData *)pAttr) ;
  +                tNodeData * pChild = Node_selfFirstChild (pDomTree, (tNodeData *)pAttr, 0) ;
                   tNodeData * pNext ;
   
                   while (pChild)
                       {
                       embperl_CompileNode (r, pDomTree, pChild -> xNdx, bCheckpointPending) ;
  -                    pNext = Node_selfNextSibling (pDomTree, pChild) ;
  +                    pNext = Node_selfNextSibling (pDomTree, pChild, 0) ;
                       if (pChild -> bFlags == 0)
                           Node_selfRemoveChild(pDomTree, -1, pChild) ;
                       pChild = pNext ;
  @@ -1407,7 +1407,7 @@
   	{
   	tNodeData * pChildNode ;
   
  -	xChildNode = pNode -> bFlags?Node_firstChild (pDomTree, xNode):0 ;
  +	xChildNode = pNode -> bFlags?Node_firstChild (pDomTree, xNode, 0):0 ;
   
   	while (xChildNode)
   	    {
  @@ -1415,7 +1415,7 @@
   		return rc ;
   
   	    pChildNode = Node_self (pDomTree, xChildNode) ;
  -            xChildNode  = Node_nextSibling (pDomTree, xChildNode) ;
  +            xChildNode  = Node_nextSibling (pDomTree, xChildNode, 0) ;
               if (pChildNode -> bFlags == 0)
                   Node_selfRemoveChild(pDomTree, -1, pChildNode) ;
               }
  @@ -1869,7 +1869,7 @@
   
       pCallerDomTree = DomTree_self (r -> xCurrDomTree) ;
       /* xDocFraq = Node_replaceChildWithNode (pSubDomTree, pSubDomTree -> xDocument, pCallerDomTree, r -> xCurrNode) ; */
  -    r -> xCurrNode = xDocFraq = Node_insertAfter (pSubDomTree, pSubDomTree -> xDocument, pCallerDomTree, r -> xCurrNode) ;
  +    r -> xCurrNode = xDocFraq = Node_insertAfter (pSubDomTree, pSubDomTree -> xDocument, 0, pCallerDomTree, r -> xCurrNode, 0) ;
   
       /* Element_selfSetAttribut (pCallerDomTree, Node_self (pCallerDomTree, xDocFraq), NULL, xOrderIndexAttr, NULL, nOrderNdx, 0) ; */
   
  
  
  
  1.20.4.26 +2 -1      embperl/epdat.h
  
  Index: epdat.h
  ===================================================================
  RCS file: /home/cvs/embperl/epdat.h,v
  retrieving revision 1.20.4.25
  retrieving revision 1.20.4.26
  diff -u -r1.20.4.25 -r1.20.4.26
  --- epdat.h	2001/10/16 11:51:23	1.20.4.25
  +++ epdat.h	2001/10/22 06:25:01	1.20.4.26
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdat.h,v 1.20.4.25 2001/10/16 11:51:23 richter Exp $
  +#   $Id: epdat.h,v 1.20.4.26 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -418,6 +418,7 @@
   
       tNode	xDocument ;	/* Document node */
       tNode	xCurrNode ;	/* node that was last executed */
  +    tRepeatLevel nCurrRepeatLevel ; /* repeat level for node that was last executed */
       tIndex	xCurrDomTree ;	/* DomTree we are currently working on */
       tIndex	xSourceDomTree ;/* DomTree which contains the source */
   #endif
  
  
  
  1.4.2.50  +117 -111  embperl/Attic/epdom.c
  
  Index: epdom.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.c,v
  retrieving revision 1.4.2.49
  retrieving revision 1.4.2.50
  diff -u -r1.4.2.49 -r1.4.2.50
  --- epdom.c	2001/10/19 13:54:07	1.4.2.49
  +++ epdom.c	2001/10/22 06:25:01	1.4.2.50
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdom.c,v 1.4.2.49 2001/10/19 13:54:07 richter Exp $
  +#   $Id: epdom.c,v 1.4.2.50 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -43,7 +43,7 @@
   tIndex xCheckpointCache[512] ;
   
   
  -static tUInt8 * MemFree[256] ;
  +static tUInt8 * MemFree[512] ;
   static tUInt8 * pMemLast = NULL ;
   static tUInt8 * pMemEnd = NULL ;
   
  @@ -80,7 +80,7 @@
   
   tNodeData * dom_malloc (size_t  nSize)
       {
  -    int	    nFree = (nSize+15)>>4 ;
  +    int	    nFree = (nSize+7)>>3 ;
       void *  pNew ;
       
       if (nFree > sizeof (MemFree) / sizeof (void *))
  @@ -92,7 +92,7 @@
   	return pNew ;
   	}
       
  -    nSize = nFree * 16 ; /* --- make dividable by 16 --- */
  +    nSize = nFree * 8 ; /* --- make dividable by 8 --- */
       if (pMemLast + nSize < pMemEnd)
   	{ /* --- take space at the end of the pad --- */
   	pNew = pMemLast ;
  @@ -116,7 +116,7 @@
   void dom_free (tNodeData * pNode)
       {
       int	    nSize = sizeof (tNodeData) + pNode -> numAttr * sizeof (tAttrData) ;
  -    int	    nFree = (nSize+15)>>4 ;
  +    int	    nFree = (nSize+15)>>3 ;
       void *  pFree ;
       
       if (nFree > sizeof (MemFree) / sizeof (void *))
  @@ -677,16 +677,16 @@
       tRepeatLevelLookup * pLookupLevelNode = pDomTree -> pLookupLevel[xNode] ;
       if (pLookupLevelNode)
   	{
  -	register tRepeatLevelLookupItem * pLookupLevelNodeLevel	= pLookupNodeLevel -> items[nLevel & pLookupNodeLevel -> nMask] ;
  +	register tRepeatLevelLookupItem * pLookupLevelNodeLevel	= &pLookupLevelNode -> items[nLevel & pLookupLevelNode -> nMask] ;
   	register tNodeData *              pLnNode		= pLookupLevelNodeLevel -> pNode ;
   	if (!pLnNode)
   	    return ((struct tNodeData *)(pDomTree -> pLookup[xNode])) ;
  -	if (pLnNode -> nLevel == nLevel)
  +	if (pLnNode -> nRepeatLevel == nLevel)
   	    return pLnNode ;
   	while (pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext)
   	    {
   	    pLnNode = pLookupLevelNodeLevel -> pNode ;
  -	    if (pLnNode -> nLevel == nLevel)
  +	    if (pLnNode -> nRepeatLevel == nLevel)
   		return pLnNode ;
   	    }
   	}
  @@ -694,7 +694,6 @@
       }
   
   
  -#define Node_selfLevel(pDomTree,xNode,nLevel)  (((struct tNodeData *)(pDomTree -> pLookup[xNode])) -> nRepeatLevel == nLevel || !pDomTree -> pLookupLevel[xNode])?Node_selfLevelItem(pDomTree,xNode,nLevel):((struct tNodeData *)(pDomTree -> pLookup[xNode])))
   
   
   
  @@ -986,8 +985,8 @@
       if (bForceDocFraq || pDocument -> nType == ntypDocumentFraq)
   	{
   	tAttrData * pAttr; 
  -	pDocument = Node_selfCloneNode (pDomTree, pDocument, 1) ;
  -	pAttr = Element_selfSetAttribut (pDomTree, pDocument, NULL, xDomTreeAttr, NULL, pDomTree -> xNdx, 0) ;
  +	pDocument = Node_selfCloneNode (pDomTree, pDocument, 0, 1) ;
  +	pAttr = Element_selfSetAttribut (pDomTree, pDocument, 0, NULL, xDomTreeAttr, NULL, pDomTree -> xNdx, 0) ;
   	pAttr -> bFlags = aflgOK ; /* reset string value flag */
   	pDomTree -> xDocument = pDocument -> xNdx ;
   	pDocument -> nType = ntypDocumentFraq ;
  @@ -1062,8 +1061,9 @@
   /* ------------------------------------------------------------------------ */
   
   int DomTree_selfDiscardAfterCheckpoint (/*in*/ tDomTree *	    pDomTree, 
  -				         /*in*/ tNodeData *     pNode,
  -				         /*in*/ tNodeData *     pArgNode)
  +				         /*in*/ tNodeData *	    pNode,
  +				         /*in*/ tNodeData *	    pArgNode,
  +	                                 /*in*/ tRepeatLevel	    nRepeatLevel)
   
   
       {
  @@ -1077,19 +1077,19 @@
       if (!pArgNode)
   	{
       	pArgNode = pNode ;
  -	pNode = Node_selfFirstChild (pDomTree, pNode) ;
  +	pNode = Node_selfFirstChild (pDomTree, pNode, nRepeatLevel) ;
   	if (!pNode)
  -	    pNode = Node_selfNextSibling (pDomTree, pArgNode) ;
  +	    pNode = Node_selfNextSibling (pDomTree, pArgNode, nRepeatLevel) ;
   	}
       
       while (pNode && (pNode -> bFlags & nflgCheckpoint) == 0) 
   	{
  -	pChild = Node_selfFirstChild (pDomTree, pNode) ;
  +	pChild = Node_selfFirstChild (pDomTree, pNode, nRepeatLevel) ;
   	if (pChild)
  -	    if (DomTree_selfDiscardAfterCheckpoint (pDomTree, pChild, pArgNode))
  +	    if (DomTree_selfDiscardAfterCheckpoint (pDomTree, pChild, pArgNode, nRepeatLevel))
   		return 1 ;
   				    
  -	pNode = Node_selfNextSibling (pDomTree, pNode) ;
  +	pNode = Node_selfNextSibling (pDomTree, pNode, nRepeatLevel) ;
   	}
   
       if (pNode == NULL)
  @@ -1114,15 +1114,16 @@
   
   
   
  -int DomTree_discardAfterCheckpoint (/*in*/ tIndex  xDomTree, 
  -				     /*in*/ tNode   xNode)
  +int DomTree_discardAfterCheckpoint (/*in*/ tIndex	    xDomTree, 
  +				    /*in*/ tNode	    xNode,
  +				    /*in*/ tRepeatLevel	    nRepeatLevel)
   
   
       {
       tDomTree * pDomTree = DomTree_self (xDomTree) ;
  -    tNodeData * pNode   = Node_self (pDomTree, xNode) ;
  +    tNodeData * pNode   = Node_selfLevel (pDomTree, xNode, nRepeatLevel) ;
       
  -    return DomTree_selfDiscardAfterCheckpoint (pDomTree, pNode, NULL) ;
  +    return DomTree_selfDiscardAfterCheckpoint (pDomTree, pNode, NULL, nRepeatLevel) ;
       }
   
   /* ------------------------------------------------------------------------ 
  @@ -1334,22 +1335,23 @@
           return pNew ;
           }
   
  -    if (!(pNew = Node_selfCloneNode (pDomTree, pNode, nRepeatLevel, 1)) 
  +    if (!(pNew = Node_selfCloneNode (pDomTree, pNode, nRepeatLevel, 1))) 
           return NULL ;
   
       pLookupLevelNode = pDomTree -> pLookupLevel[pNode -> xNdx] ;
       if (!pLookupLevelNode)
           {
  -        if ((pLookupLevelNode = pDomTree -> pLookupLevel[pNode -> xNdx] = dom_malloc (sizeof (tRepeatLevelLookup) + sizeof (tRepeatLevelLookupItem * 7))) == NULL)
  +        if ((pLookupLevelNode = pDomTree -> pLookupLevel[pNode -> xNdx] = 
  +		  (tRepeatLevelLookup *)dom_malloc (sizeof (tRepeatLevelLookup) + sizeof (tRepeatLevelLookupItem) * 7)) == NULL)
   	    return NULL ;
           pLookupLevelNode -> nMask = 7 ;
           pLookupLevelNode -> numItems = 8 ;
  -        memset (pLookupLevelNode -> items, 0, sizeof (pLookupLevelNodeItem) * 8) ;
  +        memset (pLookupLevelNode -> items, 0, sizeof (*pLookupLevelNodeLevel) * 8) ;
           }
  -    pLookupLevelNodeLevel= pLookupNodeLevel -> items[nLevel & pLookupNodeLevel -> nMask] ;
  +    pLookupLevelNodeLevel= &pLookupLevelNode -> items[nRepeatLevel & pLookupLevelNode -> nMask] ;
       if (pLookupLevelNodeLevel -> pNode)
           {
  -        tRepeatLevelLookupItem * pNewItem = dom_malloc (sizeof (tRepeatLevelLookupItem)) ;
  +        tRepeatLevelLookupItem * pNewItem = (tRepeatLevelLookupItem *)dom_malloc (sizeof (tRepeatLevelLookupItem)) ;
           if (!pNewItem)
   	    return NULL ;
   
  @@ -1382,8 +1384,8 @@
   
   tNodeData * Node_newAndAppend (/*in*/  tDomTree *	 pDomTree,
                                  /*in*/  tIndex            xParent,
  -                               /*in*/  tIndex *          pxChilds,
                                  /*in*/  tRepeatLevel      nRepeatLevel,
  +                               /*in*/  tIndex *          pxChilds,
                                  /*in*/  tSInt32           nLinenumber,
                                  /*in*/  tSInt32           nSize) 
   
  @@ -1491,12 +1493,12 @@
   
   
   tNode Node_appendChild (/*in*/  tDomTree *	 pDomTree,
  +			/*in*/	tNode 		 xParent,
  +                        /*in*/  tRepeatLevel     nRepeatLevel,
   			/*in*/	tNodeType	 nType,
   			/*in*/	int              bForceAttrValue,
   			/*in*/	const char *	 sText,
   			/*in*/	int		 nTextLen,
  -			/*in*/	tNode 		 xParent,
  -                        /*in*/  tRepeatLevel     nRepeatLevel,
   			/*in*/	int		 nLevel,
   			/*in*/	int		 nLinenumber,
   			/*in*/	const char *	 sLogMsg)
  @@ -1585,7 +1587,7 @@
   	    pNew = ((tAttrData *)(pParent + 1)) + pParent -> numAttr - 1 ; /* get last attribute of node */
   	    if (pParent -> numAttr == 0 || pNew -> xName != xNoName || bForceAttrValue > 1)
   		{ /* --- add dummy attribute --- */
  -		if (!(xParent = Node_appendChild (pDomTree, ntypAttr, 0, NULL, xNoName, xParent, nLevel, nLinenumber, "<noname>")))
  +		if (!(xParent = Node_appendChild (pDomTree, xParent, nRepeatLevel, ntypAttr, 0, NULL, xNoName, nLevel, nLinenumber, "<noname>")))
   		    return 0 ;
   		nLevel++ ;
   		pNew = (struct tAttrData * )pDomTree -> pLookup[xParent] ;  
  @@ -1631,19 +1633,19 @@
                   xOldValue = ((tAttrData *)pParent) -> xValue ;
                   ((tAttrData *)pParent) -> xValue = 0 ;
                   
  -                pNew = Node_newAndAppend (pDomTree, xParent, &(((tAttrData *)pParent) -> xValue),  nRepeatLevel, nLinenumber, 0) ;
  +                pNew = Node_newAndAppend (pDomTree, xParent, nRepeatLevel, &(((tAttrData *)pParent) -> xValue), nLinenumber, 0) ;
                   pNew -> nType = ntypAttrValue ;
                   pNew -> nText = xOldValue ;
                   }
   
               ((tAttrData *)pParent) -> bFlags &= ~aflgAttrValue ;
               ((tAttrData *)pParent) -> bFlags |= aflgAttrChilds ;
  -            pNew = Node_newAndAppend (pDomTree, xParent, &(((tAttrData *)pParent) -> xValue), nRepeatLevel, nLinenumber, 0) ;
  +            pNew = Node_newAndAppend (pDomTree, xParent, nRepeatLevel, &(((tAttrData *)pParent) -> xValue), nLinenumber, 0) ;
               
               }
           else
               {
  -            pNew = Node_newAndAppend (pDomTree, xParent, pParent?&(pParent -> xChilds):NULL, nRepeatLevel, nLinenumber, 0) ;
  +            pNew = Node_newAndAppend (pDomTree, xParent, nRepeatLevel, pParent?&(pParent -> xChilds):NULL, nLinenumber, 0) ;
               }
           
          
  @@ -1705,39 +1707,40 @@
       pDomTree -> pLookup[pChild -> xNdx] = NULL ;
   
       
  -    {
  -    tRepeatLevelLookup * pLookupLevelNode = pDomTree -> pLookupLevel[xNode] ;
  -    if (pLookupLevelNode)
   	{
  -	register tRepeatLevelLookupItem * pLookupLevelNodeLevel	= pLookupNodeLevel -> items[nLevel & pLookupNodeLevel -> nMask] ;
  -        tRepeatLevelLookupItem * pLast ;
  -        while (pLookupLevelNodeLevel && pLookupLevelNodeLevel -> pNode != pChild) 
  -            {
  -            pLast = pLookupLevelNodeLevel ;
  -            pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext ;
  -            }
  +	tRepeatLevelLookup * pLookupLevelNode = pDomTree -> pLookupLevel[pChild -> xNdx] ;
  +	if (pLookupLevelNode)
  +	    {
  +	    register tRepeatLevelLookupItem * pLookupLevelNodeLevel	= &pLookupLevelNode -> items[pChild -> nRepeatLevel & pLookupLevelNode -> nMask] ;
  +	    tRepeatLevelLookupItem * pLast ;
  +	    while (pLookupLevelNodeLevel && pLookupLevelNodeLevel -> pNode != pChild) 
  +		{
  +		pLast = pLookupLevelNodeLevel ;
  +		pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext ;
  +		}
   
  -        if (pLookupLevelNodeLevel)
  -            {
  -            if (pLast)
  -                {
  -                pLast -> pNext = pLookupLevelNodeLevel -> pNext ;
  -                dom_free (pLookupLevelNodeLevel) ;
  -                }
  -            else if (pLookupLevelNodeLevel -> pNext)
  -                {
  -                pLast = pLookupLevelNodeLevel -> pNext ;
  -                pLookupLevelNodeLevel -> pNode = pLast -> pNode ;
  -                pLookupLevelNodeLevel -> pNext = pLast -> pNext ;
  -                dom_free (pLast) ;
  -                }
  -            else
  -                {
  -                pLookupLevelNodeLevel -> pNode = NULL ;
  -                }
  -            }
  -        }    
  -    
  +	    if (pLookupLevelNodeLevel)
  +		{
  +		if (pLast)
  +		    {
  +		    pLast -> pNext = pLookupLevelNodeLevel -> pNext ;
  +		    dom_free ((tNodeData *)pLookupLevelNodeLevel) ;
  +		    }
  +		else if (pLookupLevelNodeLevel -> pNext)
  +		    {
  +		    pLast = pLookupLevelNodeLevel -> pNext ;
  +		    pLookupLevelNodeLevel -> pNode = pLast -> pNode ;
  +		    pLookupLevelNodeLevel -> pNext = pLast -> pNext ;
  +		    dom_free ((tNodeData *)pLast) ;
  +		    }
  +		else
  +		    {
  +		    pLookupLevelNodeLevel -> pNode = NULL ;
  +		    }
  +		}
  +	    }    
  +	}
  +
       dom_free (pChild) ;
       numNodes-- ;
   
  @@ -1880,7 +1883,7 @@
   
       if (pOldChild -> nType == ntypDocumentFraq)
   	{
  -	tAttrData * pAttr = Element_selfSetAttribut (pOldChildDomTree, pOldChild, NULL, xDomTreeAttr, NULL, pDomTree -> xNdx, 0) ;
  +	tAttrData * pAttr = Element_selfSetAttribut (pOldChildDomTree, pOldChild, nOldRepeatLevel, NULL, xDomTreeAttr, NULL, pDomTree -> xNdx, 0) ;
   	pAttr -> bFlags = aflgOK ; /* reset string value flag */
   	}
   	
  @@ -1966,7 +1969,7 @@
   
       if (pNewNode -> nType == ntypDocumentFraq)
   	{
  -	tAttrData * pAttr = Element_selfSetAttribut (pRefNodeDomTree, pNewNode, NULL, xDomTreeAttr, NULL, pNewNodeDomTree -> xNdx, 0) ;
  +	tAttrData * pAttr = Element_selfSetAttribut (pRefNodeDomTree, pNewNode, nRefRepeatLevel, NULL, xDomTreeAttr, NULL, pNewNodeDomTree -> xNdx, 0) ;
   	pAttr -> bFlags = aflgOK ; /* reset string value flag */
   	}
   
  @@ -1997,7 +2000,7 @@
       tNode	xOrgNode ;
   
   
  -    tNodeData * pNew = Node_newAndAppend (pRefNodeDomTree, pRefNode -> xParent, NULL, nRefRepeatLevel, pRefNode -> nLinenumber, sizeof (tNodeData)) ;        
  +    tNodeData * pNew = Node_newAndAppend (pRefNodeDomTree, pRefNode -> xParent, nRefRepeatLevel, NULL, pRefNode -> nLinenumber, sizeof (tNodeData)) ;        
   
       pNew -> xChilds = 0 ;
       pNew -> bFlags  = 0 ; 
  @@ -2052,7 +2055,6 @@
   /* ------------------------------------------------------------------------ */
   
   tNode Node_replaceChildWithCDATA (/*in*/ tDomTree *	 pDomTree,
  -				  /*in*/ tNode		 xNode,
   				  /*in*/ tNode		 xOldChild,
                                     /*in*/ tRepeatLevel    nRepeatLevel,
                                     /*in*/ const char *	 sText,
  @@ -2069,14 +2071,14 @@
   
       /* *** lprintf (pCurrReq, "rp1--> SVs=%d  %s  DomTree Old=%d\n", sv_count, sText?sText:"<null>", Node_selfDomTree (Node_self (pDomTree, xOldChild))) ; */
   
  -    pOldChild  = Node_selfCondCloneNode (pDomTree, Node_selfLevel (pDomTree, xOldChild, nRefRepeatLevel), nRefRepeatLevel) ; 
  +    pOldChild  = Node_selfCondCloneNode (pDomTree, Node_selfLevel (pDomTree, xOldChild, nRepeatLevel), nRepeatLevel) ; 
   
       xCheckpointCache[nCheckpointCache++] = xOldChild ;
   
       if (pOldChild -> bFlags & nflgModified) 
   	{
   	pOldChild -> bFlags |= bFlags ;
  -	pOldChild = Node_selfCloneNode (pDomTree, pOldChild, nRefRepeatLevel, 0) ;
  +	pOldChild = Node_selfCloneNode (pDomTree, pOldChild, nRepeatLevel, 0) ;
   	xOldChild = pOldChild -> xNdx ;
   	}
       /* *** lprintf (pCurrReq, "rp2--> DomTree New=%d\n", Node_selfDomTree (pOldChild)) ; */
  @@ -2350,10 +2352,12 @@
   
   
   
  -tNodeData * Node_toString2 (/*in*/  tDomTree *     pDomTree,
  -		    /*i/o*/ register req *  r,
  -		    /*in*/  tNode	    xNode,
  -                    /*in*/  int *           pOrderNdx)
  +static tNodeData * Node_toString2 (/*i/o*/ register req *   r,
  +				   /*in*/  tDomTree *	    pDomTree,
  +				   /*in*/  tNode	    xNode,
  +				   /*in*/ tRepeatLevel	    nRepeatLevel, 
  +				   /*in*/  int *	    pOrderNdx)
  +				  
   
   
       {
  @@ -2366,7 +2370,7 @@
       tNodeData * pSavedNode = NULL ;
       tNodeData * pSavedNodeFrom = NULL ;
       tNodeData * pLastStartTag = NULL ;
  -    tNodeData * pNode = Node_self (pDomTree, xNode) ;
  +    tNodeData * pNode = Node_selfLevel (pDomTree, xNode, nRepeatLevel) ;
       tNodeData * pFirstNode = pNode ;
       
       
  @@ -2384,7 +2388,7 @@
   	}
       
   
  -    pNode = Node_selfFirstChild (pDomTree, pNode) ;
  +    pNode = Node_selfFirstChild (pDomTree, pNode, nRepeatLevel) ;
   
       while (pNode)
   	{
  @@ -2406,15 +2410,16 @@
   		
   		bCheckpointFound = 1 ;
                   pSavedNode = NULL ;
  -		pNewNode      = Node_self (pDomTree, xNextNode) ;
  -		pNewParent    = Node_selfParentNode (pDomTree, pNewNode) ;
  +		pNewNode      = Node_selfLevel (pDomTree, xNextNode, nRepeatLevel) ;
  +		pNewParent    = Node_selfParentNode (pDomTree, pNewNode, nRepeatLevel) ;
   		if (pNewParent)
  -                    pNewParent2   = Node_selfParentNode (pDomTree, pNewParent) ;
  +                    pNewParent2   = Node_selfParentNode (pDomTree, pNewParent, nRepeatLevel) ;
                   
  -		if ((pNode -> bFlags & nflgSubCheckpoint) == 0 && (pNewNode -> bFlags & nflgSubCheckpoint) == 0 && (pParent       = pLastStartTag))
  +		if ((pNode -> bFlags & nflgSubCheckpoint) == 0 && (pNewNode -> bFlags & nflgSubCheckpoint) == 0 && 
  +		    (pParent       = pLastStartTag))
   		    {
   		    if (pParent)
  -			pParent2   = Node_selfParentNode (pDomTree, pParent) ;
  +			pParent2   = Node_selfParentNode (pDomTree, pParent, nRepeatLevel) ;
   		    while (pNewParent != pParent && (!pNewParent2 || !pParent2 || pNewParent2 != pParent2))
   			{
   			if (pParent)
  @@ -2442,9 +2447,9 @@
   			    lprintf (r, "[%d]WARN: unstructured jump\n", r -> nPid) ;
   			    break ;
   			    }
  -			pParent = Node_selfParentNode (pDomTree, pParent) ;
  +			pParent = Node_selfParentNode (pDomTree, pParent, nRepeatLevel) ;
   			if (pParent)
  -			    pParent2   = Node_selfParentNode (pDomTree, pParent) ;
  +			    pParent2   = Node_selfParentNode (pDomTree, pParent, nRepeatLevel) ;
   			}
   		    }
   		pLastStartTag = NULL ;
  @@ -2470,7 +2475,7 @@
   		    if (pCurrReq -> bDebug & dbgParse)
   			lprintf (r, "[%d]toString: ** Replace Node=%d with Node=%d (OrderIndex %d, initial %d)\n", r -> nPid, pNode -> xNdx, xNextNode, i, nOrderNdx) ; 
   		    pSavedNode = pNode ;    
  -    		    pNode  = Node_self (pDomTree, xNextNode) ;
  +    		    pNode  = Node_selfLevel (pDomTree, xNextNode, nRepeatLevel) ;
   		    pSavedNodeFrom = pNode ;    
   		    }
   		if (i == nOrderNdx)
  @@ -2501,7 +2506,7 @@
               ;
   	else if (pNode -> nType == ntypDocumentFraq)
   	    {
  -	    Node_toString (pDomTree, r, pNode -> xNdx) ; 
  +	    Node_toString (r, pDomTree, pNode -> xNdx, nRepeatLevel) ; 
   	    /* oputs (r, "\r\n") ;*/
   	    }
           else if (pNode -> nType == ntypTag || pNode -> nType == ntypStartTag)
  @@ -2597,7 +2602,7 @@
   
   			    if (pAttr -> bFlags & aflgAttrChilds)
   				{
  -				tAttrData * pAttrNode = (tAttrData * )Node_toString2 (pDomTree, r, pAttr -> xNdx, &nOrderNdx) ;
  +				tAttrData * pAttrNode = (tAttrData * )Node_toString2 (r, pDomTree, pAttr -> xNdx, nRepeatLevel, &nOrderNdx) ;
   				if (pAttrNode && pAttrNode != pAttr)
   				    {
   				    pAttr = pAttrNode ;
  @@ -2649,7 +2654,7 @@
   	if (pNode -> nType == ntypDocumentFraq)
   	    pNextNode = NULL ;
   	else
  -	    pNextNode = Node_selfFirstChild (pDomTree, pNode) ;
  +	    pNextNode = Node_selfFirstChild (pDomTree, pNode, nRepeatLevel) ;
   	if (pNextNode == NULL)
   	    {
   	    if (pSavedNode && pSavedNodeFrom == pNode)
  @@ -2659,10 +2664,10 @@
   		}
   
   	
  -	    pNextNode  = Node_selfNextSibling (pDomTree, pNode) ;
  +	    pNextNode  = Node_selfNextSibling (pDomTree, pNode, nRepeatLevel) ;
   	    while (pNextNode == NULL)
   		{
  -		pNextNode = Node_selfParentNode (pDomTree, pNode) ;
  +		pNextNode = Node_selfParentNode (pDomTree, pNode, nRepeatLevel) ;
   		if (pNextNode == NULL || pNextNode  == pFirstNode || pNextNode -> nType == ntypAttr)
                       {
                       *pOrderNdx = nOrderNdx ;
  @@ -2675,7 +2680,7 @@
   		    pSavedNode = NULL ;
   		    }
   		pNode = pNextNode ;
  -		pNextNode  = Node_selfNextSibling (pDomTree, pNextNode) ;
  +		pNextNode  = Node_selfNextSibling (pDomTree, pNextNode, nRepeatLevel) ;
   		if (pNode -> nType == ntypStartTag && (pNode -> bFlags & nflgIgnore) == 0 &&
   		    (pNextNode == NULL || (pNextNode -> bFlags & nflgCheckpoint) == 0 || pDomTree -> pOrder[nOrderNdx].xFromNode == pNextNode -> xNdx))
   		    {
  @@ -2696,7 +2701,7 @@
   			oputs (r, Node_selfNodeName (pNode)) ;
   			oputc (r, '>') ;
   			}
  -		    pLastStartTag = Node_selfParentNode (pDomTree, pNextNode?pNextNode:pNode) ;
  +		    pLastStartTag = Node_selfParentNode (pDomTree, pNextNode?pNextNode:pNode, nRepeatLevel) ;
   		    }
   		}
   	    }
  @@ -2708,15 +2713,16 @@
       return NULL ;    
       }
   
  -void Node_toString (/*in*/  tDomTree *   pDomTree,
  -		    /*i/o*/ register req * r,
  -		    /*in*/  tNode	    xNode)
  +void Node_toString (/*i/o*/ register req *  r,
  +		    /*in*/ tDomTree *	    pDomTree,
  +		    /*in*/ tNode	    xNode,
  +                    /*in*/ tRepeatLevel     nRepeatLevel)
   
   
       {
       int   nOrderNdx = 0 ;
   
  -    Node_toString2 (pDomTree, r, xNode, &nOrderNdx) ;
  +    Node_toString2 (r, pDomTree, xNode, nRepeatLevel, &nOrderNdx) ;
       }
   
   
  @@ -2734,8 +2740,6 @@
   
   
       {
  -    xNode = Node_firstChild (pDomTree, xNode) ;
  -
       
   
       }
  @@ -2861,6 +2865,7 @@
   
   tAttrData *  Element_selfSetAttribut (/*in*/ tDomTree *	        pDomTree,
   				      /*in*/ struct tNodeData * pNode,
  +				      /*in*/ tRepeatLevel       nRepeatLevel,
   				      /*in*/ const char *	sAttrName,
   				      /*in*/ int		nAttrNameLen,
   				      /*in*/ const char *       sNewValue, 
  @@ -2872,7 +2877,7 @@
       tNode xAttr ;
       tNodeData * pNewNode ;
   
  -    pNode = Node_selfCondCloneNode (pDomTree, pNode) ;
  +    pNode = Node_selfCondCloneNode (pDomTree, pNode, nRepeatLevel) ;
       pAttr = Element_selfGetAttribut (pDomTree, pNode, sAttrName, nAttrNameLen) ;
   
       if (pAttr)
  @@ -2884,7 +2889,7 @@
   	    {
   	    if (pAttr -> xValue != xValue && (pNode -> bFlags & nflgModified))
   		{
  -		pNewNode = Node_selfCloneNode (pDomTree, pNode, 1) ;
  +		pNewNode = Node_selfCloneNode (pDomTree, pNode, nRepeatLevel, 1) ;
   		pAttr = Element_selfGetAttribut (pDomTree, pNewNode, sAttrName, nAttrNameLen) ;
   		
   		DomTree_selfCheckpoint (pDomTree, pNode -> xNdx, pNewNode -> xNdx) ;
  @@ -2903,7 +2908,7 @@
   	}
   
       if ((pNode -> bFlags & nflgModified) && bClone)
  -	pNewNode = Node_selfCloneNode (pDomTree, pNode, 1) ;
  +	pNewNode = Node_selfCloneNode (pDomTree, pNode, nRepeatLevel, 1) ;
       else
   	pNewNode = pNode ;
   
  @@ -2913,8 +2918,8 @@
   	DomTree_selfCheckpoint (pDomTree, pNode -> xNdx, pNewNode -> xNdx) ;
   	}
       
  -    xAttr = Node_appendChild (pDomTree, ntypAttr, 0, sAttrName, nAttrNameLen, pNewNode -> xNdx, 0, pNewNode -> nLinenumber, NULL) ;
  -    Node_appendChild (pDomTree, ntypAttrValue, 0, sNewValue, nNewValueLen, xAttr, 0, pNewNode -> nLinenumber, NULL) ;
  +    xAttr = Node_appendChild (pDomTree, pNewNode -> xNdx, nRepeatLevel, ntypAttr, 0, sAttrName, nAttrNameLen, 0, pNewNode -> nLinenumber, NULL) ;
  +    Node_appendChild (pDomTree, xAttr, nRepeatLevel,  ntypAttrValue, 0, sNewValue, nNewValueLen, 0, pNewNode -> nLinenumber, NULL) ;
       return (tAttrData *)Node_self(pDomTree, xAttr) ;
       }
   
  @@ -2931,6 +2936,7 @@
   
   tAttrData *  Element_selfRemoveAttribut (/*in*/ tDomTree *	        pDomTree,
   				      /*in*/ struct tNodeData * pNode,
  +				      /*in*/ tRepeatLevel       nRepeatLevel,
   				      /*in*/ const char *	sAttrName,
   				      /*in*/ int		nAttrNameLen,
   				      /*in*/ int		bClone)
  @@ -2939,8 +2945,7 @@
       tAttrData * pAttr ;
       tNodeData * pNewNode ;
       
  -    Node_selfCondCloneNode (pDomTree, pNode) ;
  -    pNode = Node_self (pDomTree, pNode -> xNdx) ;
  +    pNode = Node_selfCondCloneNode (pDomTree, pNode, nRepeatLevel) ;
   
       pAttr = Element_selfGetAttribut (pDomTree, pNode, sAttrName, nAttrNameLen) ;
       if (bClone)
  @@ -2949,7 +2954,7 @@
   	    {
   	    pNode -> bFlags |= nflgReturn | nflgModified ;
   
  -	    pNewNode = Node_selfCloneNode (pDomTree, pNode, 1) ;
  +	    pNewNode = Node_selfCloneNode (pDomTree, pNode, nRepeatLevel, 1) ;
   	    pAttr = Element_selfGetAttribut (pDomTree, pNewNode, sAttrName, nAttrNameLen) ;
       
   	    DomTree_selfCheckpoint (pDomTree, pNode -> xNdx, pNewNode -> xNdx) ;
  @@ -3022,9 +3027,10 @@
   
   
   
  -char *       Attr_selfValue (/*in*/ tDomTree *	        pDomTree,
  -			     /*in*/ struct tAttrData * pAttr,
  -			    /*out*/ char * *    ppAttr) 
  +char *       Attr_selfValue (/*in*/  tDomTree *	        pDomTree,
  +			     /*in*/  struct tAttrData * pAttr,
  +			     /*in*/  tRepeatLevel       nRepeatLevel,
  +			     /*out*/ char * *		ppAttr) 
   
       {
       struct tNodeData * pNode ;
  @@ -3035,7 +3041,7 @@
       if (!(pAttr -> bFlags & aflgAttrChilds))
   	return Ndx2String (pAttr -> xValue) ;
   
  -    pNode = Node_self (pDomTree, pAttr -> xValue) ;
  +    pNode = Node_selfLevel (pDomTree, pAttr -> xValue, nRepeatLevel) ;
       
       StringNew (ppAttr, 512) ;
   
  @@ -3067,7 +3073,7 @@
   	else	
   	    Ndx2StringLen (pNode -> nText,s,l) ;
   	StringAdd (ppAttr, s, l) ;
  -	pNode = Node_selfNextSibling (pDomTree, pNode) ;
  +	pNode = Node_selfNextSibling (pDomTree, pNode, nRepeatLevel) ;
   	}
   
       return *ppAttr ;
  
  
  
  1.4.2.28  +75 -45    embperl/Attic/epdom.h
  
  Index: epdom.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.h,v
  retrieving revision 1.4.2.27
  retrieving revision 1.4.2.28
  diff -u -r1.4.2.27 -r1.4.2.28
  --- epdom.h	2001/10/19 13:54:07	1.4.2.27
  +++ epdom.h	2001/10/22 06:25:01	1.4.2.28
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdom.h,v 1.4.2.27 2001/10/19 13:54:07 richter Exp $
  +#   $Id: epdom.h,v 1.4.2.28 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -163,7 +163,7 @@
   struct tRepeatLevelLookupItem
       {
       tNodeData	*	    pNode ;	/* pointer to actual node data */
  -    tRepeatLevelLookup	*   pNode ;	/* next node with same node index but different nRepeatLevel */
  +    struct tRepeatLevelLookupItem *  pNext ;	/* next node with same node index but different nRepeatLevel */
       } ;
   
   typedef struct tRepeatLevelLookupItem tRepeatLevelLookupItem ;
  @@ -270,120 +270,147 @@
   void DomTree_selfCheckpoint (tDomTree * pDomTree, tNode xFromNode, tNode xToNode) ;
   
   int DomTree_selfDiscardAfterCheckpoint (/*in*/ tDomTree *	    pDomTree, 
  -				         /*in*/ tNodeData *     pNode,
  -				         /*in*/ tNodeData *     pArgNode) ;
  +				         /*in*/ tNodeData *	    pNode,
  +				         /*in*/ tNodeData *	    pArgNode,
  +	                                 /*in*/ tRepeatLevel	    nRepeatLevel) ;
  +
  +int DomTree_discardAfterCheckpoint (/*in*/ tIndex	    xDomTree, 
  +				    /*in*/ tNode	    xNode,
  +				    /*in*/ tRepeatLevel	    nRepeatLevel) ;
   
  -int DomTree_discardAfterCheckpoint (/*in*/ tIndex  xDomTree, 
  -				     /*in*/ tNode   xNode) ;
  -
   #define DomTree_SV(pSV) SvIVX(pSV)
   #define DomTree_selfSV(pSV) (DomTree_self(SvIVX(pSV)))
   #define SV_DomTree(xDomTree) (DomTree_self (xDomTree) -> pDomTreeSV)
   #define SV_DomTree_self(pDomTree) (pDomTree -> pDomTreeSV)
  +
  +tNodeData * Node_selfLevelItem (/*in*/ tDomTree *    pDomTree,
  +				/*in*/ tNode	 xNode,
  +				/*in*/ tRepeatLevel  nLevel) ;
   
  -tNode Node_appendChild (/*in*/ tDomTree *  pDomTree,
  +tNode Node_appendChild (/*in*/  tDomTree *	 pDomTree,
  +			/*in*/	tNode 		 xParent,
  +                        /*in*/  tRepeatLevel     nRepeatLevel,
   			/*in*/	tNodeType	 nType,
   			/*in*/	int              bForceAttrValue,
   			/*in*/	const char *	 sText,
   			/*in*/	int		 nTextLen,
  -			/*in*/	tNode 		 xParent,
   			/*in*/	int		 nLevel,
   			/*in*/	int		 nLinenumber,
   			/*in*/	const char *	 sLogMsg) ;
   
   
   
  -tNodeData * Node_selfNthChild (/*in*/ tDomTree *  pDomTree,
  +struct tNodeData * Node_selfNthChild (/*in*/  tDomTree *        pDomTree,
   				      /*in*/ struct tNodeData * pNode,
  -				      /*in*/ int         nChildNo) ;
  +                                      /*in*/  tRepeatLevel      nRepeatLevel,
  +				      /*in*/ int		nChildNo) ;
  +
   
   tNodeData * Node_selfLastChild   (/*in*/  tDomTree *   pDomTree,
  -				  /*in*/  tNodeData *  pNode) ;
  +				  /*in*/  tNodeData *  pNode,
  +                                  /*in*/  tRepeatLevel nRepeatLevel) ;
   
   tNodeData * Node_selfNextSibling (/*in*/ tDomTree *  pDomTree,
  -			          /*in*/ tNodeData * pNode) ;
  +			          /*in*/ tNodeData * pNode,
  +                                  /*in*/  tRepeatLevel nRepeatLevel) ;
   				  
   tNode Node_nextSibling (/*in*/ tDomTree *  pDomTree,
  -			/*in*/ tNode       xNode) ;
  +			/*in*/ tNode       xNode,
  +                        /*in*/  tRepeatLevel nRepeatLevel) ;
   
  -tNodeData * Node_selfPreviousSibling (/*in*/ tDomTree *  pDomTree,
  -			          /*in*/ tNodeData * pNode) ;
  +tNodeData * Node_selfPreviousSibling (/*in*/ tDomTree *	    pDomTree,
  +				      /*in*/ tNodeData *    pNode,
  +				      /*in*/ tRepeatLevel   nRepeatLevel) ;
  +
  +tNode Node_previousSibling (/*in*/ tDomTree *	pDomTree,
  +			    /*in*/ tNode	xNode,
  +                            /*in*/ tRepeatLevel	nRepeatLevel) ;
   
  -tNode Node_previousSibling (/*in*/ tDomTree *  pDomTree,
  -			/*in*/ tNode       xNode) ;
   
  -
   #define DomTree_self(xDomTree)		    (&pDomTrees[xDomTree]) 
   
   #define Node_self(pDomTree,xNode)	    ((struct tNodeData *)(pDomTree -> pLookup[xNode]))
  +#define Node_selfLevel(pDomTree,xNode,nLevel)  ((((struct tNodeData *)(pDomTree -> pLookup[xNode])) -> nRepeatLevel == nLevel || pDomTree -> pLookupLevel[xNode] == NULL)?Node_selfLevelItem(pDomTree,xNode,nLevel):((struct tNodeData *)(pDomTree -> pLookup[xNode])))
   
  -#define Node_parentNode(pDomTree,xNode)	    (Node_self(pDomTree,xNode)->xParent)
  -#define Node_selfParentNode(pDomTree,pNode) (Node_self(pDomTree,(pNode)->xParent))
  +#define Node_parentNode(pDomTree,xNode,nLevel)	    (Node_selfLevel(pDomTree,xNode,nLevel)->xParent)
  +#define Node_selfParentNode(pDomTree,pNode,nLevel) (Node_selfLevel(pDomTree,(pNode)->xParent,nLevel))
   #define xNode_selfParentNode(pDomTree,pNode) ((pNode)->xParent)
   
  -#define Node_firstChild(pDomTree,xNode)	    (Node_self(pDomTree,xNode)->xChilds)
  -#define Node_selfFirstChild(pDomTree,pNode)  (Node_self(pDomTree,(pNode)->xChilds))
  +#define Node_firstChild(pDomTree,xNode,nLevel)	    (Node_selfLevel(pDomTree,xNode,nLevel)->xChilds)
  +#define Node_selfFirstChild(pDomTree,pNode,nLevel)  (Node_selfLevel(pDomTree,(pNode)->xChilds,nLevel))
   
   #define Node_selfNodeNameNdx(pNode)	    ((pNode) -> nText) ;
   #define Node_selfNodeName(pNode)	    (Ndx2String ((pNode) -> nText))
  -#define Node_nodeName(pDomTree,pNode)	    (Ndx2String (Node_self (pDomTree,xNode) -> nText))
  +#define Node_nodeName(pDomTree,xNode,nLevel)	    (Ndx2String (Node_selfLevel (pDomTree,xNode,nLevel) -> nText))
   #define Node_selfFirstAttr(pNode)	    ((tAttrData *)((pNode) + 1))
   
   tNodeData * Node_selfCloneNode (/*in*/ tDomTree *      pDomTree,
   				/*in*/ tNodeData *     pNode,
  +                                /*in*/ tRepeatLevel    nRepeatLevel,
   				/*in*/  int	       bDeep) ;
   
   tNodeData * Node_selfCondCloneNode (/*in*/ tDomTree *      pDomTree,
  -				    /*in*/ tNodeData *     pNode) ;
  +				    /*in*/ tNodeData *     pNode,
  +                                    /*in*/ tRepeatLevel    nRepeatLevel) ;
   
   tNode Node_cloneNode (/*in*/ tDomTree *      pDomTree,
  -		    /*in*/ tNode 	    xNode,
  -		    /*in*/  int		    bDeep) ;
  +		      /*in*/ tNode 	     xNode,
  +                      /*in*/ tRepeatLevel    nRepeatLevel,
  +		      /*in*/  int	     bDeep) ;
   
   
  -void Node_toString (/*in*/ tDomTree *  pDomTree,
  -		    /*i/o*/ register req * r,
  -		    /*in*/ tNode	    xNode) ;
  +void Node_toString (/*i/o*/ register req *  r,
  +		    /*in*/ tDomTree *	    pDomTree,
  +		    /*in*/ tNode	    xNode,
  +                    /*in*/ tRepeatLevel     nRepeatLevel) ;
   
   struct tNodeData *  Node_selfRemoveChild (/*in*/ tDomTree *  pDomTree,
   					  /*in*/ tNode		    xNode,
   					  /*in*/ struct tNodeData *	    pChild) ;
   
  -tNode Node_removeChild (/*in*/ tDomTree *  pDomTree,
  +tNode Node_removeChild (/*in*/ tDomTree *   pDomTree,
   			/*in*/ tNode	    xNode,
  -			/*in*/ tNode	    xChild) ;
  +			/*in*/ tNode	    xChild,
  +                        /*in*/ tRepeatLevel nRepeatLevel) ;
  +
   
   tNode Node_insertAfter          (/*in*/ tDomTree *      pNewNodeDomTree,
   				 /*in*/ tNode		xNewNode,
  +                                 /*in*/ tRepeatLevel    nNewRepeatLevel,
                                    /*in*/ tDomTree *      pRefNodeDomTree,
  -				 /*in*/ tNode		xRefNode) ;
  +				 /*in*/ tNode		xRefNode,
  +                                 /*in*/ tRepeatLevel    nRefRepeatLevel) ;
   
   tNode Node_insertAfter_CDATA    (/*in*/ const char *    sText,
   				 /*in*/ int             nTextLen,
   			         /*in*/ int		nEscMode,
                                    /*in*/ tDomTree *      pRefNodeDomTree,
  -				 /*in*/ tNode		xRefNode) ;
  +				 /*in*/ tNode		xRefNode,
  +                                 /*in*/ tRepeatLevel    nRefRepeatLevel) ;
   
  -tNode Node_replaceChildWithNode (/*in*/ tDomTree *      pParentDomTree,
  -			         /*in*/	tNode 	        xParent,
  -                                 /*in*/ tDomTree *      pChildDomTree,
  -			         /*in*/	tNode 	        xChild) ;
  +tNode Node_replaceChildWithNode (/*in*/ tDomTree *      pDomTree,
  +				 /*in*/ tNode		xNode,
  +                                 /*in*/ tRepeatLevel    nRepeatLevel,
  +                                 /*in*/ tDomTree *      pOldChildDomTree,
  +				 /*in*/ tNode		xOldChild,
  +                                 /*in*/ tRepeatLevel    nOldRepeatLevel) ;
   
  -tNode Node_replaceChildWithCDATA (/*in*/ tDomTree *  pDomTree,
  -				  /*in*/ tNode		 xNode,
  +
  +tNode Node_replaceChildWithCDATA (/*in*/ tDomTree *	 pDomTree,
   				  /*in*/ tNode		 xOldChild,
  -			          /*in*/ const char *	 sText,
  +                                  /*in*/ tRepeatLevel    nRepeatLevel,
  +                                  /*in*/ const char *	 sText,
   				  /*in*/ int		 nTextLen,
   				  /*in*/ int		 nEscMode,
   				  /*in*/ int		 bFlags) ;
   
   char * Node_childsText (/*in*/ tDomTree *  pDomTree,
   		       /*in*/  tNode       xNode,
  +                       /*in*/ tRepeatLevel nRepeatLevel,
   		       /*i/o*/ char * *    ppText,
   		       /*in*/  int         bDeep) ;
   
   
  -
   tAttrData *  Element_selfGetAttribut (/*in*/ tDomTree *     pDomTree,
   				      /*in*/ struct tNodeData * pNode,
   				      /*in*/ const char *	sAttrName,
  @@ -398,6 +425,7 @@
   
   tAttrData *  Element_selfSetAttribut (/*in*/ tDomTree *	        pDomTree,
   				      /*in*/ struct tNodeData * pNode,
  +				      /*in*/ tRepeatLevel       nRepeatLevel,
   				      /*in*/ const char *	sAttrName,
   				      /*in*/ int		nAttrNameLen,
   				      /*in*/ const char *       sNewValue, 
  @@ -407,6 +435,7 @@
   
   tAttrData *  Element_selfRemoveAttribut (/*in*/ tDomTree *	        pDomTree,
   				      /*in*/ struct tNodeData * pNode,
  +				      /*in*/ tRepeatLevel       nRepeatLevel,
   				      /*in*/ const char *	sAttrName,
   				      /*in*/ int		nAttrNameLen,
   				      /*in*/ int		bClone) ;
  @@ -416,6 +445,7 @@
   #define Attr_selfAttrNum(pAttr)    (pAttr - Node_selfFirstAttr (Attr_selfNode(pAttr)))
   
   
  -char *       Attr_selfValue (/*in*/ tDomTree *	        pDomTree,
  -			     /*in*/ struct tAttrData * pAttr,
  -			    /*out*/ char * *    ppAttr) ;
  +char *       Attr_selfValue (/*in*/  tDomTree *	        pDomTree,
  +			     /*in*/  struct tAttrData * pAttr,
  +			     /*in*/  tRepeatLevel       nRepeatLevel,
  +			     /*out*/ char * *		ppAttr) ;
  
  
  
  1.75.4.46 +9 -7      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.75.4.45
  retrieving revision 1.75.4.46
  diff -u -r1.75.4.45 -r1.75.4.46
  --- epmain.c	2001/09/20 13:27:30	1.75.4.45
  +++ epmain.c	2001/10/22 06:25:01	1.75.4.46
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epmain.c,v 1.75.4.45 2001/09/20 13:27:30 richter Exp $
  +#   $Id: epmain.c,v 1.75.4.46 2001/10/22 06:25:01 richter Exp $
   #
   ###################################################################################*/
   
  @@ -3033,7 +3033,7 @@
               int    l ;
   
   	    tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
  -	    Node_toString (pDomTree, r, pDomTree -> xDocument) ;
  +	    Node_toString (r, pDomTree, pDomTree -> xDocument, 0) ;
   
               pOut = newSVpv ("", 0) ;
   	    oputs (r, "\r\n") ;
  @@ -3087,7 +3087,7 @@
   	    if (!bError && !r -> bEP1Compat)
   		{
   		tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
  -		Node_toString (pDomTree, r, pDomTree -> xDocument) ;
  +		Node_toString (r, pDomTree, pDomTree -> xDocument, 0) ;
   		}
   
   	    if (!r -> bEP1Compat)
  @@ -3131,12 +3131,14 @@
                               oCommitToMem (r, NULL, pData) ;
                               oRollbackOutput (r, NULL) ;
                               l -> xCurrNode =  Node_appendChild (DomTree_self (l -> xCurrDomTree),
  +								l -> xCurrNode, 
  +								l -> nCurrRepeatLevel, 
   			                                            ntypCDATA,
                                                                       0,
  -                                                                    pData, len - 1, l -> xCurrNode, 0, 0, "XSLT Result") ;
  +                                                                    pData, len - 1, 0, 0, "XSLT Result") ;
                               }
                           else
  -                            l -> xCurrNode = Node_insertAfter (pDomTree, pDomTree -> xDocument, DomTree_self (l -> xCurrDomTree), l -> xCurrNode) ;
  +                            l -> xCurrNode = Node_insertAfter (pDomTree, pDomTree -> xDocument, 0, DomTree_self (l -> xCurrDomTree), l -> xCurrNode, l -> nCurrRepeatLevel) ;
   			}
   		    }
   #endif
  @@ -3148,7 +3150,7 @@
   		if (!bError && !r -> bEP1Compat && !r -> pImportStash && !bXSLT)
   		    {
   		    tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
  -		    Node_toString (pDomTree, r, pDomTree -> xDocument) ;
  +		    Node_toString (r, pDomTree, pDomTree -> xDocument, 0) ;
   		    oputs (r, "\r\n") ;
   		    }
   #endif
  @@ -3164,7 +3166,7 @@
   	else if (!r -> bEP1Compat)
   	    {
   	    tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
  -	    Node_toString (pDomTree, r, pDomTree -> xDocument) ;
  +	    Node_toString (r, pDomTree, pDomTree -> xDocument, 0) ;
   	    }
   #endif
           }    
  
  
  
  1.4.2.38  +30 -21    embperl/Attic/epparse.c
  
  Index: epparse.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epparse.c,v
  retrieving revision 1.4.2.37
  retrieving revision 1.4.2.38
  diff -u -r1.4.2.37 -r1.4.2.38
  --- epparse.c	2001/10/17 10:16:06	1.4.2.37
  +++ epparse.c	2001/10/22 06:25:02	1.4.2.38
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epparse.c,v 1.4.2.37 2001/10/17 10:16:06 richter Exp $
  +#   $Id: epparse.c,v 1.4.2.38 2001/10/22 06:25:02 richter Exp $
   #
   ###################################################################################*/
   
  @@ -708,7 +708,7 @@
   
   			
   			if (pEnd - pCurrStart + 1)
  -			    if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0, pCurrStart, pEnd - pCurrStart + 1, xParentNode, level, GetLineNoOf (r, pCurrStart), NULL)))
  +			    if (!(xNewNode = Node_appendChild (pDomTree, xParentNode, 0, nCDataType, 0, pCurrStart, pEnd - pCurrStart + 1, level, GetLineNoOf (r, pCurrStart), NULL)))
   				return 1 ;
   			}
   		    pCurrStart = pCurrTokenStart ;
  @@ -742,7 +742,7 @@
                                   r -> bEscInUrl = 0 ;
                                   }
   
  -			    if (!(xNewAttrNode = Node_appendChild (pDomTree, pToken -> nCDataType, 0, pCurr, pEnd - pCurr, xParentNode, level+1, GetLineNoOf (r, pCurr), NULL)))
  +			    if (!(xNewAttrNode = Node_appendChild (pDomTree, xParentNode, 0, pToken -> nCDataType, 0, pCurr, pEnd - pCurr, level+1, GetLineNoOf (r, pCurr), NULL)))
   				return 1 ;
   			    if (pToken -> bAddFlags)
                                   Node_self (pDomTree, xNewAttrNode) -> bFlags |= pToken -> bAddFlags ;
  @@ -751,8 +751,8 @@
   			pCurr = pEndCurr + strlen (pToken -> sEndText) ;
   			}
   		    level-- ;
  -		    xParentNode = Node_parentNode  (pDomTree, xParentNode) ;
  -		    pStartTag = Node_selfLastChild (pDomTree, Node_self (pDomTree, xParentNode)) ;
  +		    xParentNode = Node_parentNode  (pDomTree, xParentNode, 0) ;
  +		    pStartTag = Node_selfLastChild (pDomTree, Node_self (pDomTree, xParentNode), 0) ;
   		    if (pToken -> pStartTag == NULL || pStartTag -> nText != pToken -> pStartTag -> nNodeName)
   			{
   			strncpy (r -> errdat2, Ndx2String (pStartTag -> nText), sizeof (r -> errdat2)) ;	
  @@ -765,7 +765,7 @@
   		    {
   		    if (pToken -> nNodeType == ntypEndStartTag && level > 0)
   			{
  -			xParentNode = Node_parentNode  (pDomTree, xParentNode) ;
  +			xParentNode = Node_parentNode  (pDomTree, xParentNode, 0) ;
   			level-- ;
   			}
   		    if (pToken -> nNodeType != ntypCDATA || pToken -> sNodeName)
  @@ -775,7 +775,7 @@
   			if (nType == ntypStartEndTag)
   			    nType = ntypStartTag ;
   
  -			if (!(xNewNode = Node_appendChild (pDomTree, nType, (nCDataType == ntypAttrValue && pToken -> nNodeType != ntypAttr)?(pToken -> nForceType?2:1):0, NULL, nNodeName, xParentNode, level, GetLineNoOf (r, pCurrTokenStart), pToken -> sText)))
  +			if (!(xNewNode = Node_appendChild (pDomTree, xParentNode, 0, nType, (nCDataType == ntypAttrValue && pToken -> nNodeType != ntypAttr)?(pToken -> nForceType?2:1):0, NULL, nNodeName, level, GetLineNoOf (r, pCurrTokenStart), pToken -> sText)))
   			    {
   			    r -> Buf.pCurrPos = pCurrTokenStart ;
   
  @@ -820,21 +820,21 @@
   			    */
   			    if (xNewNode != xParentNode)
   				{
  -				Node_removeChild (pDomTree, xParentNode, xNewNode) ; 
  +				Node_removeChild (pDomTree, xParentNode, xNewNode, 0) ; 
   				if (r -> bDebug & dbgParse)
   				    lprintf (pCurrReq, "[%d]PARSE: DelNode: +%02d %*s parent=%d node=%d\n", 
   	                             pCurrReq -> nPid, level, level * 2, "", xParentNode, xNewNode) ; 
   				}
   				
   			    /* add as cdata*/
  -			    if (!(xNewNode = Node_appendChild (pDomTree, pTokenTable -> nDefNodeType, 0, pCurrStart, pCurr - pCurrStart, xParentNode, level, GetLineNoOf (r, pCurrStart), NULL)))
  +			    if (!(xNewNode = Node_appendChild (pDomTree, xParentNode, 0, pTokenTable -> nDefNodeType, 0, pCurrStart, pCurr - pCurrStart, level, GetLineNoOf (r, pCurrStart), NULL)))
   				return 1 ;
   			    }
   			else if (rc != rcNotFound)
   			    return rc ;
   			 if (pToken -> nNodeType == ntypStartEndTag)
   			    {
  -			    xParentNode = Node_parentNode  (pDomTree, xNewNode) ;
  +			    xParentNode = Node_parentNode  (pDomTree, xNewNode, 0) ;
   			    pToken = NULL ;
   			    bFollow = 2 ;
   			    }
  @@ -893,7 +893,9 @@
                                       }
   
   
  -				if (!(xNewAttrNode = Node_appendChild (pDomTree, pToken -> nCDataType, 0, pCurr, pEnd - pCurr, xNewNode, level+1, nLine = GetLineNoOf (r, pCurr), pToken -> sText)))
  +				if (!(xNewAttrNode = Node_appendChild (pDomTree, xNewNode, 0, pToken -> nCDataType, 
  +									0, pCurr, pEnd - pCurr, level+1, 
  +									nLine = GetLineNoOf (r, pCurr), pToken -> sText)))
   				    return 1 ;
   			        if (pToken -> bAddFlags)
                                       Node_self (pDomTree, xNewAttrNode) -> bFlags |= pToken -> bAddFlags ;
  @@ -904,7 +906,7 @@
   
   			     if (pToken -> nNodeType == ntypStartEndTag)
   				{
  -				xParentNode = Node_parentNode  (pDomTree, xNewNode) ;
  +				xParentNode = Node_parentNode  (pDomTree, xNewNode, 0) ;
   				pToken = NULL ;
   				}
   
  @@ -929,7 +931,9 @@
               {
   	    if (pCurr - pCurrStart && nCDataType)
   		{
  -		if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0, pCurrStart, pCurr - pCurrStart, xParentNode, level, GetLineNoOf (r, pCurrStart), NULL)))
  +		if (!(xNewNode = Node_appendChild (pDomTree, xParentNode, 0, nCDataType, 0, 
  +		                                   pCurrStart, pCurr - pCurrStart, level, 
  +						   GetLineNoOf (r, pCurrStart), NULL)))
   		    return 1 ;
   		}
               *ppCurr = pCurr ;
  @@ -951,7 +955,9 @@
   		    pEnd-- ;
   
               if ((pEnd - pCurrStart + 1 != 0 || nCDataType == ntypAttrValue) && nCDataType)
  -		if (!(xNewNode = Node_appendChild (pDomTree,  nCDataType, 0, pCurrStart, pEnd - pCurrStart + 1, xParentNode, level, GetLineNoOf (r, pCurr), NULL)))
  +		if (!(xNewNode = Node_appendChild (pDomTree,  xParentNode, 0, nCDataType, 0, 
  +						    pCurrStart, pEnd - pCurrStart + 1, level, 
  +						    GetLineNoOf (r, pCurr), NULL)))
   		    return 1 ;
   
               if (!pCDATAStart && !sStopText)
  @@ -964,7 +970,9 @@
           }
           
       if (nCDataType && pCurr - pCurrStart)
  -	if (!(xNewNode = Node_appendChild (pDomTree,  nCDataType, 0,pCurrStart, pCurr - pCurrStart, xParentNode, level, GetLineNoOf (r, pCurrStart), NULL)))
  +	if (!(xNewNode = Node_appendChild (pDomTree, xParentNode, 0, nCDataType, 0,
  +					    pCurrStart, pCurr - pCurrStart, level, 
  +					    GetLineNoOf (r, pCurrStart), NULL)))
   	    return 1 ;
   
       *ppCurr = pCurr ;
  @@ -998,20 +1006,21 @@
   
       pDomTree -> xFilename = String2Ndx (r -> Buf.pFile -> sSourcefile, strlen (r -> Buf.pFile -> sSourcefile)) ;
       
  -    if (!(xDocNode = Node_appendChild (pDomTree,  ntypTag, 0, "attr", 3, 0, 0, 0, NULL)))
  +    if (!(xDocNode = Node_appendChild (pDomTree, 0, 0, ntypTag, 0, "attr", 3, 0, 0, NULL)))
   	return 1 ;
   
  -    if (!(xDocNode = Node_appendChild (pDomTree,  r -> bSubReq?ntypDocumentFraq:ntypDocument, 0, NULL, r -> bSubReq?xDocumentFraq:xDocument, 0, 0, 0, NULL)))
  +    if (!(xDocNode = Node_appendChild (pDomTree,  0, 0, r -> bSubReq?ntypDocumentFraq:ntypDocument, 0, 
  +					NULL, r -> bSubReq?xDocumentFraq:xDocument, 0, 0, NULL)))
   	return 1 ;
       
  -    if (!(xNode = Node_appendChild (pDomTree,  ntypAttr, 0, NULL, xDomTreeAttr, xDocNode, 0, 0, NULL)))
  +    if (!(xNode = Node_appendChild (pDomTree, xDocNode, 0, ntypAttr, 0, NULL, xDomTreeAttr, 0, 0, NULL)))
   	return 1 ;
   
  -    if (!(xNode = Node_appendChild (pDomTree,  ntypAttrValue, 0, NULL, r -> xCurrDomTree, xNode, 0, 0, NULL)))
  +    if (!(xNode = Node_appendChild (pDomTree, xNode, 0, ntypAttrValue, 0, NULL, r -> xCurrDomTree, 0, 0, NULL)))
   	return 1 ;
   
       /* Add at least one child node to document to make insertafter at the beginning of the document work */
  -    if (!(xNode = Node_appendChild (pDomTree,  ntypCDATA, 0, "", 0, xDocNode, 0, 0, NULL)))
  +    if (!(xNode = Node_appendChild (pDomTree, xDocNode, 0, ntypCDATA, 0, "", 0, 0, 0, NULL)))
   	return 1 ;
   
       pDomTree -> xDocument = xDocNode ;
  @@ -1022,7 +1031,7 @@
   	return rc ; 
       
       /* Add one child node end the end to catch loops that end at the very last node */
  -    if (!(xNode = Node_appendChild (pDomTree,  ntypCDATA, 0, "", 0, xDocNode, 0, 0, NULL)))
  +    if (!(xNode = Node_appendChild (pDomTree, xDocNode, 0, ntypCDATA, 0, "", 0, 0, 0, NULL)))
   	return 1 ;
   
       r -> pTokenTable = pTokenTableSave ;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org