[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Looping through multiple elements

Subject: RE: Looping through multiple elements
From: "Jones Mark Mr \(ITCS\)" <Mark.Jones@xxxxxxxxx>
Date: Tue, 18 Mar 2008 17:10:34 -0000
RE:  Looping through multiple elements
Hi,

Cheers for all your help. Below and attached is the xml file that the
system outputs by default. So I think I need to loop to make a list of
elements - one for each item of metadata.

Mark Jones


####
<record>
	<header>
		<datestamp>2008-03-13T13:49:55Z</datestamp>
		<setSpec>oai</setSpec>
	</header>
<metadata>
	<xb:digital_entity>
		<pid>5555</pid>
			<mds>
			<md shared="false">
			<mid>8207</mid>
			<description xsi:nil="true"/>
			<name>descriptive</name>
			<type>dc</type>
			<value>
				<record
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
				<dc:ueainstitution>University of East
Anglia</dc:ueainstitution>
				<dc:ueafaculty>Health</dc:ueafaculty>
				<dc:ueaschool>Allied Health
Professions</dc:ueaschool>

<dc:uearaesubmission2008>True</dc:uearaesubmission2008>
				<dc:ueastatus>post-print
formatted</dc:ueastatus>

<dc:ueaunitofassessment>12</dc:ueaunitofassessment>

<dc:ueahesastaffidentifier>0611176310473</dc:ueahesastaffidentifier>
				<dc:creator>Hartley, S. D.</dc:creator>
				<dc:creatorid>wo203</dc:creatorid>
				<dc:type
xsi:type="dcterms:JournalArticle">Journal article</dc:type>
				<dc:title>Attitudes and practices of
families and health care personnel toward children with epilepsy in
Kilifi, Kenya</dc:title>
				<dc:ueavolume>8 (1)</dc:ueavolume>

<dc:ueapagination>201-212</dc:ueapagination>
				<dc:ueajournal>Epilepsy &amp;
Behaviour</dc:ueajournal>
				<dc:identifier
xsi:type="dcterms:ISSN">1525-5069</dc:identifier>
				<dc:date>2006</dc:date>

<dc:date.created>01/02/2006</dc:date.created>
				<dc:identifier
xsi:type="dcterms:URI">http://dx.doi.org/101016/j.yebeh.2005.09.011</dc:
identifier>
				<dc:creator1>El Sharkaway,
G.</dc:creator1>
				<dc:creator1id>n465</dc:creator1id>
				<dc:creator2>Newton, C.</dc:creator2>
				<dc:creator2id>t657</dc:creator2id>
				<dc:creatorall>Hartley, S. D. ; El
Sharkaway, G. ; Newton, C.</dc:creatorall></record>
			</value>
			</md>
			<md shared="false">
			<mid>8208</mid>
			<description xsi:nil="true"/>
			<name>changehistory</name>
			<type>changehistory_md</type>
			<value><xb:history
xmlns:xb="http://com/exlibris/digitool/repository/api/xmlbeans"><events>
<event xmlID="1"><eventIdentifier><eventIdentifierType>INGEST
ID</eventIdentifierType><eventIdentifierValue>ing1234</eventIdentifierVa
lue></eventIdentifier><eventType>Remote Stream
Download</eventType><eventDateTime>2008-03-12T14:45:07.711Z</eventDateTi
me><eventDetail>Download a remote (http)
stream</eventDetail><linkingAgentIdentifier><linkingAgentIdentifierType>
Staff</linkingAgentIdentifierType><linkingAgentIdentifierValue>DIGITOOL<
/linkingAgentIdentifierValue></linkingAgentIdentifier></event></events><
/xb:history></value>
			</md>
		</mds>
		</xb:digital_entity>
</metadata>
</record>

>-----Original Message-----
>From: Martin Honnen [mailto:Martin.Honnen@xxxxxx]
>Sent: Tuesday, March 18, 2008 4:37 PM
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject: Re:  Looping through multiple elements
>
>Jones Mark Mr (ITCS) wrote:
>
>> I tried this;
>>
>> <xsl:for-each select="//dc:creatorid | //dc:creator1id |
>> //dc:creator2id
>> | //dc:creator3id">
>>     <component group="authors_logins" name="value">
>>     <xsl:value-of select="."/><xsl:if test="position() != last()">,
>> </xsl:if>
>>     </component>
>> </xsl:for-each>
>>
>> And the output was just this.
>> <component name="value" group="authors_logins">n030, </component>
>>
>> The metadata has values for dc:creatorid and dc:creator1id so there
>> should be a value after the comma.
>
>Show us the relevant part of the XML input then we can say more.
>
>--
>
>	Martin Honnen
>	http://JavaScript.FAQTs.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.