In principle I agree that adding non-content to XML documents is "unclean". However, in reality we're pretty much stuck with xml- stylesheet PIs. And remember the adage that says there's no programming problem that can't be solved by an extra layer of indirection. Putting css elements in XXE configuration files is one way of achieving cleanliness within the XXE context, but if you squint, XML catalogs can be seen as a much more broadly accepted and implemented way of achieving the same thing. Yes, you have to put a placeholder in the XML file, but the meaning of the placeholder is defined *outside* the file.
Maybe I'll start using something like: <?xml-stylesheet type="text/css" href="Some-stylesheet-specified- externally-This-is-a-semantics-free-placeholder-only-here-because- there-is-no-other-way-to-trigger-the-catalog-mechanism"?> :-) - dam On Jan 6, 2006, at 4:39 AM, Hussein Shafie wrote: ... >> >> I like this approach because it makes clear that the only really XXE- >> dependent file a user needs to create is the configuration file, >> which >> is as it should be - everything else is taken care of by the catalog >> mechanism, which can be used by many tools outside XXE. It also gets >> rid of the confusion of copying stylesheets and DTD's into the addon >> directory etc. >> >> If I hadn't been so dense I would have read between the lines of the >> explanation in the configuration guide and realized long ago that I >> could do this, but... better late than never. This approach is so >> simple that I'm confident the next time I have a new document type to >> handle, I actually *will* create a document template. :-) >> > > Nice approach. I would just add (if such style sheet exists) > > --- > <css name="Colored Style Sheet" > location="file:///Users/dmundie/C/XML/color.css" /> > --- > > because, IMHO, adding <?xml-stylesheet?> PIs to XML documents is not > clean. (In fact, in my opinion, adding anything which is not pure > content to an XML document is not clean, even <!DOCTYPE> or > xsi:schemaLocation.) > > -- > XMLmind XML Editor Support List > xmleditor-support at xmlmind.com > http://www.xmlmind.com/mailman/listinfo/xmleditor-support

