Created
April 11, 2015 00:22
-
-
Save CJHArch/b166828a085fac424d98 to your computer and use it in GitHub Desktop.
From a list of links in XML, extracts information (in this case, title and partner) from XHTML finding aids
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xs" version="2.0"> | |
<xsl:output omit-xml-declaration="yes"/> | |
<xsl:template match="/"> | |
<xsl:for-each select="root/a"> | |
<xsl:variable name="FA"> | |
<xsl:value-of select="."/> | |
</xsl:variable> | |
<xsl:value-of select="normalize-space(document($FA)/xhtml:html/xhtml:head/xhtml:title)"/> | |
<xsl:text>; </xsl:text> | |
<xsl:value-of select="normalize-space(document($FA)//xhtml:div[@class='socialmedia'][1]/xhtml:a)"/> | |
<xsl:text> </xsl:text> | |
</xsl:for-each> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment