diff --git a/src/main/java/writer2latex/rdf/DocumentStructure.java b/src/main/java/writer2latex/rdf/DocumentStructure.java index 11107bf..c2fa1d7 100644 --- a/src/main/java/writer2latex/rdf/DocumentStructure.java +++ b/src/main/java/writer2latex/rdf/DocumentStructure.java @@ -123,8 +123,11 @@ public class DocumentStructure { private Resource createExcerpt(DocumentPart docExcerpt) { String name = TS + EXCERPT + "/" + PARSERNAME + "_" + documentID + docExcerpt.getSafePath(); Resource excerpt = m.createIndividual(name, excerptClass); - Property htmlExcerpt = m.createProperty(TS + "htmlExcerpt"); - excerpt.addLiteral(htmlExcerpt, docExcerpt.getBody()); + if (!docExcerpt.getBody().isEmpty()) { + Property htmlExcerpt = m.createProperty(TS + "htmlExcerpt"); + excerpt.addLiteral(htmlExcerpt, docExcerpt.getBody()); + } + return excerpt; }