fixed bug in non-xml inport
This commit is contained in:
parent
d534a9b3d2
commit
2a7c34feda
|
@ -146,12 +146,12 @@ INSRDF(ZRDF,ZNAME,FARY) ; INSERT AN RDF FILE INTO THE STORE AND PROCESS
|
|||
D ADD(ZGRAPH,ZSUBJECT,"fmts:url",ZNAME,FARY)
|
||||
N ZTXTNM
|
||||
S ZTXTNM="_TXT_INCOMING_RDF_FILE_"_ZNAME_"_"_$$LKY5 ; NAME FOR TEXT NODE
|
||||
D ADD(ZGRAPH,ZSUBJECT,"fmts:rdfSource",ZTXTNM,FARY)
|
||||
D ADD(ZGRAPH,ZSUBJECT,"fmts:tag",$$name2tag(ZNAME),FARY)
|
||||
D ADD(ZGRAPH,ZSUBJECT,"fmts:fileSource",ZTXTNM,FARY)
|
||||
D ADD(ZGRAPH,ZSUBJECT,"fmts:fileTag",$$name2tag(ZNAME),FARY)
|
||||
D SWUPDIE(.C0XFDA) ; TRY IT OUT
|
||||
K C0XCNT ;RESET FOR NEXT TIME
|
||||
D STORETXT(ZRDF,ZTXTNM,FARY)
|
||||
W !,"ADDED: ",ZGRAPH," ",ZSUBJECT," fmts:rdfSource ",ZTXTNM
|
||||
W !,"ADDED: ",ZGRAPH," ",ZSUBJECT," fmts:fileSource ",ZTXTNM
|
||||
D PROCESS(.G,ZRDF,ZNAME,ZGRAPH,FARY) ; PARSE AND INSERT THE RDF
|
||||
Q
|
||||
;
|
||||
|
@ -240,6 +240,7 @@ PROCESS(ZRTN,ZRDF,ZGRF,ZMETA,FARY) ; PROCESS AN INCOMING RDF FILE
|
|||
;S C0XDOCID=$$PARSE^C0CNHIN(ZRDF,"C0XARRAY") ; PARSE WITH MXML
|
||||
S C0XDLC2=$$NOW^XLFDT ; START OF PARSE
|
||||
I @ZRDF@(1)'["<?xml" D Q ;
|
||||
. K @ZRDF ; don't need the input buffer
|
||||
. W !,"Not an XML file"
|
||||
S C0XDOCID=$$EN^MXMLDOM(ZRDF,"W") ;
|
||||
;B
|
||||
|
|
|
@ -450,10 +450,10 @@ output(zwhat,zfname,zdir) ; function to write an array to a host file
|
|||
tagText(ztag) ; extrinsic which returns the location of the text
|
||||
; associated with ztag
|
||||
n zs,zo
|
||||
s zs=$$subject("fmts:tag",ztag)
|
||||
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:rdfSource")
|
||||
s zo=$$object(zs,"fmts:fileSource")
|
||||
i zo="" d q ;
|
||||
. w !,"error, tag source not found ",zs
|
||||
w !,zo
|
||||
|
|
Loading…
Reference in New Issue