Subject: RE: Composing dynamic HREF's on-the-fly From: Jerry Ventura <jventura@xxxxxxxxxx> Date: Mon, 20 Dec 1999 10:22:33 -0500 |
If you haven't already found an answer, you can generate the tags on the fly using the xslelement and xsl:attribute: So you can do something like: <xsl:element name = "a"> <xsl:attribute name = "href"> <xsl:value-of select = "HREF"/> </xsl:attribute> <xsl:value-of select ="PATIENT_NAME"/> </xsl:element> This lets you plug in the url as an attribute to the <a> element. -----Original Message----- From: Brian Dale [mailto:brian@xxxxxxxxxxxxx] Sent: Thursday, December 16, 1999 5:44 PM To: 'XSL-List@xxxxxxxxxxxxxxxx' Subject: Composing dynamic HREF's on-the-fly Hello! I hope someone on the list can help. I've only been working with XSL for about two weeks, so please excuse me if this is a stupid question. I've looked at several examples & tutorials & tried to comprehend the W3C spec, but I'm still stumped. Here's what I'm looking at... SOFTWARE: ---------------------- Using Oracle's XSQLservlet (newest version as of last week from http://technet.oracle.com) to produce the XML file attached & using same to transform the XML via XSL to HTML for web presentation. OBJECTIVE: ---------------------- Trying to dynamically compose an <A> tag in an HTML document on the fly based on contents of the XML like this HTML fragment: "<A HREF="/New/viewdoc.xsql?DocumentID=1">Patient, Testing</A> <A HREF="/New/viewdoc.xsql?DocumentID=2">Patient, Second</A> <A HREF="/New/viewdoc.xsql?DocumentID=3">Patient, Testing</A>" with the HREF and PATIENT_NAME changing for each ROW in the ROWSET using the below XML file. PROBLEM: ---------------------- Unable to get both correct HREF & correct PATIENT_NAME at same time. Am able to get one or the other, but not both at the same time in the correct place. I've tried various <xsl:apply-template select=""> template variants without success. What am I missing??? XML FILE: --------------------- <?xml version="1.0"?> <ROWSET> <ROW num="1"> <HREF>/New/viewdoc.xsql?DocumentID=1</HREF> <PATIENT_NAME>Patient, Testing</PATIENT_NAME> <SERVICE_DATE>12/14/1999 00:29</SERVICE_DATE> </ROW> <ROW num="2"> <HREF>/New/viewdoc.xsql?DocumentID=2</HREF> <PATIENT_NAME>Patient, Second</PATIENT_NAME> <SERVICE_DATE>12/14/1999 00:34</SERVICE_DATE> </ROW> <ROW num="3"> <HREF>/New/viewdoc.xsql?DocumentID=3</HREF> <PATIENT_NAME>Patient, Testing</PATIENT_NAME> <SERVICE_DATE>12/14/1999 17:57</SERVICE_DATE> </ROW> </ROWSET> ----------------------------- Any ideas? Any input would be mucho appreciando! Thanks in advance! ---===o0O] Brian @ HyperSoft.Net [O0o==--- 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Composing dynamic HREF's on-the-fly, Brian Dale | Thread | call-template with variable, Benjamin Corliss |
Re: well-formed output XML (was: wh, Phil Lanch | Date | Recover text from element, Andoni García Olano |
Month |