Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Support for Excel templatization #403

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def initialize(errorString)
end
end

def generate_xslt(docx)
def generate_docx_xslt(docx)

# hardcoded stuff
@top = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Expand All @@ -33,7 +33,7 @@ def generate_xslt(docx)
document = ""
debug = false

document = read_rels(docx,"word/document.xml")
document = read_from_zip(docx,"word/document.xml")

# fix for curly apostrophes
document = document.gsub(/‘/,"'")
Expand Down Expand Up @@ -622,7 +622,7 @@ def white_space(document)
return document
end

def generate_xslt_components(docx)
def generate_docx_xslt_components(docx)
# Initialize the xsl
@top = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet
Expand All @@ -646,7 +646,7 @@ def generate_xslt_components(docx)
components = find_headers_footers(docx)

components.each do |component|
document = read_rels(docx,component)
document = read_from_zip(docx,component)

# replace {} for the sake of XSL
document = document.gsub("{","{{").gsub("}","}}")
Expand Down
Loading