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

Norman Walsh <ndw@nwalsh.com>:
> 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.

Right.  I know this.  This is why I suggested that the facility might belong in
the XSLT engine itself.
> 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?

Yes, it is really a problem.  Precisely because you cannot predict in advance
what kind of postprocessing the user will want to do.

For any filter to throw away semantic information that it doesn't
absolutely have to is bad design.  If your tools force you to do this,
your tools are broken.  XSLT is a broken tool for this purpose.

> 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.

I do exactly this.  

<?if condition='book'?>
The New Hacker's Dictionary
Jargon File
(version &version;)

This is one of the reasons I'm skeptical about a pure-XML approach.  If you're
going to have to process before validation, why care about the XNL 
structure at all?
		<a href="http://www.tuxedo.org/~esr/";>Eric S. Raymond</a>

Attachment: pgp00009.pgp
Description: PGP signature

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

Powered by eList eXpress LLC