Changeset 609 for ccr/trunk/p
- Timestamp:
- Nov 22, 2009, 2:57:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CXPATH.m
r601 r609 584 584 S FOUND=0 585 585 S INTXT=0 586 I DEBUGW "DELETING EMPTY ELEMENTS",!586 I $G(DEBUG) W "DELETING EMPTY ELEMENTS",! 587 587 F I=1:1:(@THEXML@(0)-1) D ; LOOP THROUGH ENTIRE ARRAY 588 588 . S J=@THEXML@(I) 589 589 . I J["<text>" D 590 590 . . S INTXT=1 ; IN HTML SECTION, DON'T TRIM 591 . . I DEBUGW "IN HTML SECTION",!591 . . I $G(DEBUG) W "IN HTML SECTION",! 592 592 . N JM,JP,JPX ; JMINUS AND JPLUS 593 593 . S JM=@THEXML@(I-1) ; LINE BEFORE … … 597 597 . . S JPX=$TR(JP,"/","") ; REMOVE THE SLASH 598 598 . . I J=JPX D ; AN EMPTY ELEMENT ON TWO LINES 599 . . . I DEBUGW I,J,JP,!599 . . . I $G(DEBUG) W I,J,JP,! 600 600 . . . S FOUND=1 ; FOUND SOMETHING TO BE DELETED 601 601 . . . S DEL(I)="" ; SET LINE TO DELETE 602 602 . . . S DEL(I+1)="" ; SET NEXT LINE TO DELETE 603 603 . . I J["><" D ; AN EMPTY ELEMENT ON ONE LINE 604 . . . I DEBUGW I,J,!604 . . . I $G(DEBUG) W I,J,! 605 605 . . . S FOUND=1 ; FOUND SOMETHING TO BE DELETED 606 606 . . . S DEL(I)="" ; SET THE EMPTY LINE UP TO BE DELETED 607 607 . . . I JM=JPX D ; 608 . . . . I DEBUGW I,JM_J_JPX,!608 . . . . I $G(DEBUG) W I,JM_J_JPX,! 609 609 . . . . S DEL(I-1)="" 610 610 . . . . S DEL(I+1)="" ; SET THE SURROUNDING LINES FOR DEL
Note:
See TracChangeset
for help on using the changeset viewer.