Skip to content

Respect lowercase product tags #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 102 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
ea1c45e
Extract lib/onix/version.rb with only the version info
PatriRor Jul 16, 2014
e3c9a2d
Set gemfile to :rubygems instead of :gemcutter
PatriRor Jul 16, 2014
9b73fc6
ruby 1.9 minimum
PatriRor Jul 16, 2014
508374e
Added rspec-given
PatriRor Jul 16, 2014
4fa4415
update 'sender_identifier' spec to use Given syntax
PatriRor Jul 17, 2014
80c3ee0
upadate 'header_spec' to use Given syntax
PatriRor Jul 17, 2014
c3282a0
'product_identifier_spec' using Give syntax
PatriRor Jul 17, 2014
1a6f191
update 'series_identifier_spec'
PatriRor Jul 17, 2014
b96a21c
update 'series_spec.rb'
PatriRor Jul 17, 2014
6b8b448
update 'title_spec.rb'
PatriRor Jul 17, 2014
db197a4
update 'website_spec.rb'
PatriRor Jul 17, 2014
0c355d5
autoload instead of long list of requires (in lib/onix.rb)
PatriRor Jul 17, 2014
dfc8879
Merge pull request #5 from whoiswasabi/autoload_instead_of_requires
rewritten Jul 17, 2014
99326e5
Merge pull request #4 from whoiswasabi/ruby_version
rewritten Jul 17, 2014
ed90074
Merge pull request #3 from whoiswasabi/rubygems
rewritten Jul 17, 2014
f2e81cb
Removed andand in favour of active_support's :try
rewritten Jul 17, 2014
2e3884f
This is a clear example on the advantage of given.
rewritten Jul 17, 2014
10bcceb
The previous failure is corrected here. Thanks Jim Weirich :) RIP
rewritten Jul 18, 2014
2418e27
Given specs for audience_range
rewritten Jul 18, 2014
fa77fda
delete old code
PatriRor Jul 18, 2014
d72532e
clearer code
PatriRor Jul 18, 2014
e6ceac2
Given specs for contributor
PatriRor Jul 18, 2014
2951567
Given specs for language
PatriRor Jul 18, 2014
8655ab7
Given specs for subject
PatriRor Jul 18, 2014
d1e85f6
Given specs for imprint
PatriRor Jul 18, 2014
47e2751
Given spec for publisher
PatriRor Jul 18, 2014
652d14b
Given specs for other_text
PatriRor Jul 18, 2014
dba53d1
Given specs for media_file
PatriRor Jul 18, 2014
5e5a492
Given specs for sales_restriction
PatriRor Jul 18, 2014
5f600ce
Given specs for stock
PatriRor Jul 18, 2014
9c41817
Given specs for price
PatriRor Jul 18, 2014
cf52c05
Given specs for supply_detail
PatriRor Jul 18, 2014
84c3f76
Given specs for market_representation
PatriRor Jul 18, 2014
baad0aa
Given specs for measure
PatriRor Jul 18, 2014
ad5d50b
Given specs for product
PatriRor Jul 18, 2014
7663beb
Merge pull request #2 from whoiswasabi/version_info
rewritten Jul 18, 2014
1afe8d3
factor out the file loader code into a method in the spec helper and …
PatriRor Jul 21, 2014
42161e5
Given specs for apa_product
PatriRor Jul 21, 2014
5b8a039
Given specs for normaliser
PatriRor Jul 22, 2014
940c20a
Merge remote-tracking branch 'origin/master' into rspec_given
rewritten Jul 23, 2014
0a2929a
Merge pull request #6 from whoiswasabi/rspec_given
rewritten Jul 23, 2014
d6ef28a
add gem 'representable'
PatriRor Jul 24, 2014
736bda5
representer use in imprint
PatriRor Jul 24, 2014
d940994
use decorator instead of extend
PatriRor Jul 24, 2014
52cb3f8
add gem 'virtus'
PatriRor Jul 24, 2014
900efa3
overwrite to_xml and from_xml of imprint and virtus use instead of roxml
PatriRor Jul 24, 2014
2be86f5
revert spec to original state
PatriRor Jul 24, 2014
01e3a8c
travis configuration
rewritten Jul 24, 2014
f926d66
Added Travis status badge
rewritten Jul 24, 2014
6649491
Merge branch 'origin/master' into virtus_and_representable
PatriRor Jul 24, 2014
eafb1f2
revert delete gem 'roxml'
PatriRor Jul 24, 2014
aad60c1
use Proc in :getter
PatriRor Jul 24, 2014
cd3a1d7
Update sender_identifier
PatriRor Jul 24, 2014
51b653f
fixes in addressee_identifier
PatriRor Jul 24, 2014
a20fa34
add xml file example and given spec
PatriRor Jul 24, 2014
d4a1965
Update addressee_identifier
PatriRor Jul 24, 2014
de16d81
Update product_identifier
PatriRor Jul 25, 2014
a9e924c
Update series_identifier
PatriRor Jul 25, 2014
e161267
Add specs for access to series IDs
PatriRor Jul 25, 2014
a1e5526
Update series
PatriRor Jul 25, 2014
682e6a5
Allow using a generic render filter for representer properties
rewritten Jul 26, 2014
a534237
Using render_filter instead of getter
PatriRor Jul 26, 2014
c63d605
Update title
PatriRor Jul 26, 2014
b6133c8
Update website
PatriRor Jul 26, 2014
9ea53ca
Update contributor
PatriRor Jul 26, 2014
14e22b3
Update language
PatriRor Jul 26, 2014
6af0558
Update subject
PatriRor Jul 26, 2014
311aa9c
Two digit format works with vectors
PatriRor Jul 28, 2014
f4459df
Update audience_range
PatriRor Jul 28, 2014
9b612e4
Update publisher
PatriRor Jul 28, 2014
3f853d8
Update other_text
PatriRor Jul 28, 2014
ddcec52
Update media_file
PatriRor Jul 28, 2014
2488815
Update sales_restriction
PatriRor Jul 28, 2014
6a984b1
Update stock
PatriRor Jul 28, 2014
ee5238e
Add xml file example and given spec for discount_coded
PatriRor Jul 28, 2014
4c4b1c8
Update discount_coded
PatriRor Jul 28, 2014
5441ec2
Update price
PatriRor Jul 28, 2014
72c6702
Update supply_detail
PatriRor Jul 28, 2014
eeaf299
Update market
PatriRor Jul 29, 2014
dbafd37
Update measure
PatriRor Jul 29, 2014
ff89b48
Update header
PatriRor Jul 29, 2014
eb1ae7f
Update product
PatriRor Jul 29, 2014
7bf30bb
Remove gem roxml
PatriRor Jul 30, 2014
e3a5c16
Added new Representer with support for short tags to Imprint and new …
PatriRor Jul 30, 2014
baa9500
Remove old methods of Formatters class
PatriRor Jul 30, 2014
1087712
:scissors: representer for short tags, only reference tags
PatriRor Jul 31, 2014
0d1c935
small fix
PatriRor Jul 31, 2014
d153474
Merge branch 'virtus_and_representable'
PatriRor Jul 31, 2014
b34828f
rename to onix2
exAspArk Oct 22, 2014
e9cffd1
add DiscountPercent
exAspArk Nov 6, 2014
9e82efa
update travis-ci badge in readme
exAspArk Nov 6, 2014
7c7f58c
Updating specs, renaming lib/onix to lib/onix2 to avoid naming confli…
nikolaeff Nov 13, 2014
65b6d5f
Merge branch 'dev'
nikolaeff Nov 20, 2014
4bd9c7f
remove Normalizer
exAspArk Dec 4, 2014
ca0f2b1
add SalesRight, bump onix2 to v1.0.0
exAspArk Dec 4, 2014
e43e17f
Merge branch 'sales_rights'
exAspArk Dec 4, 2014
0a23045
fix specs on CI
exAspArk Dec 4, 2014
da0233e
pluralize sales_rights
exAspArk Dec 4, 2014
d1b051d
update gemspec to push it to rubygems
exAspArk Dec 10, 2014
9637a1a
add EpubType to Product
exAspArk Dec 10, 2014
54b791e
Respect lowercase product tags
zdavis Nov 17, 2015
a8f8a66
Merge branch 'master' of github.com:exAspArk/onix2
zdavis Nov 17, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pkg
Gemfile.lock
data/*.xml.new
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: ruby
rvm:
- "2.1.5"
script: bundle exec rspec
29 changes: 17 additions & 12 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v1.0.0 (4th December 2014)
- Rename ONIX to ONIX2
- Add SalesRight to Product
- Remove Normaliser

v0.9.5 (28th December 2012)
- Bugfix: AudienceRangeValue can be non-numeric

Expand All @@ -18,7 +23,7 @@ v0.9.0 (14th April 2011)
- switch back to the vanilla roxml gem. Ben is maintaining it again and
he has merged in my bug fixes
- clarify comments explaining encoding behaviour
- Add options hash to ONIX::Reader. Only option at this stage is :encoding,
- Add options hash to ONIX2::Reader. Only option at this stage is :encoding,
which allows the user to override the assumed encoding of the input XML
- API change, so new minor version

Expand All @@ -28,10 +33,10 @@ v0.8.5 (21st December 2010)

v0.8.4 (18th October 2010)
- some small fixes to xml names from Tim
- make all code lists available via the ONIX::Lists class
- make all code lists available via the ONIX2::Lists class

v0.8.3 (9th September 2010)
- Fix for race condition in ONIX::Normaliser
- Fix for race condition in ONIX2::Normaliser
- thanks to pixelvixen for reporting
- force roxml to be 3.1.6 or higher. Earlier versions misbehaved when monkey
patching nokogiri
Expand All @@ -41,16 +46,16 @@ v0.8.2 (6th May 2010)

v0.8.1 (5th January 2010)
- Use nokogiri's support for transparent entity conversion when reading an ONIX file
- Removed entity replacement from ONIX::Normaliser
- Removed entity replacement from ONIX2::Normaliser
- the external dependency on sed made me uncomfortable, and it wasn't really
necessary now that nokogiri can do it for us
- Removed utf-8 normalisation from ONIX::Normaliser
- Removed utf-8 normalisation from ONIX2::Normaliser
- nokogiri also handles this really cleanly and transparently. Regardless of
the source file encoding, Nokogiri::Reader returns utf-8 encoded data
- Add the release attribute to files we generate
- it's optional in 2.1, but mandatory in 3.0. As we start to see 3.0 files in the
wild it will help to have a rapid way to distinguish between them
- Add ONIX::Reader#release - to detect the release version of files we read in
- Add ONIX2::Reader#release - to detect the release version of files we read in

v0.8.0 (31st October 2009)
- Replace LibXML dependency with Nokogiri. Nokogiri is under active development, has
Expand All @@ -67,7 +72,7 @@ v0.7.8 (19th October 2009)
- thanks tim

v0.7.7 (1st October 2009)
- optimise sed usage in ONIX::Normaliser. *huge* speed improvement on
- optimise sed usage in ONIX2::Normaliser. *huge* speed improvement on
large files.

v0.7.6 (21st September 2009)
Expand All @@ -77,7 +82,7 @@ v0.7.5 (8th September 2009)
- Don't raise an exception on malformed dates when reading files

v0.7.4 (2nd September 2009)
- Expand ONIX::Normaliser
- Expand ONIX2::Normaliser
- strip control chars
- add encoding declaration to valid utf-8 files that aren't declared
as such
Expand All @@ -87,7 +92,7 @@ v0.7.3 (19th August 2009)
to reference tags

v0.7.2 (19th August 2009)
- Added ONIX::Normaliser class
- Added ONIX2::Normaliser class
- for normalising various ONIX files into a form that makes them easy
to process. Shouldn't be necesary to pre-process files like this, but
I'm sick of trying to wrestle the libxml ruby bindings
Expand All @@ -101,7 +106,7 @@ v0.7.0 (17th June 2009)
that seems to be the source of our instability
- Various Ruby 1.9 compatability tweaks
- add source file coding declarations. All source files are UTF-8
- ONIX::Reader ensures all input data is converted to UTF-8
- ONIX2::Reader ensures all input data is converted to UTF-8
- the ROXML based objects seem to forget the encoding when they're marshalled,
so force string based attributes *back* to UTF-8

Expand Down Expand Up @@ -135,7 +140,7 @@ v0.6.1 (Unreleased)
libxml

v0.6.0 (18th March 2009)
- remove use of threads in ONIX::Reader
- remove use of threads in ONIX2::Reader
- a producer/consumer pattern was useful in the REXML stream parsing days, but
now LibXML's Reader binding provides a better alternative
- API left unchanged, this was all under the hood
Expand Down Expand Up @@ -170,7 +175,7 @@ v0.4.2 (1st November 2008)

v0.4.1 (UNRELEASED)
- Added accessors to various product measurements. Height, weight, etc.
- Reduced time for an ONIX::Reader class to initialise
- Reduced time for an ONIX2::Reader class to initialise

v0.4.0 (28th October 2008)
- Major rework: now based on ROXML instead of xml-mapping
Expand Down
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
source :gemcutter
source 'https://rubygems.org'

# Specify your gem's dependencies in onix.gemspec
gemspec

# explicitly depend on HEAD representable, because of the :render_filter option.

gem 'representable', github: 'apotonick/representable'
16 changes: 9 additions & 7 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## ONIX

[![Build Status](https://travis-ci.org/exAspArk/onix2.svg?branch=master)](https://travis-ci.org/exAspArk/onix2)

The ONIX standard is a somewhat verbose XML format that is rapidly becoming the
industry standard for electronic data sharing in the book and publishing
industries.
Expand All @@ -16,10 +18,10 @@ This library currently only handles ONIX 2.1 files (all revisions). At some
point I'll need to work out what to do about supporting ONIX 3.0 files. I
suspect a separate library will be the simplest solution.

ONIX::Reader only handles the reference tag versions of ONIX 2.1. Use
ONIX::Normaliser to convert any short tag files to reference tags.
ONIX2::Reader only handles the reference tag versions of ONIX 2.1. Use
ONIX2::Normaliser to convert any short tag files to reference tags.

ONIX::Writer only generates reference tag ONIX files.
ONIX2::Writer only generates reference tag ONIX files.

It baffles me why anyone thought designing two parallel versions of the ONIX
spec was a good idea. Use reference tags my friends, and let short tags fade
Expand All @@ -46,10 +48,10 @@ http://github.com/yob/onix-dtd
See files in the examples directory to get started quickly. For further reading
view the comments to the following classes:

* ONIX::Reader - For reading ONIX files
* ONIX::Writer - For writing ONIX files
* ONIX::Normaliser - For normalising ONIX files before reading them. Fixes encoding issues, etc
* ONIX::Lists - For building hashes of code lists from the ONIX spec
* ONIX2::Reader - For reading ONIX files
* ONIX2::Writer - For writing ONIX files
* ONIX2::Normaliser - For normalising ONIX files before reading them. Fixes encoding issues, etc
* ONIX2::Lists - For building hashes of code lists from the ONIX spec

## Licensing

Expand Down
7 changes: 3 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
require "rubygems"
require "bundler"
Bundler.setup
require "bundler/setup"

require 'rake'
require 'rake/rdoctask'
require 'rdoc/task'
require 'rspec/core/rake_task'


Expand All @@ -18,7 +17,7 @@ end
desc 'Generate documentation'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'ONIX'
rdoc.title = 'ONIX2'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README.markdown')
rdoc.rdoc_files.include('TODO')
Expand Down
2 changes: 1 addition & 1 deletion bin/onix_extract_codelists
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ unless ARGV.size == 2
exit(1)
end

extractor = ONIX::CodeListExtractor.new(ARGV.shift)
extractor = ONIX2::CodeListExtractor.new(ARGV.shift)
extractor.run(ARGV.shift)
5 changes: 5 additions & 0 deletions data/addressee.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<AddresseeIdentifier>
<AddresseeIDType>01</AddresseeIDType>
<IDValue>123456</IDValue>
</AddresseeIdentifier>
7 changes: 7 additions & 0 deletions data/discount_coded.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<DiscountCoded>
<DiscountCodeType>02</DiscountCodeType>
<DiscountCodeTypeName>IngramDC</DiscountCodeTypeName>
<DiscountCode>AHACP033</DiscountCode>
</DiscountCoded>

8 changes: 8 additions & 0 deletions data/header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@
<DefaultLinearUnit>dd</DefaultLinearUnit>
<DefaultWeightUnit>ee</DefaultWeightUnit>
<DefaultClassOfTrade>f</DefaultClassOfTrade>
<SenderIdentifier>
<SenderIDType>01</SenderIDType>
<IDValue>123456</IDValue>
</SenderIdentifier>
<SenderIdentifier>
<SenderIDType>02</SenderIDType>
<IDValue>7891002</IDValue>
</SenderIdentifier>
</Header>
11 changes: 11 additions & 0 deletions data/price.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,15 @@
<Price>
<PriceTypeCode>02</PriceTypeCode>
<PriceAmount>7.5</PriceAmount>
<DiscountCoded>
<DiscountCodeType>01</DiscountCodeType>
<DiscountCodeTypeName>IngramDC1</DiscountCodeTypeName>
<DiscountCode>AHACP011</DiscountCode>
</DiscountCoded>
<DiscountCoded>
<DiscountCodeType>02</DiscountCodeType>
<DiscountCodeTypeName>IngramDC2</DiscountCodeTypeName>
<DiscountCode>AHACP022</DiscountCode>
</DiscountCoded>
<DiscountPercent>0.4</DiscountPercent>
</Price>
1 change: 1 addition & 0 deletions data/product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<IDValue>9780194351898</IDValue>
</ProductIdentifier>
<ProductForm>BC</ProductForm>
<EpubType>029</EpubType>
<Series>
<TitleOfSeries>DICTIONARIES BEGINNER TO PRE-INTERMED</TitleOfSeries>
</Series>
Expand Down
8 changes: 8 additions & 0 deletions data/series.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Series>
<SeriesIdentifier>
<SeriesIDType>01</SeriesIDType>
<IDValue>10001</IDValue>
</SeriesIdentifier>
<SeriesIdentifier>
<SeriesIDType>02</SeriesIDType>
<IDValue>20002</IDValue>
</SeriesIdentifier>
<TitleOfSeries>Citizens and Their Governments</TitleOfSeries>
</Series>

8 changes: 8 additions & 0 deletions data/supply_detail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@
<PriceTypeCode>02</PriceTypeCode>
<PriceAmount>7.5</PriceAmount>
</Price>
<Website>
<WebsiteRole>01</WebsiteRole>
<WebsiteLink>http://www.rainbowbooks.com.au</WebsiteLink>
</Website>
<Website>
<WebsiteRole>02</WebsiteRole>
<WebsiteLink>http://www.google.com</WebsiteLink>
</Website>
</SupplyDetail>
10 changes: 5 additions & 5 deletions examples/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

require 'onix'

#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","0705NHP.XML"))
#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","9780194351898.xml"))
#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","jul.xml"))
reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","bookwise.xml"))
#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","rba_FANT.xml"))
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","0705NHP.XML"))
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","9780194351898.xml"))
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","jul.xml"))
reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","bookwise.xml"))
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","rba_FANT.xml"))
counter = 0

# display header info
Expand Down
10 changes: 5 additions & 5 deletions examples/reader_apa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

require 'onix'

#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","Bookwise_July_2008.xml"), ::ONIX::APAProduct)
#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","Ashgate Other.xml"), ::ONIX::APAProduct)
#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","9780194351898.xml"), ::ONIX::APAProduct)
reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","jul.xml"), ::ONIX::APAProduct)
#reader = ONIX::Reader.new(File.join(File.dirname(__FILE__),"..","data","rba_FANT.xml"))
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","Bookwise_July_2008.xml"), ::ONIX2::APAProduct)
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","Ashgate Other.xml"), ::ONIX2::APAProduct)
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","9780194351898.xml"), ::ONIX2::APAProduct)
reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","jul.xml"), ::ONIX2::APAProduct)
#reader = ONIX2::Reader.new(File.join(File.dirname(__FILE__),"..","data","rba_FANT.xml"))
counter = 0

# display header info
Expand Down
4 changes: 2 additions & 2 deletions examples/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
require 'onix'

File.open('output.xml', "w") do |output|
header = ONIX::Header.new
header = ONIX2::Header.new
header.from_company = "Sample Company"
header.from_person = "James"

writer = ONIX::Writer.new(output, header)
writer = ONIX2::Writer.new(output, header)

writer.end_document
end
6 changes: 3 additions & 3 deletions examples/writer_apa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
require 'onix'

File.open('output.xml', "w") do |output|
header = ONIX::Header.new
header = ONIX2::Header.new
header.from_company = "Sample Company"
header.from_person = "James"
header.sent_date = Time.now

writer = ONIX::Writer.new(output, header)
writer = ONIX2::Writer.new(output, header)

product = ONIX::APAProduct.new
product = ONIX2::APAProduct.new
product.notification_type = 2
product.record_reference = 1
product.isbn10 = "1844836902"
Expand Down
Loading