954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

XSLT attribute output as hyperlink

Hi all,

Just a noob with an easy question :).

Given this DTD

<!ELEMENT multimedia_format (description, examples, references)>
<!ATTLIST multimedia_format name CDATA #REQUIRED>

<!ELEMENT description (p+)>
<!ELEMENT p ((text|em|strong|abbr|quoted_text|citation)*)>
<!ELEMENT text (#PCDATA)>
<!ELEMENT em (#PCDATA)>
<!ELEMENT strong (#PCDATA)>
<!ELEMENT abbr (#PCDATA)>
<!ATTLIST abbr fulltext CDATA #REQUIRED>
<!ELEMENT quoted_text (#PCDATA)>
<!ATTLIST quoted_text href CDATA #IMPLIED>
<!ELEMENT citation (#PCDATA)>

<!ELEMENT examples (example*)>
<!ELEMENT example (heading, codeblock, link)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT codeblock (#PCDATA)>
<!ELEMENT link EMPTY>
<!ATTLIST link href CDATA #REQUIRED>

<!ELEMENT references ((book|article|webpage)*)>
<!ELEMENT book (author, title, publisher?, year)>
<!ELEMENT article (author, title, journal, volume?, year)>
<!ELEMENT webpage (author?, title, publisher?, url, date_accessed)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT year (#PCDATA)>
<!ELEMENT journal (#PCDATA)>
<!ELEMENT volume (#PCDATA)>
<!ELEMENT url (#PCDATA)>
<!ELEMENT date_accessed (#PCDATA)>


Under the examples ELEMENT, which then contains example, heading, codeblock and link which must be an empty element with attribute data, how do I use XSLT to display the data from each of the elements at the same level as link but also output the href attribute within the single link element?

Did I make sense?

Thanks Luke

duke5700
Newbie Poster
1 post since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You