[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Declaring internal entities in an xsl-file

Subject: RE: Declaring internal entities in an xsl-file
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Fri, 04 Feb 2000 19:54:39 -0500
declaring internal dtd
At 11:06 PM 02/04/2000 +0100, Mattias Beermann wrote:
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:
http://www.flixml.org/flixml/flixml_03.dtd
(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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.