[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Formatting using DTD

  • From: "G. Ken Holman" <gkholman@C...>
  • To: <xml-dev@l...>
  • Date: Tue, 03 Mar 2009 19:22:21 -0500

Re:  Formatting using DTD
At 2009-03-04 00:14 +0000, Graeme Kidd wrote:
>Its my first time posting here so I hope I am in the correct mailing list.

Welcome!

>I am using a XML program

Do you mean a generic XML editor, or some custom GUI that is 
capturing your input into a particular vocabulary?

>that has two views; one user friendly wysiwyg view and a plain text 
>view of the underlining XML. When editing XML files in the wysiwyg 
>view the backend XML gets really messy as no formatting is applied 
>which causes lines to become long and unreadable.

By formatting, do you mean indentation?

Indentation is appropriate when you have element content, but it can 
be a problem when you have mixed content (sibling elements and text).

>I have been told that pretty printing can be configured on a DTD basis

If I understand what you are asking for, this isn't true ... such 
indentation would be a feature of the editing tool, not a property of 
the document model.

>but I am not sure what that means and a quick search brings up 
>things about XSLT.

Yes, a simple identity transform with <xsl:output indent="yes"/> does 
an effect job of indentation on the output.  I especially like the 
indentation choices made by Saxon.

>Does anyone know how certain formatting can be forced onto an XML 
>file via a DTD file?

I'm quite sure this is not possible.  If you can cite where you read 
about the configuration, perhaps someone on the list will recognize 
what you see.  Perhaps your program is looking for reserved 
attributes in the document model.

I hope this helps.

. . . . . . . . . . . Ken

--
XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@C...
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.