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

This is a hard problem. If it was an easy problem, we wouldn't have to
keep reinventing solutions for it.

Right up front I think you have to choose: are you going to process
XML or are you going to process a character stream. Both are useful
and both have historically been employed. The conditional section
feature of SGML is really the character stream approach and profiling
attributes are the XML approach.

If you choose a character stream, I think, you're really not
processing XML. There's no reason to say you have an XML tool and I
have to support Daniel's reluctance to incorporate it into libxml.

If you're going to go the XML route, there are definitely some
artifacts of XSLT processing that are inconvenient.

What I don't understand off the top of my head Eric, is why you
abandoned the XML approach when you abandoned XSLT.

I'd be much more interested in your tool if it was a WF XML processor
that conditionalized XML elements based on their attributes. In other words,
instead of processing:

| Preamble
| <!-- this is the test on the manual page -->
| Always issue this text.
| <?if condition='html'>
| Issue this text if 'condition=html' is given on the command line.
| <?elif condition='pdf|ps'>
| Issue this text if 'condition=pdf' or 'condition=ps'
| is given on the command line.
| <?else>
| Otherwise issue this text.
| <?fi>
| Always issue this text.

Why not process:

<doc>
<title>Preamble</title>
<!-- this is the test on the manual page -->
<para>Always issue this text.
<phrase condition="html">Issue this text if 'condition=html' is given on the
command line.</phrase>
<phrase condition="pdf|ps">Issue this text if 'condition=pdf' or 'condition=ps'
is given on the command line.</phrase>
<phrase condition="somethingelse">Otherwise issue this text.</phrase>
</para>
<para>Always issue this text.</para>
</doc>

It's harder to write the "else" cases in this style, but I think a
little creativity in the syntax of the condition attributes might
alleviate some of those problems.

                                        Be seeing you,
                                          norm

- -- 
Norman Walsh <ndw@nwalsh.com>      | The perfect man has no method; or
http://www.oasis-open.org/docbook/ | rather the best of methods, which
Chair, DocBook Technical Committee | is the method of
                                   | no-method.--Shih-T'ao
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE9pwtgOyltUcwYWjsRAveOAJ9/HKNZgSkqK/qYYROczok8F5boGACfak2i
BRgMlgn5SHfDhX2/zMTA8ZE=
=aPaF
-----END PGP SIGNATURE-----


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


Powered by eList eXpress LLC