[pmwiki-users] <div> markup suggestions...?

John Rankin john.rankin at affinity.co.nz
Mon Feb 28 19:02:27 CST 2005


On Tuesday, 1 March 2005 12:08 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>> b. We are starting to encounter a problem with the wiki -> pdf
>>    converter and the ever-expanding list of markup rules.
>>    [...]
>>    We'd like to be able to say to PmWiki:
>>    - we are generating output to the xyz dtd
>>    - if you find any markup translations for xhtml,
>>      replace <.*?> output with '' (for example)
>>    - tell us about any xhtml you find
>
>Do you need to have the system read and parse the 'xyz dtd' 
>directly and figure things out (i.e., support arbitrary custom DTDs), 
>or is it sufficient to simply be aware of standard DTDs 
>that may have been pre-processed into a data structure or
>set of patterns somewhere?

We don't know the best answer yet, but here are some thoughts
and questions:

- could pmwiki include a 'validate' action that takes the
  output generated, validates it against the specified dtd and
  reports errors?

- at a minimum, we need to specify a different markup output
  for each item of wiki markup, and catch any we have missed,
  eg because it's a local customisation

- ideally, we could specify the markup identifier (the first
  parameter in the Markup function) and the markup output
  (the 4th parameter in Markup) -- the sequence and match
  rule don't change

- we would tell pmwiki 'you are generating output to the
  xyz dtd'

For example, we might write:
$OutputDTD = 'xyz'; # defaults to xhtml
$DTDUrl = 'http://...'; # address where the dtd is defined
$ReplaceUndefinedMarkupWith ''; # what to do with left-overs

And then:

AltMarkup('id','output','dtd');

For example:

AltMarkup("''",'<visual markup=\'it\'>$1</visual>','tbook');

           ^                   ^                      ^
         markup              output                  dtd

I don't know if this is the best solution, but it's a start.
>


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list