RE: Declaring internal entities in an xsl-file
I havent played around much with namespaces yet, but say that you have two namespaces in a documment, then to validate the document, do you have to merge the two dtds into one, or is there a simpler/better way?
Aside from XSLT, one common area where you might encounter this is with XLinking elements. Of course XLink isn't a final recommendation yet, but in its present state the way you declare, for example, that element <a> is an XLink is by including reserved *attributes* from the XLink namespace. So you'll find yourself coding things like this:
<a xlink:href="http://www.whatever.com" xlink:type="simple" xlink:title="Simple Link to Whatever">Go There Now</a>
If documents in the vocabulary containing the <a> element are meant for validation, then its DTD needs to provide for attributes (in this case) xlink:href, xlink:type, and xlink:title -- and the XLink namespace must also be declared, either via the DTD or in the elements that use those attributes (or somewhere along those elements' ancestor:: axis). Otherwise namespace-aware validating processors will rightly object to the attributes, if they're not declared, OR object to the unknown namespace, if *it's* not.
An example of declaring XLinking attributes like this is at:
(Sorry, but it's not fully commented yet. Search on "xlink" and you'll find the relevant stuff.)
"Merging" DTDs is pretty easy to do if you only need to deal with attributes in a particular namespace. With elements, it can get a lot harder because of the convoluted content models that can result.
[Apologies for the off-topic post]
==================================================================== John E. Simpson | My girlfriend asked me, "Did you sleep simpson@xxxxxxxxxxx | good?" I said, "No, I made a few http://www.flixml.org | mistakes." (Stephen Wright)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format