lib/csl/schema.rb in csl-1.0.0.pre21 vs lib/csl/schema.rb in csl-1.0.0.pre22

- old
+ new

@@ -1,13 +1,20 @@ module CSL class Schema - @version = '1.0.1'.freeze + @version = '1.0.1'.freeze + @major_version = '1.0'.freeze + @namespace = 'http://purl.org/net/xbiblio/csl'.freeze @preamble = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".freeze + @default_license = 'http://creativecommons.org/licenses/by-sa/3.0/' + @default_rights_string = + "This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License: #{@default_license}" + + @types = %w{ article article-journal article-magazine article-newspaper bill book broadcast chapter entry entry-dictionary entry-encyclopedia figure graphic interview legal_case legislation manuscript map motion_picture musical_score pamphlet paper-conference patent personal_communication post post-weblog report review review-book song @@ -82,19 +89,24 @@ }, :names => %w{ names-delimiter }, :conditionals => %w{ - disambiguate is-numeric is-uncertain-date locator - position type variable + disambiguate position + is-numeric is-numeric-any is-numeric-all is-numeric-none + is-uncertain-date is-uncertain-date-any is-uncertain-date-all + is-uncertain-date-none + locator locator-any locator-all locator-none + type type-any type-all type-none + variable variable-any variable-all variable-none } }) @attributes.each_value { |v| v.map!(&:to_sym).freeze } - @attributes[:formatting] = [:'text-case'].concat( - @attributes.values_at(:affixes, :font).flatten) + @attributes[:formatting] = [:'text-case'].concat( + @attributes.values_at(:affixes, :font).flatten) @attributes.freeze @values = Hash.new { |h,k| h.fetch(k.to_sym, nil) }.merge({ :date_part => { @@ -129,11 +141,12 @@ @validator = @validators[:default] end class << self - attr_accessor :version, :namespace, :types, :variables, :categories, - :attributes, :preamble, :values + attr_accessor :version, :major_version, :namespace, :types, + :variables, :categories, :attributes, :preamble, :values, + :default_rights_string, :default_license private :new def attr(*arguments) attributes.values_at(*arguments).flatten(1) \ No newline at end of file