The lang.html module¶
Html language and transformation definition (for lilypond-book).
-
class
Html[source]¶ Bases:
quickly.dom.base.XmlLike,parce.lang.html.HtmlHtml language definition, with support for the lilypond-book tags.
Those are:
<lilypond ... />for short code,<lilypond> ... </lilypond>for longer code,<lilypondfile>filename</lilypondfile>for a LilyPond file, and<musicxmlfile>filename</musicxmlfile>for a MusicXml file.These tags also support the attribute notation that’s outlined in the LilyPond documentation.
-
root= Html.root¶
-
lilypond_book_options= Html.lilypond_book_options¶
-
-
class
HtmlTransform[source]¶ Bases:
quickly.dom.base.TransformTransform Html (for lilypond-book) to
quickly.dom.htmelements.Note that this transform currently ignores the following lexicons:
css_style_attribute,css_style_tag,doctype,internal_dtdandscript_tag.This means the constructed
htm.Documentcannot write back the full document. You should only rely on the lilypond-tags and their content.The alternative would be to disable css and javascript in the inherited parce language definition, but then we loose the nice highlighting of CSS and JS parts.
-
factory(element_class, head_origin, tail_origin=(), *children)[source]¶ Create a node, keeping its origin.
The
head_originand optionallytail_originis an iterable of Token instances. All items should be created using this method, so that it can be overridden for the case you don’t want to remember the origin.
-
css_style_attribute= None¶
-
css_style_tag= None¶
-
doctype= None¶
-
internal_dtd= None¶
-
script_tag= None¶
-
attrs(items)[source]¶ Process the
attrscontext.Returns a list of
htm.Attributeelements and atail_origintuple.
-
-
class
HtmlAdHocTransform[source]¶ Bases:
quickly.dom.base.AdHocTransform,quickly.lang.html.HtmlTransformHtml Transform that does not keep the originating tokens.