Changeset 1586 for ccr/trunk/p/C0CNHIN.m
- Timestamp:
- Oct 30, 2012, 1:11:02 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/C0CNHIN.m
r1544 r1586 1 C0CNHIN ; GPL - PROCESSING FOR OUTPUT OF NHINV ROUTINES;6/3/11 17:05 2 ;;1.2;C0C;;May 11, 2012;Build 47 3 ;Copyright 2011 George Lilly. Licensed under the terms of the GNU 4 ;General Public License See attached copy of the License. 5 ; 6 ;This program is free software; you can redistribute it and/or modify 7 ;it under the terms of the GNU General Public License as published by 8 ;the Free Software Foundation; either version 2 of the License, or 9 ;(at your option) any later version. 10 ; 11 ;This program is distributed in the hope that it will be useful, 12 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 13 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 ;GNU General Public License for more details. 15 ; 16 ;You should have received a copy of the GNU General Public License along 17 ;with this program; if not, write to the Free Software Foundation, Inc., 18 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 1 C0CNHIN ; GPL - PROCESSING FOR OUTPUT OF NHINV ROUTINES;6/3/11 17:05 2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50 3 ;Copyright 2011 George Lilly. 4 ; 5 ; This program is free software: you can redistribute it and/or modify 6 ; it under the terms of the GNU Affero General Public License as 7 ; published by the Free Software Foundation, either version 3 of the 8 ; License, or (at your option) any later version. 9 ; 10 ; This program is distributed in the hope that it will be useful, 11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ; GNU Affero General Public License for more details. 14 ; 15 ; You should have received a copy of the GNU Affero General Public License 16 ; along with this program. If not, see <http://www.gnu.org/licenses/>. 19 17 ; 20 18 Q … … 146 144 Q 147 145 ; 148 DOMO(ZOID,ZPATH,ZNARY,ZXIDX,ZXPARY,ZNUM,ZREDUX) 146 DOMO(ZOID,ZPATH,ZNARY,ZXIDX,ZXPARY,ZNUM,ZREDUX) ; RECURSIVE ROUTINE TO POPULATE 149 147 ; THE XPATH INDEX ZXIDX, PASSED BY NAME 150 148 ; THE XPATH ARRAY XPARY, PASSED BY NAME … … 205 203 Q 206 204 ; 207 PARSE(INXML,INDOC) 205 PARSE(INXML,INDOC) ;CALL THE MXML PARSER ON INXML, PASSED BY NAME 208 206 ; INDOC IS PASSED AS THE DOCUMENT NAME - DON'T KNOW WHERE TO STORE THIS NOW 209 207 ; EXTRINSIC WHICH RETURNS THE DOCID ASSIGNED BY MXML … … 211 209 Q $$EN^MXMLDOM(INXML,"W") 212 210 ; 213 ISMULT(ZOID) 211 ISMULT(ZOID) ; RETURN TRUE IF ZOID IS ONE OF A MULTIPLE 214 212 N ZN 215 213 ;I $$TAG(ZOID)["entry" B … … 218 216 Q 0 219 217 ; 220 FIRST(ZOID) 218 FIRST(ZOID) ;RETURNS THE OID OF THE FIRST CHILD OF ZOID 221 219 Q $$CHILD^MXMLDOM(C0CDOCID,ZOID) 222 220 ; 223 PARENT(ZOID) 221 PARENT(ZOID) ;RETURNS THE OID OF THE PARENT OF ZOID 224 222 Q $$PARENT^MXMLDOM(C0CDOCID,ZOID) 225 223 ; 226 ATT(RTN,NODE) 224 ATT(RTN,NODE) ;GET ATTRIBUTES FOR ZOID 227 225 S HANDLE=C0CDOCID 228 226 K @RTN … … 230 228 Q 231 229 ; 232 TAG(ZOID) 230 TAG(ZOID) ; RETURNS THE XML TAG FOR THE NODE 233 231 ;I ZOID=149 B ;GPLTEST 234 232 N X,Y … … 239 237 Q Y 240 238 ; 241 NXTSIB(ZOID) 239 NXTSIB(ZOID) ; RETURNS THE NEXT SIBLING 242 240 Q $$SIBLING^MXMLDOM(C0CDOCID,ZOID) 243 241 ; 244 DATA(ZT,ZOID) 242 DATA(ZT,ZOID) ; RETURNS DATA FOR THE NODE 245 243 ;N ZT,ZN S ZT="" 246 244 ;S C0CDOM=$NA(^TMP("MXMLDOM",$J,C0CDOCID)) … … 249 247 Q 250 248 ; 251 OUTXML(ZRTN,INID) 249 OUTXML(ZRTN,INID) ; USES C0CMXMLB (MXMLBLD) TO OUTPUT XML FROM AN MXMLDOM 252 250 ; 253 251 S C0CDOCID=INID … … 259 257 Q 260 258 ; 261 NDOUT(ZOID) 259 NDOUT(ZOID) ;CALLBACK ROUTINE - IT IS RECURSIVE 262 260 N ZI S ZI=$$FIRST(ZOID) 263 261 I ZI'=0 D ; THERE IS A CHILD
Note:
See TracChangeset
for help on using the changeset viewer.