xsl-list
[Top] [All Lists]

Re: [xsl] XML output ugly

2018-01-11 14:49:51
Hi Michele,

 

Are you viewing the output on a Mac? I think Windows uses a carriage return + 
line feed sequence (or vice versa), whereas the Mac just uses one of them. 
There may be a line ending flag for xalan that you can set for Mac/Unix line 
endings.

 

Rick

 

Rick Quatro

Carmen Publishing Inc.

rick(_at_)frameexpert(_dot_)com

585-366-4017

 

 

 

From: Michele R Combs mrrothen(_at_)syr(_dot_)edu 
[mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com] 
Sent: Thursday, January 11, 2018 3:46 PM
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com' 
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: Re: [xsl] XML output ugly

 

Bridger, thanks!!    I still get an extra line in between, but yes, that 
information does fix the indenting.  Very cool!  Now if I could just get rid of 
that extra line…

 

    <c03>

 

        <did>

 

            <unittitle>A. Van Jordan (Poetry)</unittitle>

 

            <unitid>fv_6680</unitid>

 

            <unitdate type="inclusive" normal="2007-02-28">2/28/2007</unitdate>

 

            <physdesc>

 

                <extent>DVD</extent>

 

            </physdesc>

 

            <container>Box 19</container>

 

        </did>

 

    </c03>

 

For what it’s worth, and in case anyone was wondering, there are no blank lines 
or carriage returns or anything in the input document.  It’s just a solid block 
of xml.  So these extra lines are clearly being generated by the XSLT 
processor.  I will do some hunting on “xalan” and see if anything else turns up.

 

Michele

 

 

From: Bridger Dyson-Smith bdysonsmith(_at_)gmail(_dot_)com 
<mailto:bdysonsmith(_at_)gmail(_dot_)com>  
[mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com] 
Sent: Thursday, January 11, 2018 2:59 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
<mailto:xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com> 
Subject: Re: [xsl] XML output ugly

 

Hi Michele, 

I'm not familiar with Filemaker Pro or Xalan, but I did find a Stackoverflow 
answer that looks promising[1]. 

Adding a namespace declaration and a parameter to <xsl:output/> seems work in 
the context of question there.

...
xmlns:xalan="http://xml.apache.org/xalan";
exclude-result-prefixes="xalan">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" 
xalan:indent-amount="4"/>
...

 

Hope that's helpful.

Best,

Bridger


[1] https://stackoverflow.com/questions/33766785/pretty-print-xml-file

(by email) 

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

EasyUnsubscribe <-list/612310>  (by email <> ) 
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>