duke5700 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.