[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: how to get value out of the attlist ?
Jingwen, You are close. DATE[@FIND_VALUE] means select DATE elements that have a FIND_VALUE attribute. You want: DATE/@FIND_VALUE . That selects the FIND_VALUE attribute of the DATE element. See the difference? XPATH information within [ and ] is provided for context, not selection. Good luck, Richard. -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Jingwen Wang Sent: Thursday, December 02, 1999 2:43 AM To: Jingwen Wang Cc: xsl-list@xxxxxxxxxxxxxxxx Subject: Re: how to get value out of the attlist ? PLEASE HELP! I still don't have any luck yet, even after I tried: Date: <b><xsl:value-of select="DATE[@FIND_VALUE]"/></b> <br/> Thanks! Gene Jingwen Wang wrote: > Hi, > > If I have a dtd, like this: > <!ELEMENT DATE (#PCDATA)> > <!ATTLIST DATE > FIND_VALUE (True|False) "False" > OTHER_VALUE CDATA #IMPLIED> > > And I have xml like this: > <DATE> Oct 4, 1999 5:19:00 PM </DATE> > > Then in my xsl, I can get Date element by using: > Date: <b><xsl:value-of select="DATE"/></b> <br/> > > Then when I double click on my xml page the html will be shown on ie/netscape. > > But how can I get the attlist value of FIND_VALUE and OTHER_VALUE? > > Thanks much! > > Gene -- Jingwen "Gene" Wang Sr. Software engineer StockMaster.com 20300 Stevens Creek Blvd., Ste. 400 Cupertino, CA tel/ 408.861.3463 fax/ 408.861.3401 wang@xxxxxxxxxxxxxxx http://www.stockmaster.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list 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
|