[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[xsl] weird formatting and characters with
[xsl] weird formatting and characters with
Subject: [xsl] weird formatting and characters with <xsl:text disable-output-escaping> From: Spencer Tickner <spencertickner@xxxxxxxxx> Date: Tue, 26 Apr 2005 10:39:40 -0700 |
Hello everyone and thank's in advance for you're help. I have a pretty simple little xsl that is translating some xml into text to be imported to inDesign. The problem is using the <xsl:text disable-output-escaping> is causing my output to be horrendous. To the point that inDesign will not except it. Carriage returns are being shown as unknown characters and lines run as long as textpad will allow them. I realize this is what I should expect from disable-output-escaping, but if you anyone has any suggestions to get some better output. I would really appreciate it. Here is my xsl: <?xml version='1.0'?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="grouped_regions" match="table/eddoc" use="edcode"/> <xsl:output method="text" name="text" omit-xml-declaration="yes" encoding="us-ascii"/> <xsl:template match="/"> <xsl:for-each select="table/eddoc[count(. | key('grouped_regions', edcode)[1]) =1]"> <xsl:sort select="edcode"/> <xsl:variable name="mycode" select="edcode"/> <xsl:variable name="filename"> <xsl:value-of select="concat('file:///W:/Statutes/Source/Tagged/', $mycode, '.txt')"/> </xsl:variable> <xsl:result-document href="{$filename}" format="text"> <xsl:text disable-output-escaping="yes"> <ASCII-WIN> <Version:3.000000> <FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Proce ss:0.000000,0.000000,0.000000,1.000000><Paper:COLOR:CMYK:Process:0.0000 00,0.000000,0.000000,0.000000>> <DefineParaStyle:File Name=<Nextstyle:File Name><cTypeface:Bold><cSize:7.000000><cLeading:14.000000> ;<pHyphenation:0><pHyphenateCapitals:0><pSpaceAfter:6.000000&g t;<cFont:Arial>> <DefineParaStyle:Line 3 Registered Political Party=<BasedOn:Line 2 First Name \&amp; Surname><Nextstyle:Line 1 Surname><pSpaceAfter:24.000000>> <DefineParaStyle:Line 2 First Name \&amp; Surname=<BasedOn:Line 1 Surname><Nextstyle:Line 3 Registered Political Party><cSize:12.000000><cCase:Normal><pSpaceAfter:0.000000& gt;> <DefineParaStyle:Line 1 Surname=<Nextstyle:Line 2 First Name \& Surname><cColor:Paper><cTypeface:Bold><cSize:20.000000>& lt;cCase:All Caps><cLeading:14.000000><pHyphenation:0><pHyphenateCapital s:0><pSpaceAfter:6.000000><cFont:Arial><pTextAlignment:Righ t>> </xsl:text> <xsl:text disable-output-escaping="yes"> <ParaStyle:File Name></xsl:text><xsl:value-of select="edcode"/> <xsl:text disable-output-escaping="yes"> <ParaStyle:File Name></xsl:text><xsl:value-of select="edname"/> <xsl:for-each select="key('grouped_regions', edcode)"> <xsl:sort select="sequence"/> <xsl:text disable-output-escaping="yes"> <ParaStyle:Line 1 Surname></xsl:text><xsl:value-of select="edlastname"/> <xsl:text disable-output-escaping="yes"> <ParaStyle:Line 2 First Name \& Surname></xsl:text><xsl:value-of select="edballname"/> <xsl:text disable-output-escaping="yes"> <ParaStyle:Line 3 Registered Political Party></xsl:text><xsl:value-of select="edpartbalname"/> </xsl:for-each> </xsl:result-document> </xsl:for-each> </xsl:template> </xsl:stylesheet> A sample of my xml <table xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ballot.xsd"> <eddoc> <edcode>ABC</edcode> <edname>SomeWhere</edname> <edballname>Some guy</edballname> <edpartbalname>That Party</edpartbalname> <edlastname>guy</edlastname> <edsequence>1</edsequence> </eddoc> <eddoc> <edcode>ABC</edcode> <edname>SomeWhere</edname> <edballname>The Other guy</edballname> <edpartbalname>This Party</edpartbalname> <edlastname>other guy</edlastname> <edsequence>2</edsequence> </eddoc> </table Ultimately I would love it if the output from all of this would be something like this: <ASCII-WIN> <Version:3.000000> <FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0.000000,0. 000000,0.000000,1.000000><Paper:COLOR:CMYK:Process:0.000000,0.000000,0.000000 ,0.000000>> <DefineParaStyle:File Name=<Nextstyle:File Name><cTypeface:Bold><cSize:7.000000><cLeading:14.000000><pHyphenation:0><pHy phenateCapitals:0><pSpaceAfter:6.000000><cFont:Arial>> <DefineParaStyle:Line 3 Registered Political Party=<BasedOn:Line 2 First Name \& Surname><Nextstyle:Line 1 Surname><pSpaceAfter:24.000000>> <DefineParaStyle:Line 2 First Name \& Surname=<BasedOn:Line 1 Surname><Nextstyle:Line 3 Registered Political Party><cSize:12.000000><cCase:Normal><pSpaceAfter:0.000000>> <DefineParaStyle:Line 1 Surname=<Nextstyle:Line 2 First Name \& Surname><cColor:Paper><cTypeface:Bold><cSize:20.000000><cCase:All Caps><cLeading:14.000000><pHyphenation:0><pHyphenateCapitals:0><pSpaceAfter:6 .000000><cFont:Arial><pTextAlignment:Right>> <ParaStyle:File Name>ABC <ParaStyle:File Name>SomeWhere <ParaStyle:Line 1 Surname>guy <ParaStyle:Line 2 First Name \& Surname>Some Guy <ParaStyle:Line 3 Registered Political Party>That Party <ParaStyle:Line 1 Surname>other guy <ParaStyle:Line 2 First Name \& Surname>Some other guy <ParaStyle:Line 3 Registered Political Party>This Party I could paste the output I'm getting now, but it's so out of this world that this email box won't do it justice. Anyway, any advice or help you can offer would be much appreciated. Spencer
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] An Interesting Wrinkle Re, Nadia . Swaby | Thread | Re: [xsl] weird formatting and char, David Carlisle |
Re: [xsl] Revision Marking in HTML, Wendell Piez | Date | Re: [xsl] XSL-FO - Keeps & Breaks, JBryant |
Month |