Changeset 609 for ccr


Ignore:
Timestamp:
Nov 22, 2009, 2:57:26 PM (15 years ago)
Author:
George Lilly
Message:

fixed DEBUG bug in XPath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CXPATH.m

    r601 r609  
    584584 S FOUND=0
    585585 S INTXT=0
    586  I DEBUG W "DELETING EMPTY ELEMENTS",!
     586 I $G(DEBUG) W "DELETING EMPTY ELEMENTS",!
    587587 F I=1:1:(@THEXML@(0)-1) D  ; LOOP THROUGH ENTIRE ARRAY
    588588 . S J=@THEXML@(I)
    589589 . I J["<text>" D
    590590 . . S INTXT=1 ; IN HTML SECTION, DON'T TRIM
    591  . . I DEBUG W "IN HTML SECTION",!
     591 . . I $G(DEBUG) W "IN HTML SECTION",!
    592592 . N JM,JP,JPX ; JMINUS AND JPLUS
    593593 . S JM=@THEXML@(I-1) ; LINE BEFORE
     
    597597 . . S JPX=$TR(JP,"/","") ; REMOVE THE SLASH
    598598 . . I J=JPX D  ; AN EMPTY ELEMENT ON TWO LINES
    599  . . . I DEBUG W I,J,JP,!
     599 . . . I $G(DEBUG) W I,J,JP,!
    600600 . . . S FOUND=1 ; FOUND SOMETHING TO BE DELETED
    601601 . . . S DEL(I)="" ; SET LINE TO DELETE
    602602 . . . S DEL(I+1)="" ; SET NEXT LINE TO DELETE
    603603 . . I J["><" D  ; AN EMPTY ELEMENT ON ONE LINE
    604  . . . I DEBUG W I,J,!
     604 . . . I $G(DEBUG) W I,J,!
    605605 . . . S FOUND=1 ; FOUND SOMETHING TO BE DELETED
    606606 . . . S DEL(I)="" ; SET THE EMPTY LINE UP TO BE DELETED
    607607 . . . I JM=JPX D  ;
    608  . . . . I DEBUG W I,JM_J_JPX,!
     608 . . . . I $G(DEBUG) W I,JM_J_JPX,!
    609609 . . . . S DEL(I-1)=""
    610610 . . . . S DEL(I+1)="" ; SET THE SURROUNDING LINES FOR DEL
Note: See TracChangeset for help on using the changeset viewer.