The ``strip-elements-with-classes`` options works works. Thanks!


On Sun, Jan 30, 2011 at 4:20 AM, Guenter Milde <milde@users.berlios.de> wrote:
On 2011-01-29, Chris Yuen wrote:

> Suppose I want to show a form in a document. For the HTML version, I have
> prepared an "interactive" form that the user can actually submit e.g.:

> .. raw:: html
>     :file: my-form.html

> For other writers (ODT, PDF, etc.), I have prepared a "fallback" version of
> the same form using standard reST. Is there a way I can achieve this kind of
> "graceful degradation" in reST?

Have a look at the config option:

   List of "classes" attribute values; matching elements to be
   removed from the document tree.

   .. WARNING:: Potentially dangerous; use with caution.

   Default: disabled (None).  Option: ``--strip-element-with-class``.

E.g. in a config file you could write::

[html writer]

strip-elements-with-class: no-html

and in the document:

.. raw:: html
   :file: my-form.html

.. class:: no-html

My form

<fallback fromular>

next section

this section should be visible again.


Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
Docutils-users mailing list

Please use "Reply All" to reply to the list.