Changeset 1322


Ignore:
Timestamp:
Dec 13, 2011, 2:41:53 PM (13 years ago)
Author:
George Lilly
Message:

added fileman output transform using namespaces

Location:
fmts/trunk
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • fmts/trunk/p/C0XF2N.m

    r1294 r1322  
    3838 S @ZFARY@("C0XTN")=$NA(^C0X(101)) ; TRIPLES GLOBAL NAME
    3939 S @ZFARY@("C0XSN")=$NA(^C0X(201)) ; STRING FILE GLOBAL NAME
    40  S @ZFARY@("C0XDIR")="/home/glilly/fmts/trunk/samples/"
     40 S @ZFARY@("C0XDIR")="/home/glilly/snomed/"
    4141 S @ZFARY@("BLKLOAD")=1 ; this file supports block load
    4242 S @ZFARY@("FMTSSTYLE")="F2N" ; fileman style
     
    104104 K INURL
    105105 K C0XFDA
    106  K ^TMP("MXMLDOM",$J)
     106 ;K ^TMP("MXMLDOM",$J)
    107107 Q
    108108 ;
     
    221221 S C0XDLC2=$$NOW^XLFDT ; START OF PARSE
    222222 S C0XDOCID=$$EN^MXMLDOM(ZRDF,"W")
     223 ;B
    223224 K @ZRDF ; DON'T NEED INPUT BUFFER ANYMORE
    224225 ; -- assign the MXLM dom global name to ZDOM
     
    252253 . S ZVOC=$P(ZI,"xmlns:",2)
    253254 . I ZVOC'="" S C0XVOC(ZVOC)=$G(@ZDOM@(1,"A",ZI))
    254  ;W !,"VOCABS:" ZWR C0XVOC
     255 W !,"VOCABS:" ZWR C0XVOC
    255256 ;
    256257 ; -- look for children called rdf:Description. quit if none. not an rdf file
    257258 ;
     259 S C0XTYPE("rdf:Description")=1
     260 S C0XTYPE("owl:ObjectProperty")=1
    258261 S ZI=$O(@ZDOM@(1,"C",""))
    259  I $G(@ZDOM@(1,"C",ZI))'="rdf:Description" D  Q  ; not an rdf file
     262 I '$G(C0XTYPE(@ZDOM@(1,"C",ZI))) D  Q  ; not an rdf file
    260263 . W !,"Error. Not an RDF file. Cannot process."
     264 . zwr ^TMP("MXMLDOM",$J,*)
    261265 ;
    262266 ; -- now process the rdf description children
     
    268272 . ; -- TODO: check to see if this is right in general
    269273 . ;
    270  . IF $G(@ZDOM@(1,"C",ZI))'="rdf:Description" D  Q  ;
     274 . IF '$G(C0XTYPE(@ZDOM@(1,"C",ZI))) D  Q  ;
    271275 . . W !,"SKIPPING NODE: ",ZI
    272276 . ; -- now looking for the subject for the triples
Note: See TracChangeset for help on using the changeset viewer.