Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
spec:dfn-patterns [2013/07/30 11:41] – Filled in page tabatkinsspec:dfn-patterns [2013/07/30 11:45] – [Manually Specifying the Definition Type] tabatkins
Line 4: Line 4:
  
 This page documents the patterns and attributes that are recognized by [[http://wiki.csswg.org/tools|Shepherd, our spec parsing tool, and Tab's preprocessor]].  By using these in your own specs, you make your life and the lives of other editors easier, and contribute to better automatically-generated CSS documentation. This page documents the patterns and attributes that are recognized by [[http://wiki.csswg.org/tools|Shepherd, our spec parsing tool, and Tab's preprocessor]].  By using these in your own specs, you make your life and the lives of other editors easier, and contribute to better automatically-generated CSS documentation.
 +
 +===== Summary =====
 +
 +All ''<dfn>'' elements have a definition type.  This can usually be inferred from the contents or context, but might need to be explicitly specified.
 +
 +Some types of definitions are part of some higher construct.  This should be indicated with a ''data-dfn-for'' attribute on the definition or a container.
 +
 +Getting this metadata right is easy and helps with auto-crossreferencing (in Tab's preprocessor) and automatically generated documentation (in Shepherd), so please get it right.
  
 ===== <dfn> Types ===== ===== <dfn> Types =====
Line 106: Line 114:
 Finally, one may manually specify the definition type.  This is very simple - just add a ''data-dfn-type'' attribute to the definition, with its value set to one of the definition types above (the types, like "property", not the classes or prefixes like "propdef"). Finally, one may manually specify the definition type.  This is very simple - just add a ''data-dfn-type'' attribute to the definition, with its value set to one of the definition types above (the types, like "property", not the classes or prefixes like "propdef").
  
-If using [[http://wiki.csswg.org/tools|Tab's preprocessor]], this is easier - just add the definition type as a boolean attribute.  That is, instead of writing ''<dfn data-dfn-type=function>foo()</dfn>''just write ''<dfn function>foo()</dfn>''.  The preprocessor will automatically canonicalize this into a valid ''data-dfn-type'' attribute in the output.+If using [[http://wiki.csswg.org/tools|Tab's preprocessor]], this is easier - just add the definition type as a boolean attribute.  That is, instead of writing
 + 
 +''<dfn data-dfn-type=function>foo()</dfn>'' 
 + 
 +just write  
 + 
 +''<dfn function>foo()</dfn>'' 
 + 
 +The preprocessor will automatically canonicalize this into a valid ''data-dfn-type'' attribute in the output.
  
 ===== Specifying What A Definition Is For ===== ===== Specifying What A Definition Is For =====
 
spec/dfn-patterns.txt · Last modified: 2014/12/09 15:48 by 127.0.0.1
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki