[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

transforming from xml to text -- creates a blank line

Subject: transforming from xml to text -- creates a blank line on the first line
From: UlyLee <ulyleeka@xxxxxxxxx>
Date: Mon, 24 Oct 2005 22:55:42 -0700 (PDT)
xml blank line
Hi!

I'm running an xsl file that converts a xml file to a
text file (in InDesign Tags format) however there is
always a blank line on the 1st line on the output
which i think is reserved for the xml declaration. I
used omit-xml-declaration on xsl:output but the line
is still there, how can i remove that line?

Also, in generating the text output a lot of blank
lines are created how can i avoid these? Does the
xsl:apply-templates create an automatic newline?

XSL:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.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"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes"
xmlns:func="functions">
<xsl:output method="text" indent="no"
encoding="UTF-8"/>
<xsl:template match="/">
&#60;ASCII-WIN&#62;
&#60;vsn:4&#62;&#60;fset:InDesign-Roman&#62;&#60;ctable:=&#60;Black:COLOR:CMYK:Process:0,0,0,1&#62;&#62;
&#60;dps:BT=&#60;ct:Regular&#62;&#60;cs:10.500000&#62;&#60;clig:0&#62;&#60;cbs:0.000000&#62;&#60;phll:2&#62;&#60;pfli:11.291061&#62;&#60;palp:1.199996&#62;&#60;cl:12.903991&#62;&#60;pmcbh:3&#62;&#60;pmcah:3&#62;&#60;phc:0&#62;&#60;pswh:6&#62;&#60;phz:0.000000&#62;&#60;cf:Baskerville
&#62;&#60;pdws:1.300003&#62;&#60;pmaws:1.600006&#62;&#60;pmiws:1.000000&#62;&#60;pmaxl:0.250000&#62;&#60;pminl:-0.050004&#62;&#60;ch:Baseline&#62;&#60;prac:Black&#62;&#60;prat:100.000000&#62;&#60;prbc:Black&#62;&#60;prbt:100.000000&#62;&#60;pta:JustifyLeft&#62;&#62;
&#60;dps:CT=&#60;BasedOn:BT&#62;&#60;cs:11.000000&#62;&#60;ccase:All
Caps&#62;&#60;pfli:0.000000&#62;&#60;psb:12.904067&#62;&#60;pta:Center&#62;&#62;
&#60;dps:BY=&#60;BasedOn:BT&#62;&#60;pfli:0.000000&#62;&#60;psb:12.904067&#62;&#60;psa:12.904067&#62;&#60;pta:Center&#62;&#62;
&#60;dps:AUTHOR=&#60;BasedOn:BT&#62;&#60;ccase:All
Caps&#62;&#60;cl:12.904052&#62;&#60;pta:Center&#62;&#62;
&#60;dps:AFFIL=&#60;BasedOn:BT&#62;&#60;cs:9.500000&#62;&#60;cl:12.904052&#62;&#60;pta:Center&#62;&#62;
&#60;dps:ABSTRACT
HEAD=&#60;BasedOn:BT&#62;&#60;ct:Italic&#62;&#60;cs:9.000000&#62;&#60;cl:12.904052&#62;&#60;psb:20.430999&#62;&#60;psa:6.452041&#62;&#60;pta:Center&#62;&#62;
&#60;dps:ABSTRACT=&#60;BasedOn:BT&#62;&#60;cs:8.500000&#62;&#60;pli:19.356109&#62;&#60;cl:9.678039&#62;&#60;psa:12.904067&#62;&#60;prali:19.356109&#62;&#60;prbli:19.356109&#62;&#62;
&#60;dps:H1=&#60;BasedOn:BT&#62;&#60;pfli:0.000000&#62;&#60;psb:19.356109&#62;&#60;psa:6.452041&#62;&#60;pta:Left&#62;&#62;
&#60;dps:FN=&#60;Nextstyle:FN&#62;&#60;ct:Regular&#62;&#60;cs:8.500000&#62;&#60;clig:0&#62;&#60;cbs:0.000000&#62;&#60;phll:2&#62;&#60;pfli:9.140380&#62;&#60;palp:1.199996&#62;&#60;cl:9.678039&#62;&#60;pmcbh:3&#62;&#60;pmcah:3&#62;&#60;phc:0&#62;&#60;pswh:6&#62;&#60;phz:0.000000&#62;&#60;cf:Baskerville
&#62;&#60;pdws:1.300003&#62;&#60;pmaws:1.600006&#62;&#60;pmiws:1.000000&#62;&#60;pmaxl:0.250000&#62;&#60;pminl:-0.050004&#62;&#60;ch:Baseline&#62;&#60;prac:Black&#62;&#60;prat:100.000000&#62;&#60;prbc:Black&#62;&#60;prbt:100.000000&#62;&#60;pta:JustifyLeft&#62;&#62;
<xsl:apply-templates />
</xsl:template>
<xsl:template match="head">
<xsl:if test="parent::body">
<xsl:variable name="str" as="xs:string*"
select="tokenize(.,'\n')"/>
<xsl:for-each select="$str">
<xsl:choose>
<xsl:when test="position()=1">
&#60;pstyle:CT&#62;<xsl:value-of select="."/>
</xsl:when>
<xsl:when test="position()=2">
&#60;pstyle:BY&#62;<xsl:value-of select="."/>
</xsl:when>
<xsl:when test="position()=3">
&#60;pstyle:AUTHOR&#62;<xsl:value-of select="."/>
</xsl:when>
<xsl:when test="position()=4">
&#60;pstyle:AFFIL&#62;<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
&#60;pstyle:ABSTRACT HEAD&#62;<xsl:value-of
select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:if>
<xsl:if test="parent::div1">
&#60;pstyle:H1&#62;<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="hi">
<xsl:choose>
<xsl:when test="@rend='italic' and parent::head">
&#60;0x2002&#62;&#60;ct:Italic&#62;<xsl:apply-templates/>&#60;ct:&#62;
</xsl:when>
<xsl:when test="@rend='italic'">
&#60;ct:Italic&#62;<xsl:apply-templates/>&#60;ct:&#62;
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="q">
&#60;pstyle:ABSTRACT&#62;&#60;psa:0.000000&#62;<xsl:value-of
select="."/>
</xsl:template>
<xsl:template match="p[ancestor::body]">
&#60;pstyle:BT&#62;<xsl:apply-templates/>
</xsl:template>
<xsl:template match="note">
&#60;cp:Superscript&#62;&#60;0x2002&#62;&#60;fnStart:&#62;&#60;pstyle:FN&#62;<xsl:apply-templates/>&#60;fnEnd:&#62;&#60;cp:&#62;
</xsl:template>
</xsl:stylesheet>

XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TEI.2 SYSTEM "Journals_4 despatch_2.dtd">
<TEI.2>
<teiHeader>
<fileDesc>
<titleStmt><title/></titleStmt>
<publicationStmt><p/></publicationStmt>
<sourceDesc><p/></sourceDesc>
</fileDesc>
</teiHeader>
<text><body><head>Cosmic Lordship and Divine
Gift-Giving: Psalm 68 in Ephesians 4:8
by
Timothy G. Gombis
Cedarville University
Abstract</head>
<q>The use of Psalm 68 in Eph. 4:8 has proved to be
one of the most di&ffilig;cult interpretive problems
in this enigmatic letter. In this article I will
engage and critique a leading interpretive proposal
and then o&fflig;er an alternative reading that
exploits the elements of divine triumph and divine
warfare in Ephesians, and that satisfactorily accounts
for the quotation and elaboration by the writer in vv.
9-10.</q>
<div1><head>1. <hi
rend="italic">Introduction</hi></head>
<p>The writer of Ephesians quotes Ps. 68:18 (MT 68:19;
LXX 67:19) in Eph. 4:8 in order to give scriptural
warrant for Christ&apos;s giving of gifts to the
church. The major interpretive di&ffilig;culty in this
text is that while in Ps. 68:18 Yahweh
&ldquo;receives&rdquo;
(&tavhb;&hethb;&qofhb;&lamedhb;;
&epsoxgr;&lgr;&agr;&bgr;&egr;&sfgr;) gifts from men,
in Eph. 4:8 Christ &ldquo;gives&rdquo;
(&epsoxgr;&dgr;&ohgr;&kgr;&egr;&ngr;) gifts to the
church, a change by the writer which, according to C.
L. Mitton, &ldquo;almost reverses the meaning of the
actual text.&rdquo;<note place="foot" n="1">C.L.
Mitton, <hi rend="italic">Ephesians</hi> (London:
Oliphants, 1976) 145.</note> It is also di&ffilig;cult
to discern just what the author means by speaking of
the descent and ascent of Christ, and what
relationship this movement has to the quotation from
Psalm 68. These problems are well-known, but thus far
have proved intractable. After surveying the current
interpretive options, P. T. O&rsquo;Brien concludes
that &ldquo;None of the above-mentioned suggestions
fully solves this di&ffilig;cult crux.&rdquo;<note
place="foot" n="2">P.T. O&rsquo;Brien, <hi
rend="italic">Ephesians</hi> (PNTC; Grand Rapids:
Eerdmans, 1999) 293. For a rehearsal of proposed
solutions, see R. Schwindt, <hi rend="italic">Das
Weltbild des Epheserbriefes: Eine
religionsgeschichtlich-exegetische Studie</hi> (WUNT
148; T&uuml;bingen: Mohr Siebeck, 2002) 399-429; M.
Bouttier, <hi
rend="italic">L&rsquo;&Eacute;p&icirc;tre de Saint
Paul aux &Eacute;ph&eacute;siens</hi> (CNT 9B;
Gen&egrave;ve: Labor et Fides, 1991) 180-2; E. Best,
<hi rend="italic">Ephesians</hi> (ICC; Edinburgh:
T&amp;T Clark, 1998) 378-82.</note> After providing a
critique of what is currently a widely accepted and
well-supported interpretation, I will o&fflig;er a new
proposal regarding the use of Psalm 68 in Eph.
4:8.</p></div1>


Output i'm getting:
i always have a blank line here <-- line 1
<ASCII-WIN> <-- line 2
<vsn:4><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
<dps:BT=<ct:Regular><cs:10.500000><clig:0><cbs:0.000000><phll:2><pfli:11.291061><palp:1.199996><cl:12.903991><pmcbh:3><pmcah:3><phc:0><pswh:6><phz:0.000000><cf:Baskerville
><pdws:1.300003><pmaws:1.600006><pmiws:1.000000><pmaxl:0.250000><pminl:-0.050004><ch:Baseline><prac:Black><prat:100.000000><prbc:Black><prbt:100.000000><pta:JustifyLeft>>
<dps:CT=<BasedOn:BT><cs:11.000000><ccase:All
Caps><pfli:0.000000><psb:12.904067><pta:Center>>
<dps:BY=<BasedOn:BT><pfli:0.000000><psb:12.904067><psa:12.904067><pta:Center>>
<dps:AUTHOR=<BasedOn:BT><ccase:All
Caps><cl:12.904052><pta:Center>>
<dps:AFFIL=<BasedOn:BT><cs:9.500000><cl:12.904052><pta:Center>>
<dps:ABSTRACT
HEAD=<BasedOn:BT><ct:Italic><cs:9.000000><cl:12.904052><psb:20.430999><psa:6.452041><pta:Center>>
<dps:ABSTRACT=<BasedOn:BT><cs:8.500000><pli:19.356109><cl:9.678039><psa:12.904067><prali:19.356109><prbli:19.356109>>
<dps:H1=<BasedOn:BT><pfli:0.000000><psb:19.356109><psa:6.452041><pta:Left>>
<dps:FN=<Nextstyle:FN><ct:Regular><cs:8.500000><clig:0><cbs:0.000000><phll:2><pfli:9.140380><palp:1.199996><cl:9.678039><pmcbh:3><pmcah:3><phc:0><pswh:6><phz:0.000000><cf:Baskerville
><pdws:1.300003><pmaws:1.600006><pmiws:1.000000><pmaxl:0.250000><pminl:-0.050004><ch:Baseline><prac:Black><prat:100.000000><prbc:Black><prbt:100.000000><pta:JustifyLeft>>

<pstyle:CT>Cosmic Lordship and Divine Gift-Giving:
Psalm 68 in Ephesians 4:8
<pstyle:BY>by
<pstyle:AUTHOR>Timothy G. Gombis
<pstyle:AFFIL>Cedarville University
<pstyle:ABSTRACT HEAD>Abstract
<pstyle:ABSTRACT><psa:0.000000>The use of Psalm 68 in
Eph. 4:8 has proved to be one of the most difficult
interpretive problems in this enigmatic letter. In
this article I will engage and critique a leading
interpretive proposal and then offer an alternative
reading that exploits the elements of divine triumph
and divine warfare in Ephesians, and that
satisfactorily accounts for the quotation and
elaboration by the writer in vv. 9-10.
<pstyle:H1>1. 
<0x2002><ct:Italic>Introduction<ct:>

--UlyLee


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.