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

Re: Accessing attribute from DTD

Subject: Re: Accessing attribute from DTD
From: Amit Rekhi <amitr@xxxxxxxxxxxxx>
Date: Mon, 11 May 1998 20:18:49
accessing xml attribute in xsl
>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.

David,

	The improper BUG reporting facility of MSXML does affect their XSL tool as
well.

	 Consequently, the XML Object Model API given for accessing attributes
returns only those attributes EXPLICITLY specified in the XML file and not
those specified in the XML-DTD.

	 Therefore, the same API does not apply.

>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.

	Thanx for your suggestions. But since I am working with the MS XSL tool I
assume I will have to work with the MSXML parser and find a solution to the
improper attribute reporting bug. Is this assumption right or can I use a
different parser? If, yes how to use it?

	Infact, I have already thought of a solution. Using the MS XML code which
generates a tree format for the XML-DTD I can use a DOM implementation to
access those XML attributes specified in the XML-DTD.Is this solution
worthwhile? Are there any other solutions to this problem???
			Thanks,

								Regards,
								AMIT
 


At 09:09 AM 5/8/98 -0400, you wrote:
>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
>
>


 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.