Loading ...
Sorry, an error occurred while loading the content.
 

Re: HTML->FO

Expand Messages
  • John Kidd
    No no... your comments are validating... (I am new to XSLT). I am in the process of breaking down the XSLT into discrete templates..... Thanks John ... easily
    Message 1 of 6 , Sep 21, 2005
      No no... your comments are validating... (I am new to XSLT). I am in
      the process of breaking down the XSLT into discrete templates.....

      Thanks

      John


      --- In XSL-FO@yahoogroups.com, Mike Trotman <mike.trotman@d...> wrote:
      > I can't see anywhere in here that you are specifying what to do with
      > HTML elements.
      >
      > Have you added the example Mark Gaywood gave earlier?
      >
      > I confess there is too much detail and lack of formatting here to
      easily
      > digest
      > but it looks like the XSLT is one monolithic template
      > (although your document transformation might need that).
      >
      > Generally you will have more success, greater clarity (and less code)
      > if you break it down into templates that match input elements
      > and just produce the local output required.
      >
      > Incrementally adding examples like Mark's to this latter sort of XSLT
      > to customise the processing is then easy to do and simple to check.
      >
      > Sorry can't help more.
      >
      >
      > Mike
      >
      > John Kidd wrote:
      >
      > >--- In XSL-FO@yahoogroups.com, "John Kidd" <jkiddiii@y...> wrote:
      > >
      > >
      > >>I have a basic XML file that I need to get to PDF. Currently I have it
      > >>working except for one issue. In the body of the main portion of the
      > >>content are HTML tags for bold, italic, undeline, etc. This formatting
      > >>is not being passed through to the PDf at this point and I cannot seem
      > >>to find out how to make this happen. Any help would be greatly
      > >>appreciated.
      > >>
      > >>
      > >>John
      > >>
      > >>
      > >
      > >To be real concrete below is the XML:
      > ><?xml version='1.0' encoding='UTF-8'?>
      > ><!DOCTYPE newsletter [
      > ><!ENTITY nbsp " ">
      > ><!ENTITY ndash "–">
      > ><!ENTITY ldquo "“">
      > ><!ENTITY rdquo "”">
      > ><!ENTITY lsquo "‘">
      > ><!ENTITY rsquo "’">
      > >]>
      > >
      > > <newsletter xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
      > > <content>
      > > <newspiece type="Corporate" loc="JMC" pos="1">
      > > <image href=""/>
      > > <full_image href=""/>
      > > <title><![CDATA[Extraordinary Efforts for Extraordinary
      > >Profits ]]></title>
      > > <body><strong><em><span>Extraordinary Efforts for
      > >Extraordinary Profits<p>  <br
      > >/><br /></p></span></em></strong><p> </p><p>This week, we begin a
      > >two-part
      > >series on rent.</p> <p> </p><h5>Base
      rent</h5><ul><li><u>Contractual
      > >increases</u> - Verify that contractual increases claimed by the
      > >landlord are
      > >supported by the contract and that they are done at the right time.
      It is
      > >common for landlords to claim base rent increases prior to the proper
      > >effective
      > >date (commencement dates and beginning rent dates).
      > ><p> </p></li></ul> <p> </p><ul><li><u>Reporting
      > >requirements</u> -
      > >Ensure compliance with reporting requirements (e.g., monthly sales
      > >reporting
      > >for percentage rent provisions). Some leases allow penalties or fees
      > >if you
      > >fail to provide such reporting (i.e., another revenue source or
      > >landlords and a
      > >wasted cost to you). <p> </p></li></ul> <p>
      > ></p><ul><li><u>Document
      > >conversations</u> – Document every conversation with your
      > >landlord on
      > >payments, base rent, cam costs, etc. It builds credibility, documents
      > >verbal
      > >agreements and diffuses arguments.<p> </p></li></ul> <p>
      > ></p><h5>Common
      > >area maintenance (cam), tax & insurance costs</h5>1) 
      > ><strong><u>Know
      > >your contract</u></strong><u>:<p> </p></u><ul><li><u>Contract</u>
      > >– Know
      > >your lease contract, especially what is included in (or excluded from)
      > >cam and
      > >cam cap provisions.<p> </p></li></ul> <p> </p><ul><li><u>Cam
      > >rebilling</u>
      > >– Landlords should provide an annual reconciliation for your
      > >portion of
      > >total actual costs incurred at your center vs. your monthly escrow
      > >payments for
      > >three types of costs:  common area maintenance (cam), taxes and
      > >insurance.
      > >Get a summary of cam costs by category and compare it to the prior
      > >year for
      > >large or unusual fluctuations. Request copies of all taxes/insurance
      > >invoices
      > >and a summary listing of large cam items.<p> </p></li></ul> <p>
      > ></p><ul><li><u>Cam review</u> – Review your rebillings with a
      fresh
      > >perspective each year for new costs or bogus recurring costs (i.e., we
      > >were
      > >charged for a new “elevator” this year that we did not
      > >pay).<p>
      > ></p></li></ul> <p> </p><ul><li><u>Cam cap</u> – If you have
      > >a cam
      > >cap, ensure that it is enforced each year. If no cam cap exists, be
      > >especially
      > >mindful of their near “free reign” to include almost any
      > >kind of
      > >cost.<p> </p></li></ul> <p> </p><ul><li><u>Non-cumulative cam
      > >cap</u>
      > >– Argue that your cap is not cumulative (unless the contract
      > >specifically
      > >says it is cumulative). If non-cumulative, cam costs can’t be
      > >more than
      > >_% over the prior year no matter how low that one year is compared to
      > >any other
      > >year. (They want cumulative so that one low year does not hurt
      them.)<p>
      > ></p></li></ul> <p> </p>2)   <strong><u>Cam rebilling
      > >detail</u></strong><u>:<p> </p></u><ul><li><u>Water, trash &
      > >electricity</u> – Don’t pay for these separately &
      > >then again
      > >through cam.<p> </p></li></ul> <p> </p><ul><li><u>Insurance &
      > >Tax</u>
      > >– Always require copies of these invoices as support before
      > >paying.<p>
      > ></p></li></ul> <p> </p><ul><li><u>Insurance</u> – Typically
      > >try to
      > >get insurance included in cam if you have a cam cap because it can
      > >fluctuate
      > >more than other cam costs (especially in the last couple years).<p>
      > ></p></li></ul> <p> </p><ul><li><u>Tax</u> – Ensure the
      > >invoices
      > >received are for only the property in question. Review the legal
      > >descriptions
      > >& comparability from year to year. We have had landlords increase
      > >taxes
      > >because they added to their property but did not reduce our prorata %
      > >of costs.
      > ><p> </p></li></ul> <p> </p><ul><li><u>Tax</u> – Review
      > >tax
      > >amounts for reasonableness. Some landlords simply pass along tax bills
      > >without
      > >challenging the amounts. Consider asking your landlord to hire a tax
      > >consultants to help.<p> </p></li></ul></body>
      > > </newspiece>
      > > </content>
      > > <content>
      > > <newspiece type="Corporate" loc="Training" pos="1">
      > > <image href=""/>
      > > <full_image href=""/>
      > > <title><![CDATA[Training Newsletter & Headline]]></title>
      > > <body>Test</body>
      > > </newspiece>
      > > </content>
      > > <content>
      > > <newspiece type="Corporate" loc="Marketing" pos="1">
      > > <image href=""/>
      > > <full_image href=""/>
      > > <title><![CDATA[Marketing Approval Test]]></title>
      > > <body>Can John Approve this Content?<br/></body>
      > > </newspiece>
      > > </content>
      > > <content>
      > > <newspiece type="Corporate" loc="Construction" pos="1">
      > > <image href=""/>
      > > <full_image href=""/>
      > > <title><![CDATA[Construction Headline]]></title>
      > > <body>This is text for the construction newsletter<br/>></body>
      > > </newspiece>
      > > </content>
      > > <content>
      > > <newspiece type="Region" loc="DFW" pos="">
      > > <image href=""/>
      > > <full_image href=""/>
      > > <title><![CDATA[New TItle]]></title>
      > > <body><p>THIS IS A NEW DOCUMENT WITH MANY NEW
      >
      >THINGS</p><p> </p><ol><li>Lists</li><li>Two</li></ol><p> </p><p><font
      > >
      > >face="webdings">Different Fonts</font></p><p><font face="trebuchet
      > >ms,geneva">NEW FONTS</font></p><font face="Trebuchet MS"><font
      > >face="Trebuchet
      > >MS"><p><font face="Trebuchet MS" size="6">NEW
      > >SIZES</font></p></font></font></body>
      > > </newspiece>
      > > </content>
      > > </newsletter>
      > >
      > >
      > >And here is the XSLT I am trying to use to go to PDF.. this works but
      > >the HTML style tags do not translate:
      > ><?xml version="1.0" encoding="UTF-8"?>
      > ><xsl:stylesheet version="1.0"
      > >xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      > >xmlns:fo="http://www.w3.org/1999/XSL/Format"
      > >xmlns:xs="http://www.w3.org/2001/XMLSchema">
      > > <xsl:variable name="fo:layout-master-set">
      > > <fo:layout-master-set>
      > > <fo:simple-page-master master-name="default-page"
      > >page-height="11in" page-width="8.5in" margin-left="0.6in"
      > >margin-right="0.6in">
      > > <fo:region-body margin-top="0.79in"
      > >margin-bottom="0.79in" />
      > > </fo:simple-page-master>
      > > </fo:layout-master-set>
      > > </xsl:variable>
      > > <xsl:output version="1.0" encoding="UTF-8" indent="no"
      > >omit-xml-declaration="no" media-type="text/html" />
      > > <xsl:template match="/">
      > > <fo:root>
      > > <xsl:copy-of select="$fo:layout-master-set" />
      > > <fo:page-sequence master-reference="default-page"
      > >initial-page-number="1" format="1">
      > > <fo:flow flow-name="xsl-region-body">
      > > <fo:block>
      > > <fo:external-graphic space-before.optimum="4pt"
      > >space-after.optimum="4pt">
      > > <xsl:attribute name="src">url('<xsl:text
      > >disable-output-escaping="yes">file:///C:\tmp\cicisnews.jpg</xsl:text>')
      > ></xsl:attribute>
      > > </fo:external-graphic>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <xsl:for-each select="newsletter">
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <xsl:for-each select="content">
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <xsl:if test="newspiece/@type =
      > >"Corporate"">
      > > <xsl:for-each select="newspiece">
      > > <fo:block>
      > > <fo:leader
      > >leader-pattern="space" />
      > > </fo:block>
      > > <fo:block>
      > > <fo:leader
      > >leader-pattern="space" />
      > > </fo:block>
      > > <xsl:if test="full_image/@href
      > >!=""">
      > > <xsl:for-each
      > >select="full_image">
      > > <xsl:for-each
      > >select="@href">
      > >
      > ><fo:external-graphic space-before.optimum="4pt"
      space-after.optimum="4pt">
      > > <xsl:attribute
      > >name="src">url('<xsl:value-of select="." />')</xsl:attribute>
      > >
      </fo:external-graphic>
      > > </xsl:for-each>
      > > </xsl:for-each>
      > > </xsl:if>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block font-size="12pt"
      > >font-weight="bold" space-before.optimum="1pt"
      space-after.optimum="2pt">
      > > <fo:block>
      > > <xsl:for-each
      > >select="@loc">
      > > <xsl:value-of
      > >select="." />
      > > </xsl:for-each>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block font-size="10pt"
      > >font-weight="bold" space-before.optimum="1pt"
      space-after.optimum="2pt">
      > > <fo:block>
      > > <fo:block
      > >font-size="18pt" font-weight="bold" space-before.optimum="1pt"
      > >space-after.optimum="2pt">
      > > <fo:block>
      > > <xsl:for-each
      > >select="title">
      > >
      > ><xsl:apply-templates />
      > > </xsl:for-each>
      > > </fo:block>
      > > </fo:block>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block
      > >space-before.optimum="1pt" space-after.optimum="2pt">
      > > <fo:block>
      > > <xsl:for-each
      > >select="body">
      > > <fo:block
      > >space-before.optimum="1pt" space-after.optimum="2pt">
      > > <fo:block>
      > >
      > ><xsl:apply-templates />
      > > </fo:block>
      > > </fo:block>
      > > </xsl:for-each>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <fo:leader
      > >leader-pattern="space" />
      > > </fo:block>
      > > </xsl:for-each>
      > > </xsl:if>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > </xsl:for-each>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > </xsl:for-each>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block font-size="24pt" font-weight="bold"
      > >space-before.optimum="1pt" space-after.optimum="2pt">
      > > <fo:block>
      > > <fo:inline font-weight="bold">Your
      > >Region Content</fo:inline>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <xsl:for-each select="newsletter">
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <xsl:for-each select="content">
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > <xsl:if test="newspiece/@type =
      > >"Region"">
      > > <xsl:for-each select="newspiece">
      > > <fo:block>
      > > <fo:leader
      > >leader-pattern="space" />
      > > </fo:block>
      > > <fo:block>
      > > <fo:leader
      > >leader-pattern="space" />
      > > </fo:block>
      > > <xsl:if test="full_image/@href
      > >!=""">
      > > <xsl:for-each
      > >select="full_image">
      > > <xsl:for-each
      > >select="@href">
      > >
      > ><fo:external-graphic space-before.optimum="4pt"
      space-after.optimum="4pt">
      > > <xsl:attribute
      > >name="src">url('<xsl:value-of select="." />')</xsl:attribute>
      > >
      </fo:external-graphic>
      > > </xsl:for-each>
      > > </xsl:for-each>
      > > </xsl:if>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block font-size="12pt"
      > >font-weight="bold" space-before.optimum="1pt"
      space-after.optimum="2pt">
      > > <fo:block>
      > > <xsl:for-each
      > >select="@loc">
      > > <xsl:value-of
      > >select="." />
      > > </xsl:for-each>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block font-size="10pt"
      > >font-weight="bold" space-before.optimum="1pt"
      space-after.optimum="2pt">
      > > <fo:block>
      > > <fo:block
      > >font-size="18pt" font-weight="bold" space-before.optimum="1pt"
      > >space-after.optimum="2pt">
      > > <fo:block>
      > > <xsl:for-each
      > >select="title">
      > >
      > ><xsl:apply-templates />
      > > </xsl:for-each>
      > > </fo:block>
      > > </fo:block>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > <fo:block
      > >space-before.optimum="1pt" space-after.optimum="2pt">
      > > <fo:block>
      > > <xsl:for-each
      > >select="body">
      > > <fo:block
      > >space-before.optimum="1pt" space-after.optimum="2pt">
      > > <fo:block>
      > >
      > ><xsl:apply-templates />
      > > </fo:block>
      > > </fo:block>
      > > </xsl:for-each>
      > > </fo:block>
      > > </fo:block>
      > > <fo:block>
      > > <fo:leader
      > >leader-pattern="space" />
      > > </fo:block>
      > > </xsl:for-each>
      > > </xsl:if>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > </xsl:for-each>
      > > <fo:block>
      > > <fo:leader leader-pattern="space" />
      > > </fo:block>
      > > </xsl:for-each>
      > > <fo:block>
      > > <xsl:text> </xsl:text>
      > > </fo:block>
      > > </fo:block>
      > > </fo:flow>
      > > </fo:page-sequence>
      > > </fo:root>
      > > </xsl:template>
      > ></xsl:stylesheet>
      > >
      > >
      > >
      > >
      > >
      > >
      > >Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >Message Scanned by ClamAV on datalucid.com
      > >
      > >
      > >
      >
      > --
      > Datalucid Limited
      >
      >
      > Message Scanned by ClamAV on datalucid.com
    Your message has been successfully submitted and would be delivered to recipients shortly.