ok , got that, that made/makes sense...i had sorta figgered that
out, when i had already hit "Send"...so then, dave, whats ur take
on using css-2 to format that xml doc, into html? or would you use xsl
to transform the xml to html?

tony

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 10, 2002 3:45 PM
To: CF-Talk
Subject: RE: xml question


> 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

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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