update to template compiler

This commit is contained in:
george 2010-03-21 22:21:30 +00:00
parent b4113a87b8
commit e74cc05783
1 changed files with 3 additions and 1 deletions

View File

@ -98,6 +98,7 @@ GETTEMP(OUTXML,TEMPID,FARY) ;GET THE TEMPLATE XML FROM TEMPLATE TEMPID
. S FARY="FARY" ; FILE ARRAY
. D INITXPF("FARY") ;IF FILE ARRAY NOT PASSED, INITIALIZE
D SETXPF(FARY) ;SET FILE VARIABLES
I +TEMPID=0 S TEMPID=$$RESTID^C0CSOAP(TEMPID,FARY) ;RESOLVE TEMPLATE NAME
I $$GET1^DIQ(C0CXPF,TEMPID_",",C0CXTFLD,,OUTXML)'=OUTXML D Q ;
. W "ERROR RETRIEVING TEMPLATE",!
Q
@ -142,7 +143,8 @@ MKTPLATE(OUTT,OUTIDX,INXML,REDUX) ;MAKE A TEMPLATE FROM INXML, RETURNED IN OUTT
F S ZI=$O(@C0CDOM@(ZI)) Q:ZI="" D ; FOR EACH NODE IN THE DOM
. K ZD ;FOR DATA
. D DATA^C0CMXML("ZD",ZI) ;SEE IF THERE IS DATA FOR THIS NODE
. I $D(ZD(1)) D ; IF YES
. ;I $D(ZD(1)) D ; IF YES
. I $$FIRST^C0CMXML(ZI)=0 D ; IF THERE ARE NO CHILDREN TO THIS NODE
. . ;I ZI<3 B ;W !,ZD(1)
. . K @C0CDOM@(ZI,"T") ; KILL THE DATA
. . N ZXPATH