Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

Dra 2541 cleanup transformations - #283

Open
davidgrove73 wants to merge 23 commits into
masterfrom
DRA-2541-cleanup-transformations
Open

Dra 2541 cleanup transformations#283
davidgrove73 wants to merge 23 commits into
masterfrom
DRA-2541-cleanup-transformations

Conversation

@davidgrove73

Copy link
Copy Markdown
Contributor

Refactor of preservica2schemaorg.xslt

The highligts

extracted functions and templates

  • my:extensionBooleanField
  • my:extensionStringField
  • my:personArray
  • my:episodeType
  • my:seasonType
  • my:partOfSeason
  • origin-identifier
  • error-internal-map

fixed bugs

aspect ratio:
xsl:choose
<xsl:when test="normalize-space(…formatAspectRatio) = ','"/>
<xsl:when test="…= '16:9,' or …= '16:9, '">
<f:string key="videoFrameSize">16:9</f:string>
</xsl:when>
<xsl:when test="…!= '' and normalize-space(…) != ',' or ', '"> xsl:otherwise</xsl:otherwise>
</xsl:choose>
false vs false()

<xsl:value-of select="false"/>

<xsl:value-of select="false()"/>

clean up code:
Before:
<f:boolean key="kb:has_kaltura_id">
xsl:choose
<xsl:when test="$kalturaID != ''"><xsl:value-of select="true()"/></xsl:when>
xsl:otherwise<xsl:value-of select="false()"/></xsl:otherwise>
</xsl:choose>
</f:boolean>

After:
<f:boolean key="kb:has_kaltura_id"><xsl:value-of select="$kalturaID != ''"/></f:boolean>

CHANGELOG.md
fix testNoCreatorAffiliation test, it should fallback to general publisher if no creater affiation exist (this was changed when fixin DRA-2216 even if it is not specifically a part of the task)
extract function valueFromPBCoreExtensionKey
extract error-fallback and origin-identifier to avoid repeated code
extract pbc-extension-extract-boolean-value function for all things that can have things like genudsendelse
replace "for-each + if" logic to pick a value, with stringjoin, to better illustrate whats going on.
fix bug in aspect ratio
fix bug in kb:has_doms_access_copy. Make value the boolean false, not the value of the element 'false'
streamline extration of string values from extensions
streamline extration of string values from extensions more
clean up comments and remove unused code
"modulized" preservica2schemaorg
replace choose-when with boolean expression, when they only emit boolean values
remove duplicate line
remove the 'misc' category from genre mapping. It false into the default TV-rodekasse og Radio-rodekasse anyway
f:true() -> true() and f:false->false() for consistency
one more place to use extenstionBooleanField
extract generation of personArray to function
more functions
extracted partOfSeason as an function
use map in genre mapping.
code cleanup
un modulize to code for better comparison with old version
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant