Index: /fmts/trunk/p/C0XGET1.m
===================================================================
--- /fmts/trunk/p/C0XGET1.m	(revision 1387)
+++ /fmts/trunk/p/C0XGET1.m	(revision 1388)
@@ -37,5 +37,5 @@
  s zobj=$$IENOF($$EXT^C0XUTIL($g(obj)),fary) ; ien of object
  s zgraph=$$IENOF($g(graph),fary) ; ien of graph
- W !,"s:",zsub," p:",zpred," o:",zobj
+ I $G(DEBUG) W !,"s:",zsub," p:",zpred," o:",zobj
  d trip(.tmprtn,zsub,zpred,zobj,zgraph,fary)
  n ztmp
@@ -151,5 +151,5 @@
  s zobj=$$IENOF($$EXT^C0XUTIL($g(obj)),fary) ; ien of object
  s zgraph=$$IENOF($g(graph),fary) ; ien of graph
- W !,"s:",zsub," p:",zpred," o:",zobj
+ I $G(DEBUG) W !,"s:",zsub," p:",zpred," o:",zobj
  d trip(.tmprtn,zsub,zpred,zobj,zgraph,fary)
  d ien2tary(.zrary,"tmprtn") ; convert to triples
@@ -206,5 +206,5 @@
  s zobj=$$IENOF($$EXT^C0XUTIL($g(obj)),fary) ; ien of obj
  s zgraph=$$IENOF($g(graph),fary) ; ien of graph
- W !,"s:",zsub," p:",zpred," o:",zobj
+ I $G(DEBUG) W !,"s:",zsub," p:",zpred," o:",zobj
  n c0xflag,zi,zx,zt
  s zt=$na(^C0X(101)) ; 
@@ -240,5 +240,5 @@
  s zx=itbl(c0xflag,zi) ; executable instruction to run
  ;i $g(ngraph)'="" s zi="G"_zi ; this is wrong.. don't do graphs yet
- w !,c0xflag," ",zw," ",zt," ",zi," ",zx,!
+ i $g(DEBUG) w !,c0xflag," ",zw," ",zt," ",zi," ",zx,!
  ;zwr itbl
  x zx
@@ -352,5 +352,5 @@
  s zx=itbl(c0xflag,zi) ; executable instruction to run
  i $g(ngraph)'="" s zi="G"_zi
- w !,zx
+ i $g(DEBUG) w !,zx
  x zx
  q
@@ -460,2 +460,14 @@
  q $$WHERETXT^C0XF2N(zo)
  ;
+tagRoot(ztag) ; extrinsic which returns the root for graphs and subjects
+ ; associated with ztag
+ n zs,zo
+ s zs=$$subject("fmts:fileTag",ztag)
+ i zs="" d  q "" ;
+ . w !,"error, tag is either missing or there are more than one ",ztag
+ s zo=$$object(zs,"fmts:root")
+ i zo="" d  q "" ;
+ . w !,"error, root not found ",zs
+ ;w !,zo
+ q zo
+ ;
