@@ -79,7 +79,7 @@ List of all DocBook tags, with [x] indicating implemented:
79 a ClassSynopsis
79 a ClassSynopsis
80[ ] cmdsynopsis - A syntax summary for a software command
80[ ] cmdsynopsis - A syntax summary for a software command
81[ ] co - The location of a callout embedded in text
81[ ] co - The location of a callout embedded in text
82−[ ] code - An inline code fragment
82+[x] code - An inline code fragment
83[ ] col - Specifications for a column in an HTML table
83[ ] col - Specifications for a column in an HTML table
84[ ] colgroup - A group of columns in an HTML table
84[ ] colgroup - A group of columns in an HTML table
85[ ] collab - Identifies a collaborator
85[ ] collab - Identifies a collaborator
@@ -177,6 +177,7 @@ List of all DocBook tags, with [x] indicating implemented:
177[ ] indexentry - An entry in an index
177[ ] indexentry - An entry in an index
178[ ] indexinfo - Meta-information for an Index
178[ ] indexinfo - Meta-information for an Index
179[ ] indexterm - A wrapper for terms to be indexed
179[ ] indexterm - A wrapper for terms to be indexed
180+[ ] info - A wrapper for information about a component or other block. (DocBook v5)
180[ ] informalequation - A displayed mathematical equation without a title
181[ ] informalequation - A displayed mathematical equation without a title
181[ ] informalexample - A displayed example without a title
182[ ] informalexample - A displayed example without a title
182[ ] informalfigure - A untitled figure
183[ ] informalfigure - A untitled figure
@@ -209,7 +210,7 @@ List of all DocBook tags, with [x] indicating implemented:
209[ ] lineage - The portion of a person's name indicating a relationship to
210[ ] lineage - The portion of a person's name indicating a relationship to
210 ancestors
211 ancestors
211[ ] lineannotation - A comment on a line in a verbatim listing
212[ ] lineannotation - A comment on a line in a verbatim listing
212−[ ] link - A hypertext link
213+[x] link - A hypertext link
213[ ] listitem - A wrapper for the elements of a list item
214[ ] listitem - A wrapper for the elements of a list item
214[x] literal - Inline text that is some literal value
215[x] literal - Inline text that is some literal value
215[ ] literallayout - A block of text in which line breaks and white space are
216[ ] literallayout - A block of text in which line breaks and white space are
@@ -405,10 +406,10 @@ List of all DocBook tags, with [x] indicating implemented:
405[ ] subjectset - A set of terms describing the subject matter of a document
406[ ] subjectset - A set of terms describing the subject matter of a document
406[ ] subjectterm - A term in a group of terms describing the subject matter of
407[ ] subjectterm - A term in a group of terms describing the subject matter of
407 a document
408 a document
408−[ ] subscript - A subscript (as in H2O, the molecular formula for water)
409+[x] subscript - A subscript (as in H2O, the molecular formula for water)
409[ ] substeps - A wrapper for steps that occur within steps in a procedure
410[ ] substeps - A wrapper for steps that occur within steps in a procedure
410[ ] subtitle - The subtitle of a document
411[ ] subtitle - The subtitle of a document
411−[ ] superscript - A superscript (as in x2, the mathematical notation for x
412+[x] superscript - A superscript (as in x2, the mathematical notation for x
412 multiplied by itself)
413 multiplied by itself)
413[ ] surname - A family name; in western cultures the last name
414[ ] surname - A family name; in western cultures the last name
414[ ] svg:svg - An SVG graphic
415[ ] svg:svg - An SVG graphic
@@ -527,6 +528,7 @@ parseBlock (Elem e) =
527 "abstract" -> blockQuote <$> getBlocks e
528 "abstract" -> blockQuote <$> getBlocks e
528 "itemizedlist" -> bulletList <$> listitems
529 "itemizedlist" -> bulletList <$> listitems
529 "orderedlist" -> orderedList <$> listitems -- TODO list attributes
530 "orderedlist" -> orderedList <$> listitems -- TODO list attributes
531+ "info" -> getTitle >> getAuthors >> getDate >> return mempty
530 "articleinfo" -> getTitle >> getAuthors >> getDate >> return mempty
532 "articleinfo" -> getTitle >> getAuthors >> getDate >> return mempty
531 "programlisting" -> return $ codeBlock $ strContent e -- TODO attrs
533 "programlisting" -> return $ codeBlock $ strContent e -- TODO attrs
532 "?xml" -> return mempty
534 "?xml" -> return mempty
@@ -584,6 +586,7 @@ parseInline (Elem e) =
584 return $ if qt == SingleQuote
586 return $ if qt == SingleQuote
585 then singleQuoted contents
587 then singleQuoted contents
586 else doubleQuoted contents
588 else doubleQuoted contents
589+ "code" -> return $ code $ strContent e -- TODO attrs
587 "literal" -> return $ code $ strContent e -- TODO attrs
590 "literal" -> return $ code $ strContent e -- TODO attrs
588 "varname" -> return $ codeWith ("",["varname"],[]) $ strContent e
591 "varname" -> return $ codeWith ("",["varname"],[]) $ strContent e
589 "function" -> return $ codeWith ("",["function"],[]) $ strContent e
592 "function" -> return $ codeWith ("",["function"],[]) $ strContent e
@@ -595,6 +598,11 @@ parseInline (Elem e) =
595 "ulink" -> link
598 "ulink" -> link
596 (fromMaybe "" (lookupAttrBy (\attr -> qName attr == "url")
599 (fromMaybe "" (lookupAttrBy (\attr -> qName attr == "url")
597 (elAttribs e))) "" <$> innerInlines
600 (elAttribs e))) "" <$> innerInlines
601+ "link" -> case findAttr (QName "href" Nothing $ Just "xlink") e of
602+ Just href -> link href "" <$> innerInlines
603+ _ -> link ("#"++(fromMaybe "" (lookupAttrBy
604+ (\attr -> qName attr == "linkend")
605+ (elAttribs e)))) "" <$> innerInlines
598 "emphasis" -> case lookupAttrBy (\attr -> qName attr == "role")
606 "emphasis" -> case lookupAttrBy (\attr -> qName attr == "role")
599 (elAttribs e) of
607 (elAttribs e) of
600 Just "strong" -> strong <$> innerInlines
608 Just "strong" -> strong <$> innerInlines
@@ -604,4 +612,3 @@ parseInline (Elem e) =
604 where innerInlines = (trimInlines . mconcat) <$>
612 where innerInlines = (trimInlines . mconcat) <$>
605 (mapM parseInline $ elContent e)
613 (mapM parseInline $ elContent e)
606parseInline (CRef _) = return mempty
614parseInline (CRef _) = return mempty