Subject: New XSL, XSLT e XSL From: Bovone Stefano <Stefano.Bovone@xxxxxxxx> Date: Thu, 22 Apr 1999 09:14:27 +0200 |
I read in the new working draft 'XSLT': C.1 Formatting Objects Example The following is a simple but complete stylesheet. <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" xmlns:fo="http://www.w3.org/XSL/Format/1.0" result-ns="fo" indent-result="yes"> <xsl:template match='/'> <fo:basic-page-sequence font-family="serif"> <fo:simple-page-master page-master-name='scrolling'/> <fo:queue queue-name='body'> <xsl:apply-templates/> </fo:queue> </fo:basic-page-sequence> </xsl:template> <xsl:template match="title"> <fo:block font-weight="bold"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="p"> <fo:block> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="emph"> <fo:inline-sequence font-style="italic"> <xsl:apply-templates/> </fo:inline-sequence> </xsl:template> </xsl:stylesheet> With the following source document <doc> <title>An example</title> <p>This is a test.</p> <p>This is <emph>another</emph> test.</p> </doc> it would produce the following result <fo:basic-page-sequence xmlns:fo="http://www.w3.org/XSL/Format/1.0" font-family="serif"> <fo:simple-page-master page-master-name="scrolling"/> <fo:queue queue-name="body"> <fo:block font-weight="bold">An example</fo:block> <fo:block>This is a test.</fo:block> <fo:block>This is <fo:inline-sequence font-style="italic">another</fo:inline-sequence> test.</fo:block> </fo:queue> </fo:basic-page-sequence> Then I read in the XSL new draft: <!-- Element structure and attributes --> <!ELEMENT fo:root ( fo:layout-master-set, fo:page-sequence+ ) > <!ATTLIST fo:root id CDATA #IMPLIED > <!ELEMENT fo:layout-master-set ( fo:simple-page-master )+ > <!ATTLIST fo:layout-master-set id CDATA #IMPLIED > <!ELEMENT fo:simple-page-master ( fo:title?, fo:region-body, fo:region-before?, fo:region-after?, fo:region-start?, fo:region-end? ) > <!ATTLIST fo:simple-page-master %common-margin-properties-block; id CDATA #IMPLIED page-master-name CDATA #IMPLIED page-height CDATA #IMPLIED page-width CDATA #IMPLIED reference-orientation CDATA #IMPLIED size CDATA #IMPLIED writing-mode CDATA #IMPLIED > ... Now, I can't understand. Thanks. Bye. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XT distribution problem, James Clark | Thread | Re: New XSL, XSLT e XSL, James Clark |
Isn't it possible to use XSL to pre, motoki | Date | Re: New XSL, XSLT e XSL, James Clark |
Month |