[Web4lib] RE: [XML4Lib] Style Sheet for RefWorks Display

Binkley, Peter Peter.Binkley at ualberta.ca
Tue Nov 6 15:08:24 EST 2007


Given the amount of data, you might want to look at indexing this all
into Solr and coming up with a simple search interface (using one of the
Solr client packages, e.g. for ruby or php). That would allow you to
offer faceted searching by date of publication, author, etc.

Regarding your xslt question: assuming you want output like "Author,
First; Author, Second; Author, Third. Title. ...", the basic structure
would be:

<xsl:for-each select="a1">
	<xsl:value-of select="."/>
	<xsl:choose>
		<xsl:when test="position() = last()">
			<xsl:text>. </xsl:text>
		</xsl:when> 
		<xsl:otherwise>
			<xsl:text>; </xsl:text>
		</xsl:otherwise>
	</xsl:choose>
</xsl:for-each>

Or you could do the same thing with a template that matches "a1". I hope
this helps!

Peter



Peter Binkley
Digital Initiatives Technology Librarian
Information Technology Services
4-30 Cameron Library
University of Alberta Libraries
Edmonton, Alberta
Canada T6G 2J8
Phone: (780) 492-3743
Fax: (780) 492-9243
e-mail: peter.binkley at ualberta.ca

~ The code is willing, but the data is weak. ~



-----Original Message-----
From: xml4lib-bounces at webjunction.org
[mailto:xml4lib-bounces at webjunction.org] On Behalf Of Hutchinson, Alvin
Sent: Tuesday, November 06, 2007 9:35 AM
To: web4lib at webjunction.org; xml4lib at webjunction.org
Subject: [XML4Lib] Style Sheet for RefWorks Display

Please excuse the cross posting . . . .

I am creating a bibliography of staff publications using the web-based
bibliographic management software, RefWorks which can export to
tab-delimited or XML formats (among other things).

Of course I can import a delimited file into a SQL database and serve
the content up via scripting language, but I am wondering whether the
XML format might offer some more flexibility or other advantages. Any
ideas?

My questions:

The master_bibliography.xml file will probably grow to 30-50mb or more.
Is this too large to adequately filter and display data on several dozen
different pages using XSLT or some other method?

Has anyone worked with RefWorks-exported XML? Sample data is shown here:

<a1>Author, First</a1>
<a1>Author, Second</a1>
<a1>Author, Third</a>
Etc.
<t1>Title of article or book chapter</t1> <yr>Pub Year</yr> Etc.

I have written simple style sheets but I'm afraid I don't know how to
display repeated elements like <a1>. Any hints?

Thanks in advance for any advice and please pardon me if this is a dumb
question.

Alvin Hutchinson
Smithsonian Institution Libraries
(202) 633-1031
 

_______________________________________________
XML4Lib mailing list
XML4Lib at webjunction.org
http://lists.webjunction.org/mailman/listinfo/xml4lib



More information about the Web4lib mailing list