This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: plain txt output tips



Nate,
      Are you using an OutputFormat, by chance?  That is, in Java, a
org.apache.xml.serialize.OutputFormat?  We were using this an noticed that
we were getting lines wrapped at 72 characters.  If so, just call the
following method on the OutputFormat:
      setLineWidth(0);        // No wrapping.  The default should be 0, but
it appears to default to 72

Another suggestion - instead of traversing the tree like you have done
below
      PressRelease -> MetaData -> InstitutionalPAO -> xxx

you may just want to do the following:
<xsl:apply-templates select="PressRelease/MetaData/InstitutionalPAO"/>

<xsl:template match="InstitutionalPAO">
      <xsl:value-of select="FName"/><xsl:text>&#xA;</xsl:text>
      <xsl:value-of select="LName"/><xsl:text>&#xA;</xsl:text>
      ...
</xsl:template>

Matt




<!--contact info -->
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/FName"
/><xsl:text> </xsl:text><xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/LName"
/>
<xsl:text>&#xA;</xsl:text>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/JobTitle"
/>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/OrgName"
/>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/Address"
/>
<xsl:value-of
select="PressRelease/MetaData/InstitutionalPAO/SubAddress"
/>

But, I am not sure exactly how to send that variable
into another named recursive template and spit out
lines no greater than 72 characters long.

Could you perhaps help get me started here? I would
appreciate it.

--Nate





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]