Subject: [xsl] 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) |
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="/"> <ASCII-WIN> <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>> <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"> <pstyle:CT><xsl:value-of select="."/> </xsl:when> <xsl:when test="position()=2"> <pstyle:BY><xsl:value-of select="."/> </xsl:when> <xsl:when test="position()=3"> <pstyle:AUTHOR><xsl:value-of select="."/> </xsl:when> <xsl:when test="position()=4"> <pstyle:AFFIL><xsl:value-of select="."/> </xsl:when> <xsl:otherwise> <pstyle:ABSTRACT HEAD><xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:if> <xsl:if test="parent::div1"> <pstyle:H1><xsl:apply-templates/> </xsl:if> </xsl:template> <xsl:template match="hi"> <xsl:choose> <xsl:when test="@rend='italic' and parent::head"> <0x2002><ct:Italic><xsl:apply-templates/><ct:> </xsl:when> <xsl:when test="@rend='italic'"> <ct:Italic><xsl:apply-templates/><ct:> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="q"> <pstyle:ABSTRACT><psa:0.000000><xsl:value-of select="."/> </xsl:template> <xsl:template match="p[ancestor::body]"> <pstyle:BT><xsl:apply-templates/> </xsl:template> <xsl:template match="note"> <cp:Superscript><0x2002><fnStart:><pstyle:FN><xsl:apply-templates/><fnEnd:><cp:> </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 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.</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's giving of gifts to the church. The major interpretive difficulty in this text is that while in Ps. 68:18 Yahweh “receives” (&tavhb;&hethb;&qofhb;&lamedhb;; &epsoxgr;&lgr;&agr;&bgr;&egr;&sfgr;) gifts from men, in Eph. 4:8 Christ “gives” (&epsoxgr;&dgr;&ohgr;&kgr;&egr;&ngr;) gifts to the church, a change by the writer which, according to C. L. Mitton, “almost reverses the meaning of the actual text.”<note place="foot" n="1">C.L. Mitton, <hi rend="italic">Ephesians</hi> (London: Oliphants, 1976) 145.</note> It is also difficult 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’Brien concludes that “None of the above-mentioned suggestions fully solves this difficult crux.”<note place="foot" n="2">P.T. O’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übingen: Mohr Siebeck, 2002) 399-429; M. Bouttier, <hi rend="italic">L’Épître de Saint Paul aux Éphésiens</hi> (CNT 9B; Genève: Labor et Fides, 1991) 180-2; E. Best, <hi rend="italic">Ephesians</hi> (ICC; Edinburgh: T&T Clark, 1998) 378-82.</note> After providing a critique of what is currently a widely accepted and well-supported interpretation, I will offer 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XPath 2.0 / XSLT 2.0 stat, David Carlisle | Thread | Re: [xsl] transforming from xml to , David Carlisle |
[xsl] foreach, preceding-sibling::n, Mingqiang Yu | Date | Re: [xsl] RE: String manipulation i, James Fuller |
Month |