OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: Re: conditionalization of XML


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/ "Eric S. Raymond" <esr@thyrsus.com> was heard to say:
| Norman Walsh <ndw@nwalsh.com>:
|> I think I'm willing to live without else. If I want else, I think the
|> right answer is a special-purpose XML vocabulary:
|> 
|>   <chapter>
|>     <prof:choose>
|>       <prof:when condition="html">
|>         <title>HTML Title</title>
|>       </prof:when>
|>       <prof:when condition="print">
|>         <title>Print Title</title>
|>       </prof:when>
|>       <prof:otherwise>
|>         <title>Print and HTML Title</title>
|>       </prof:otherwise>
|>     </prof:choose>
|>     ....
|> 
|> Where the profiling application always removes all prof: elements.
|
| Now tell me how this differs, other than in surface syntax, from what I've
| already done?

Your model allows

<chapter>
  <title>
  <?if condition="html"?>HTML Title
  </title>
  <?fi>
  ....

That's valid when the PIs are left in, but results in a non-XML
document when profiled. My model forces the input to be well-formed
XML and guarantees that the result will be well-formed.

Generally speaking, PI milestones are a very fragile markup mechanism.

For the complex (and hopefully rare) if-then-else case, your markup is
less verbose. But I think the common case is just

  <?if condition="html"?>
  <para>...</para>
  <?fi?>

where the fragility of PIs really don't provide any overriding benefit.
Far better, IMHO, to say

  <para condition="html">...</para>

                                        Be seeing you,
                                          norm

- -- 
Norman Walsh <ndw@nwalsh.com>      | Clearness is so eminently one of
http://www.oasis-open.org/docbook/ | the characteristics of truth that
Chair, DocBook Technical Committee | often it even passes for truth
                                   | itself.--Joubert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE9pzrjOyltUcwYWjsRAnNHAJ9feR/fIRSBcOoUp1ybkKSw/vPS+QCfR0Ct
vgAzQnBS2zBoZUJGsKSPrdc=
=mni6
-----END PGP SIGNATURE-----


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC