forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: Adding *.html matcher to xdocs
Date Thu, 10 Jul 2003 13:12:45 GMT

Jeff Turner wrote, On 10/07/2003 14.45:

> On Thu, Jul 10, 2003 at 11:54:10AM +0200, Nicola Ken Barozzi wrote:
> 
>>Jeff Turner wrote, On 10/07/2003 11.35:
> 
> ...
> 
>>>How can Forrest *content* ever be edited by a WYSIWYG tool
>>>that outputs *presentation*?
>>
>>HTML tools output not only presentation (as you know, HTML has two set 
>>of tags, the semantic ones and the presentational ones), and any 
>>*decent* editor will give you a *reasonable* presentation of the 
>>semantical content you are editing.
>>
>>Strip out the presentation part, and there you have your content.
> 
> Okay, so ihtml2document.xsl strips out presentation, leaving content.

Yes.

> Now is the idea with <asis/> to _preserve_ some of that presentation

Basically yes.

> If so, I don't understand how that would work.  There's no clear division
> between content and presentation in HTML.  Can you provide some example
> XML using <asis/>?

Ok, examples are good (TM).

<asis/> is intended to be in our Document DTD. In html source (done in 
Mozilla Composer and hand insertion of the form):

<html>
<head>
   <meta http-equiv="content-type"
  content="text/html; charset=ISO-8859-1">
   <title>My Page</title>
   <meta name="author" content="Nicola Ken Barozzi">
</head>
<body>
<h1>Test Title</h1>
Test <b>page</b>
Other <font color="#cc0000">Content</font><br>
<hr width="100%" size="2"><br>
<form>
   <input type="submit"></form>
</body>
</html>

Ihtml would make this into:

<document>
   <header>
     <authors>
       <person name="Nicola Ken Barozzi""/>
     </authors>
   <title>My Page</title>
   </header>
   <body>
     <section>
      <title>Test Title</title>
       <p>Test <em>page</em>
       Other Content<br/>
       </br>
     </section>
   </body>
</document>

But pages like the ones that are needed for downloading distros need 
forms (the reason why we created ehtml in the first place), so we can do:

...
Other <font color="#cc0000">Content</font><br>
<hr width="100%" size="2"><br>
<div class="asis">
   <form>
     <input type="submit"></form>
</div>
</body>
...

Which will give as an intermediate DocumentDTD-like format:

...
       Other Content<br/>
       </br>
      <asis>
        <form>
          <input type="submit">
        </form>
      </asis>
     </section>
   </body>
...

And the stylesheet can decide to show the content or not. In case of 
HTML output it will, in PDF no.

The upside is that this "asis" DocumentDTD tag can be used in more than 
just html. In this case we could make a:

  <asis type="html">
    <html>
        <form>
          <input type="submit">
        </form>
    </html>
    <pdf>
        <!-- xform stuff -->
    </pdf>
    <fallback>
       <warning>This is a submit button, viewed only if using
                html output.</warning>
    </fallback>
   </asis>

to differentiate. It's a bit like introducing assembler code in an ANSI 
C (therefore potentially fully portable) code, but with the fact that 
since content is not code, we can decide to not show it at all if not 
recognized by the stylesheet.

Hope it makes more sense now.

(I have to go away for some days starting in a few hours, so at some 
point I may not be able to reply to the mails)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message