xsl-list
[Top] [All Lists]

Re: [xsl] XML output ugly

2018-01-11 13:19:40
The serializer usually has a flag for indentation.

If you are using XSLT you can use <xsl:output indent="yes"/>

On 11 January 2018 at 18:45, Michele R Combs mrrothen(_at_)syr(_dot_)edu
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:
Hi all --



I'm currently getting XML output that looks like this:



<c03>

<did>

<unittitle>#1 Complete - 4/8/1964</unittitle>

<unitid>spock_b_323</unitid>

<unitdate type="inclusive" normal="1964-04-08">04/08/1964</unitdate>

<physdesc>

<extent>1/4 inch audio tape</extent>

</physdesc>

<container>Box 548</container>

</did>

</c03>



I want it to look pretty, like this:



<c03>

   <did>

      <unittitle>#1 Complete - 4/8/1964</unittitle>

      <unitid>spock_b_323</unitid>

      <unitdate type="inclusive" normal="1964-04-08">04/08/1964</unitdate>

      <physdesc>

         <extent>1/4 inch audio tape</extent>

      </physdesc>

      <container>Box 548</container>

   </did>

</c03>



The weird thing is, the output seems to be different depending on the XSL
processor.  When I run it manually using Saxon, it comes out the second way
(pretty).  When I hook it up to our FileMaker Pro database and it gets run
by FMP as part of an export process, it comes out the first way (ugly).



Any ideas on how to “force” the pretty output?



Michele

+++++++++

Michele Combs | Lead Archivist

Special Collections Research Center

Syracuse University Libraries

222 Waverly Ave

Syracuse, New York 13244

t 315.443-2081 | e mrrothen(_at_)syr(_dot_)edu | w scrc.syr.edu

SYRACUSE UNIVERSITY

syr.edu





XSL-List info and archive
EasyUnsubscribe (by email)



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk
--~----------------------------------------------------------------
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>