[Hypercontent-users] XML/XSL Include
Brought to you by:
alexvigdor
From: Carl B. <C.P...@hu...> - 2006-04-24 12:22:51
|
Hi Alex, On one of the sites here in Hull I have a file for each member of staff with the following dtd to define it: <!ELEMENT page (rightbox*,bodytext,leftbox?)> <!ELEMENT rightbox (html)> <!ELEMENT bodytext (photo,qualifications,researchinterests,researchcategories,biography,modulestaught,memberships,publications)> <!ELEMENT photo (html)> <!ELEMENT qualifications (html)> <!ELEMENT researchinterests (html)> <!ELEMENT researchcategories (html)> <!ELEMENT biography (html)> <!ELEMENT modulestaught (html)> <!ELEMENT memberships (html)> <!ELEMENT publications (html)> <!ELEMENT leftbox (html)> <!ATTLIST rightbox title CDATA #REQUIRED> <!ATTLIST leftbox title CDATA #REQUIRED> <!ATTLIST bodytext title CDATA #REQUIRED> <!ATTLIST bodytext firstname CDATA #REQUIRED> <!ATTLIST bodytext lastname CDATA #REQUIRED> <!ATTLIST bodytext academictitle CDATA #REQUIRED> <!ATTLIST bodytext honorarytitle CDATA #REQUIRED> <!ATTLIST bodytext extention CDATA #REQUIRED> <!ATTLIST bodytext roomnumber CDATA #REQUIRED> <!ATTLIST bodytext email CDATA #REQUIRED> <!ATTLIST page navigationtitle CDATA #REQUIRED> I want to include the firstname, lastname and email for each member of staff on an index page. At the moment I only seem to be able to include everything on a staff page The code I have is as follows: <xsl:template name="bodytext"> <xsl:for-each select="/cms:wrapper/cms:include[@pattern='/people/staff/*.xml']"> <xsl:apply-templates /> </xsl:for-each> </xsl:template> I though I would be able to use: <xsl:apply-templates select="/cms:wrapper/cms:source/page/bodytext/@firstname" /> but that isn't working. Can you see what I'm doing wrong at all? Cheers Carl -- ************************************ Carl Barrow Systems Integrator e-Services The University of Hull Cottingham Road Hull HU6 7RX Ext. 6838 ************************************ ***************************************************************************************** To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html ***************************************************************************************** |