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

Accessing attribute from DTD

Subject: Accessing attribute from DTD
From: David Megginson <ak117@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 8 May 1998 09:09:24 -0400
attribute in dtd
Amit Rekhi writes:

 > I can access the attribute value of a target element in XSL using 
 > 
 > target-element.getAttribute("attribute-name");
 > 
 > In such a case, the attribute value for the target-element is picked from
 > the XML file.
 > 
 > But what if the attribute value is specified in the DTD rather than the XML?
 > 
 > What API do I use to access the attribute value (of a target element)
 > specified in the DTD??

It should be exactly the same: for general XML processing, doing

 <!DOCTYPE foo [
   <!ATTLIST foo
     bar CDATA "xxx">
 ]>
 <foo/>

is exactly identical to

 <!DOCTYPE foo [
   <!ATTLIST foo
     bar CDATA #IMPLIED>
 ]>
 <foo bar="xxx"/>

There is currently a bug in the Java version of MSXML that prevents
these attributes from being reported correctly, but I know that the MS
developers are aware of the bug and I expect that it will be fixed
soon -- I don't work in Windows, so I don't know if the problem
affects Microsoft's XSL tool as well.

In the mean time, if you need to do any work involving a Java-based
XML parser, I suggest that you try one of the others, such as IBM's
XML for Java, DataChannel's DXP, Tim Bray's Lark, James Clark's XP, or
Microstar's AElfred.


All the best,


David

-- 
David Megginson                 ak117@xxxxxxxxxxxxxxxxxxx
Microstar Software Ltd.         dmeggins@xxxxxxxxxxxxx
      http://home.sprynet.com/sprynet/dmeggins/


 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.