Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Formatting using DTD

From: "G. Ken Holman" <gkholman@----------------.--->
To: <xml-dev@-----.---.--->
Date: 3/4/2009 12:27:00 AM
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


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@l...
subscribe: xml-dev-subscribe@l...
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent