class Caracal::Renderers::CoreRenderer
Public Instance Methods
to_xml()
click to toggle source
This method produces the xml required for the `docProps/core.xml` sub-document.
# File lib/caracal/renderers/core_renderer.rb, line 17 def to_xml builder = ::Nokogiri::XML::Builder.with(declaration_xml) do |xml| xml['cp'].coreProperties root_options do xml['dc'].title document.name end end builder.to_xml(save_options) end
Private Instance Methods
root_options()
click to toggle source
# File lib/caracal/renderers/core_renderer.rb, line 32 def root_options { 'xmlns:cp' => 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties', 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/', 'xmlns:dcterms' => 'http://purl.org/dc/terms/', 'xmlns:dcmitype' => 'http://purl.org/dc/dcmitype/', 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' } end