> If i have a DTD for an xml document that i am
> getting back, as a response from a webservice, whats
> the easiest way to take that xml feed that i get
> back, and format for a web page (using that DTD?)

I think you're misunderstanding the purpose of a DTD, which is not to
provide formatting instructions, but rather to validate a given XML document
that references the DTD. A DTD lists all of the possible elements, their
possible attributes, and the hierarchical relationship between those
elements. An XML parser can then parse the XML document. If the document can
be parsed by the XML parser, it is said to be "well-formed", meaning that it
adheres to the generic syntactical rules of XML. The XML parser may then
check the document against the DTD, to make sure that it follows the rules
specified in that DTD. If the document passes that test, it is said to be
"valid".

None of this has anything to do with formatting; the main point of XML (to
greatly oversimplify things here) is to separate data from device-specific
formatting, which is the problem with HTML.

If you want to format an XML document for display on a specific device, such
as an HTML browser, you'd typically transform the XML document into another
language, like XHTML. The standard way to do this is to write an XSL
transform, which is basically an XML document itself, which contains rules
for converting a document in one XML language to some other format. Most XML
parsers are capable of taking an XML document and applying an XSL
transformation to that document. In CF MX, you'd use the XMLTransform
function for this. In CF MX, you'd use whatever XML parser you're already
using.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to