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: Re: DOCBOOK-APPS: Re: conditionalization of XML

On Fri, Oct 11, 2002 at 03:09:05PM -0400, Norman Walsh wrote:
> Hash: SHA1
> Some more thoughts about this issue...
> 1. Entities should be expanded. If users process
>    <!DOCTYPE book PUBLIC "..." "..." [
>    <!ENTITY chap1.xml SYSTEM "chap1.xml">
>    ]>
>    <book>
>      ...
>      &chap1;
>    </book>
>    They're going to expect the profiling to apply to the content of
>    &chap1;, not just the wrapper script. That means this code needs to be
>    implemented as an XML process, not a character-stream process. And really,
>    I think it needs to be done at the parser level, not in something like flex.
>    Though I suppose you could implement a specialty XML parser with flex.
> 2. The downside of expanding entities is that &nbsp; is going to become &#160;.
>    Is this really a problem? You're not going to edit the profiled content,
>    right?
> 3. OTOH, I really do want this to happen before validation. That way I can write
>    <chapter>
>      <title condition="print">Print Title</title>
>      <title condition="online">Online Title</title>
>    and have the right thing happen.

On the third hand, you can't load such documents into
a validating editor.  You'd have to wait until you process
it with conditions resolved to find out if it is valid.  Or
you write a smart validating editor that understands your
conditional syntax, and lets you set the conditions that
apply for a given session.  Text outside the conditions
could be dimmed and excluded from validation.  Now *that*
is the way to write conditional documents.

What happened to the old method of using <phrase>:
      <title><phrase condition="print">Print Title</phrase>
             <phrase condition="online">Online Title</phrase></title>

which can be validated?
> 4. That means that losing the <!DOCTYPE declaration is unfortunate.
>    But that could be fixed, I think, with a specialty XML parser.

I'm not clear what this means.
> 5. You know, I really want this at the URI level.
>    <!DOCTYPE book PUBLIC "..." "...">
>    <book>
>      ...
>      <xi:include href="http://localhost/profile/path/to/document.xml?condition='html'"/>
>    </book>
> Now we're getting somewhere!

Would that be part of XPointer or XInclude?


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com

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

Powered by eList eXpress LLC