Subject: RE: html to dsssl ? From: "Didier PH Martin" <martind@xxxxxxxxxxxxx> Date: Sat, 10 Jul 1999 10:50:06 -0400 |
Hi Carlos, Carlos said: I was wondering if it is possible to link jade with something like PHP3. Actually, I don't know much about PHP3, but it looks like it may implement this template mechanism. Didier Says: What is PHP3? Do you have a link that points to more information? About mixing Templates and styles: This is an idea I am juggling right now. So the timing is right for your comment. As we all know, a DSSSL document is a SGML document. In the case of OpenJade, you can just include the DocType and have only a DSSSL script without the Style markups. We learned about the template mechanism from different languages like: - ASP - JSP - XSL - Balise dual prism There are maybe others, but I personally know only these languages. All share a common characteristic, they are template based. In the case of XSL and Balise Dual Prism they are both template based and Style based. We have several ways to implement templates in OpenJade: a) a SGML rule template construct: -------------------------------------------- <rule-template match="...a path"> <html> <body> <process-children> </body> </html> </rule-template> In this case, the template construct is like the XSL template construct. However, to make it more versatile we could declare that the content is of CDATA. This way, we can generate any kind of output like Tex or RTF or whatever is character based. A more restrictive rule would be to declare the content as PCDATA and then have it parsed. In the example above, the <process-children> element is a reserved element. The overall idea in this case is that we have a template rule element like found in XSL. b) a SGML document template: --------------------------------------------- <style-specification> <document-template> <speechml> <sentence tone="medium", voice="female"> What about a template for spoken document? </sentence> <process-style id="DSSSL_script"> </speechml> </document-template> <style-specification-body id="DSSSL_script"> (element par (make paragraph (process-children) ) ) </style-spcification-body> </style-specification> In this case, the template is the output document. Within a document template, we can refer to style elements. This way, a style document would contain both one or more DSSSL scripts uniquely identified by IDs and a document template. A document template could refer to a DSSSL style script by the <process-style....> reserved element. The more, I think about this issue, the more I think that the solution is to see a DSSSL style document as a SGML document and add to it new elements allowing template processing. Even more, we could also open the door to other script languages by having the style-specification-body set by default to the actual DSSSL language but also if it could be set to other languages like Python , PERL or JavaScript. In this case we would have the element style-specification-body as <style-specification-body language="Python"> and the body expressed in Python. these are just ideas that needs to be discussed to gain more maturity. In my own opinion, the key to include new constructs like templates is to look at style document as a SGML document first. PS: the good point about having a template based construct like XSL is that SGML documents could be processed as well as XML documents. Do not forget that XSL is intended for XML documents not for SGML documents (off course some may say that it is possible that a XSL processor could do SGML processing - Off course everything is possible under this sun :-) nonetheless, it is not very probable that a XSL processor would parse SGML documents). We may not have to copycat XSL, but take the best from it and adapt it to a larger target language SGML (which, as you know also includes XML). regards Didier PH Martin mailto:martind@xxxxxxxxxxxxx http://www.netfolder.com DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: html to dsssl ?, Carlos Villegas | Thread | RE: html to dsssl ?, Sebastian Rahtz |
Re: Page margins, Darrell W. Royter | Date | About Constructions rules, Didier PH Martin |
Month |