Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="ISO-8859-1"?>
<BK xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
<xsl:for-each select="ONIXMessage/Product">
<Book>
<xsl:variable name="form" select="ProductFormDetail"/>
<xsl:variable name="date" select="PublicationDate"/>
<xsl:variable name="isbn" select="ProductIdentifier[ProductIDType = '15']/IDValue"/>
<image href="file:///{$isbn}.jpg" />
<year><xsl:value-of select="concat(substring($date,7,2), '/',substring($date,5,2), '/',substring($date,1,4))"/></year>
<productid><xsl:value-of select="$isbn"/></productid>
# Frontlist Variable Page Layout Catalogue XML from Bibliocloud
<?xml version="1.0"?>
<catalogue>
<section>
<section_title>Snowbooks 2014: January to April</section_title>
<half_page_book>
<category>General non-fiction</category>
<month>January</month>
<imprint>Snowbooks</imprint>
{
"current_page": 1,
"per_page": 35,
"total_pages": 1,
"works": [
{
"work": {
"books": [
{
"book": {
// view file
= f.input :use_metadata_fields, :label => "Choose one...", :as => :select, :collection => [["Fill in detailed metadata fields","1"], ["Use a default profile","0"]], :input_html => {:id => :use_metadata_fields, :class => 'input-small'}
#default_fields // a hash sign is the haml for div id
= f.input :default_fields, :as => :select, :collection => @defaults, :method_label => :description
#metadata_fields
= f.input :price
= f.input :pub_date
= f.input :imprint
= f.input :category
@EmmaB
EmmaB / dotted_line.rb
Created October 24, 2011 15:56
Dotted line in log
def ps( msg )
if Rails.env == 'development'
puts '-' * msg.length
puts msg
end
end