@@ -114,7 +114,8 @@ elementToDocbook opts lvl (Sec _ _num (id',_,_) title elements) =
114114 n | n == 0 -> "chapter"
115115 | n >= 1 && n <= 5 -> "sect" ++ show n
116116 | otherwise -> "simplesect"
117− in inTags True tag [("id", writerIdentifierPrefix opts ++ id')] $
117+ in inTags True tag [("id", writerIdentifierPrefix opts ++ id') |
118+ not (null id')] $
118119 inTagsSimple "title" (inlinesToDocbook opts title) $$
119120 vcat (map (elementToDocbook opts (lvl + 1)) elements')
120121