Return-Path: Delivered-To: apmail-xml-xalan-j-users-archive@www.apache.org Received: (qmail 22181 invoked from network); 13 May 2004 14:41:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 May 2004 14:41:32 -0000 Received: (qmail 52999 invoked by uid 500); 13 May 2004 14:41:38 -0000 Delivered-To: apmail-xml-xalan-j-users-archive@xml.apache.org Received: (qmail 52887 invoked by uid 500); 13 May 2004 14:41:37 -0000 Mailing-List: contact xalan-j-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list xalan-j-users@xml.apache.org Received: (qmail 52848 invoked by uid 98); 13 May 2004 14:41:37 -0000 Received: from joh.lebek@gmx.de by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(32.97.182.105):. Processed in 0.265606 secs); 13 May 2004 14:41:37 -0000 X-Qmail-Scanner-Mail-From: joh.lebek@gmx.de via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(32.97.182.105):. Processed in 0.265606 secs) Received: from unknown (HELO e5.ny.us.ibm.com) (32.97.182.105) by hermes.apache.org with SMTP; 13 May 2004 14:41:36 -0000 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e5.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i4DEewYd733780; Thu, 13 May 2004 10:40:58 -0400 Received: from gmx.de (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i4DEfQaq084044; Thu, 13 May 2004 10:41:27 -0400 Message-ID: <40A38945.9070103@gmx.de> Date: Thu, 13 May 2004 16:42:13 +0200 From: Johannes Lebek Reply-To: Xalan Mailing List User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Xalan Mailing List Subject: Re: Format attributes in XML tags References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks, David. The reason I'm doing this is because the output file is some kind of configuration file. This file needs to be changed by humans. In my opinion, tags with large attribute lists can be read more easily, if their attributes are written each in a new line. Perhaps, XSLT is not the best way to do this. I'm curious to learn about other approaches to make an XML file human-readable. Thanks, Johannes david_marston@us.ibm.com wrote: > Johannes Lebek writes: > >>I'd like Xalan to format my XML output file. The requirement is to >>put each attribute in a new line. An example: >> > attr1="ahf" >> attr2="kjfr" >> attr3="dfhjdhf" >> attr4="jddjfh"/> > > > You didn't say much about why you want to do that. Perhaps you > should use the text output option instead of XML, if appearance is > so important or if you're scanning the output line-by-line with > a non-XML-aware application. As you may know, XML-aware applications > are not allowed to attach any significance to such positioning. > > If you need XML output *and* you need the output to look that way, > you could get the source code and see how xalan-indent-amount is > implemented for elements, then adapt that code to the serialization > of attributes. > .................David Marston > >