#Processed by Id: cwm.py,v 1.87 2002/02/22 05:18:55 timbl Exp # using base file:/home/ntp.n3 # Notation3 generation by # notation3.py,v 1.103 2002/02/22 05:18:55 timbl Exp # Base was: file:/home/ntp.n3 @prefix : <#> . @prefix daml: . @prefix log: . @prefix ntp: . @prefix string: . this log:forAll :content, :doc, :moreTriples, :p, :re, :t, :triples . :Term = """(?:<.*?>|_:\\S+|\\?\\S+|"(?:\\\\"|[^"])*")[ \\t]""" . { :Term = :t . ( "([ \\t]*" :t :t :t "*.[ \\t]*)" ) string:concatenation :re . ( :content :re ) ntp:findall :triples . :doc a :DocumentToParse; log:content :content . } log:implies {:doc :hasTriples :triples . } . { :doc :hasTriple :t . :t ntp:strToTriple :p . } log:implies {:t a :Added . } . { :doc :hasTriples :triples . :moreTriples log:notEqualTo () . :t log:rawType log:Literal . :triples daml:first :t; daml:rest :moreTriples . } log:implies {:doc :hasTriple :t; :hasTriples :moreTriples . } . :_gs1 daml:first " <#authorHomepage> ."; daml:rest () . :_gs2 daml:first """ <#authorName> "Sean B. Palmer" ."""; daml:rest ( " <#authorHomepage> ." ) . a :DocumentToParse; :hasTriple """ <#authorName> "Sean B. Palmer" .""", """ <#title> "infomesh.net" ."""; :hasTriples ( " <#authorHomepage> ." ), ( """ <#authorName> "Sean B. Palmer" .""" " <#authorHomepage> ." ), ( """ <#title> "infomesh.net" .""" """ <#authorName> "Sean B. Palmer" .""" " <#authorHomepage> ." ) . <#title> "infomesh.net" . #ENDS