From 0529602cf58f9b63244662f76ea39d0716edce8a Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Sun, 26 Oct 2014 15:27:14 -0400 Subject: [PATCH] Templates changes for Auto-graphics. They requested that we remove "carriage returns" from the output. I'm not 100% certain if he meant all carriage returns or if he just wanted the weird spacing that some elements had where the open tag is on one line followed by the value and the close tag on the next line. I don't really know exactly why that was happening, but it seemed to have something to do with trying to make the value come out on a line by its own between the open and close tags. This change puts those elements on one line. Signed-off-by: Jason Stephenson --- templates/includes/ItemOptionalFields.inc | 40 +++++--------------- templates/includes/LookupUserResponse.inc | 12 ++---- templates/includes/LookupVersionResponse.inc | 12 ++---- templates/includes/ResponseHeader.inc | 8 +--- templates/includes/problem.inc | 15 ++------ 5 files changed, 22 insertions(+), 65 deletions(-) diff --git a/templates/includes/ItemOptionalFields.inc b/templates/includes/ItemOptionalFields.inc index 35928f9..8a2f775 100644 --- a/templates/includes/ItemOptionalFields.inc +++ b/templates/includes/ItemOptionalFields.inc @@ -30,31 +30,21 @@ [% IF data.ItemOptionalFields.BibliographicDescription.BibliographicRecordId; id = data.ItemOptionalFields.BibliographicDescription.BibliographicRecordId -%] - -[% id.BibliographicRecordIdentifier | xml %] - +[% id.BibliographicRecordIdentifier | xml %] [% IF id.BibliographicRecordIdentifierCode -%] - -[% id.BibliographicRecordIdentifierCode | xml %] - +[% id.BibliographicRecordIdentifierCode | xml %] [% END -%] [% IF id.AgencyId -%] - -[% id.AgencyId | xml %] - +[% id.AgencyId | xml %] [% END -%] [% END -%] [% IF data.ItemOptionalFields.BibliographicDescription.BibliographicItemId; id = data.ItemOptionalFields.BibliographicDescription.BibliographicItemId -%] - -[% id.BibliographicItemIdentifier | xml %] - +[% id.BibliographicItemIdentifier | xml %] [% IF id.BibliographicItemIdentifierCode -%] - -[% id.BibliographicItemIdentifierCode | xml %] - +[% id.BibliographicItemIdentifierCode | xml %] [% END -%] [% END -%] @@ -62,30 +52,20 @@ [% END -%] [% IF data.ItemOptionalFields.ItemDescription -%] - -[% data.ItemOptionalFields.ItemDescription.CallNumber | xml %] - +[% data.ItemOptionalFields.ItemDescription.CallNumber | xml %] [% END -%] [% IF data.ItemOptionalFields.CirculationStatus -%] - -[% data.ItemOptionalFields.CirculationStatus | xml %] - +[% data.ItemOptionalFields.CirculationStatus | xml %] [% END -%] [% IF data.ItemOptionalFields.DateDue -%] - -[% data.ItemOptionalFields.DateDue | xml %] - +[% data.ItemOptionalFields.DateDue | xml %] [% END -%] [% IF data.ItemOptionalFields.ItemUseRestrictionType -%] - -[% data.ItemOptionalFields.ItemUseRestrictionType | xml %] - +[% data.ItemOptionalFields.ItemUseRestrictionType | xml %] [% END -%] [% IF data.ItemOptionalFields.PhysicalCondition -%] - -[% data.ItemOptionalFields.PhysicalCondition | xml %] - +[% data.ItemOptionalFields.PhysicalCondition | xml %] [% END -%] [% END -%] diff --git a/templates/includes/LookupUserResponse.inc b/templates/includes/LookupUserResponse.inc index c2d7580..aba868e 100644 --- a/templates/includes/LookupUserResponse.inc +++ b/templates/includes/LookupUserResponse.inc @@ -1,18 +1,12 @@ [% FOREACH id IN data.UserId -%] [% IF id.UserIdentifierType -%] - -[% id.UserIdentifierType | xml %] - +[% id.UserIdentifierType | xml %] [% END -%] [% IF id.AgencyId -%] - -[% id.AgencyId %] - +[% id.AgencyId %] [% END -%] - -[% id.UserIdentifierValue | xml %] - +[% id.UserIdentifierValue | xml %] [% END -%] [% INCLUDE "includes/UserOptionalFields.inc" -%] diff --git a/templates/includes/LookupVersionResponse.inc b/templates/includes/LookupVersionResponse.inc index f59fa05..8ea50ac 100644 --- a/templates/includes/LookupVersionResponse.inc +++ b/templates/includes/LookupVersionResponse.inc @@ -1,15 +1,9 @@ - -[%- data.fromagencyid -%] - +[% data.fromagencyid | xml %] - -[%- data.toagencyid -%] - +[% data.toagencyid | xml %] [% FOREACH version IN data.versions -%] - -[%- version | xml -%] - +[% version | xml %] [% END -%] diff --git a/templates/includes/ResponseHeader.inc b/templates/includes/ResponseHeader.inc index 669d7ec..a97a1f4 100644 --- a/templates/includes/ResponseHeader.inc +++ b/templates/includes/ResponseHeader.inc @@ -1,12 +1,8 @@ - -[% header.FromAgencyId.AgencyId | xml %] - +[% header.FromAgencyId.AgencyId | xml %] - -[% header.ToAgencyId.AgencyId | xml %] - +[% header.ToAgencyId.AgencyId | xml %] diff --git a/templates/includes/problem.inc b/templates/includes/problem.inc index 2fd57db..336d4f8 100644 --- a/templates/includes/problem.inc +++ b/templates/includes/problem.inc @@ -4,15 +4,8 @@ [% ELSE -%] [% END -%] -[% problem.ProblemType | xml %] - - -[% problem.ProblemDetail | xml %] - - -[% problem.ProblemElement | xml %] - - -[% problem.ProblemValue | xml %] - +[%- problem.ProblemType | xml %] +[% problem.ProblemDetail | xml %] +[% problem.ProblemElement | xml %] +[% problem.ProblemValue | xml %] -- 2.43.2