This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: How can I reindent an XML-file for readability?


> How can i reindent files which belong to one big xml document.
> if i have a master.xml with external entitites like this:
>
> <book><docinfo><author>anybody</author></docinfo>
>   &part1;
>   &part2;
> </book>
>
> i cant apply the given stylsheet to this masterfile because i
> get one big
> indented xml, but i want to keep the xml file splitted into
> small entities.
>
> Is there a way to indent those files with XSL?
>

Preprocess the file using SED to replace "&" by "&#xF0F0;"; then run the
transformation; then postprocess using SED to replace "&#xF0F0;" by "&".

Mike Kay


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]