Difference between revisions of "Módulo:Manifestation"

From Wikincat
Jump to: navigation, search
(- LCC URI)
 
Line 80: Line 80:
 
     frame:callParserFunction{ name = '#set', args = { 'Has language of the content', (mw.language.fetchLanguageName( HasLanguageOfTheContent ):gsub("^%l", string.upper)) } }
 
     frame:callParserFunction{ name = '#set', args = { 'Has language of the content', (mw.language.fetchLanguageName( HasLanguageOfTheContent ):gsub("^%l", string.upper)) } }
 
     frame:callParserFunction{ name = '#set', args = { 'Has LCCN', HasLccn } }
 
     frame:callParserFunction{ name = '#set', args = { 'Has LCCN', HasLccn } }
    if HasLibraryOfCongressClassification ~= '' then
 
        frame:callParserFunction{ name = '#set', args = { 'Has Library of Congress Classification URI', 'http://id.loc.gov/authorities/classification/' .. HasLibraryOfCongressClassification } }
 
    end   
 
 
     frame:callParserFunction{ name = '#set', args = { 'Has Library of Congress Classification', HasLibraryOfCongressClassification } }
 
     frame:callParserFunction{ name = '#set', args = { 'Has Library of Congress Classification', HasLibraryOfCongressClassification } }
 
     frame:callParserFunction{ name = '#set', args = { 'Has manufacturer\'s name', HasManufacturersName, '+sep=;' } }
 
     frame:callParserFunction{ name = '#set', args = { 'Has manufacturer\'s name', HasManufacturersName, '+sep=;' } }

Latest revision as of 13:27, 6 August 2019

A documentação para este módulo pode ser criada em Módulo:Manifestation/doc

local ISBN = require( 'Module:ISBN' )
p = {}
function p.CreateRecord( frame )
    -- Define todas as variáveis que conterão os valores dos argumentos da predefinição Manifestation
    local HasAdditionalIsbn = frame:getParent().args[ 'Has additional ISBN' ] or ''
    local HasAuthorNotation = frame:getParent().args[ 'Has author notation' ] or ''
    local HasAvailableCover = frame:getParent().args[ 'Has available cover' ] or ''
    local HasCarrierType = frame:getParent().args[ 'Has carrier type' ] or ''
    local HasContentType = frame:getParent().args[ 'Has content type' ] or ''
    local HasContributor = frame:getParent().args[ 'Has contributor' ] or ''
    local HasCopyrightDate = frame:getParent().args[ 'Has copyright date' ] or ''
    local HasDateOfDistribution = frame:getParent().args[ 'Has date of distribution' ] or ''
    local HasDateOfManufacture = frame:getParent().args[ 'Has date of manufacture' ] or ''
    local HasDateOfPublication = frame:getParent().args[ 'Has date of publication' ] or ''
    local HasDesignationOfEdition = frame:getParent().args[ 'Has designation of edition' ] or ''
    local HasDeweyDecimalClassification = frame:getParent().args[ 'Has Dewey Decimal Classification' ] or ''
    local HasDimensions = frame:getParent().args[ 'Has dimensions' ] or ''
    local HasDistributorsName = frame:getParent().args[ 'Has distributor\'s name' ] or ''
    local HasDoi = frame:getParent().args[ 'Has DOI' ] or ''
    local HasEditor = frame:getParent().args[ 'Has editor' ] or ''
    local HasEncodingFormat = frame:getParent().args[ 'Has encoding format' ] or ''
    local HasExtent = frame:getParent().args[ 'Has extent' ] or ''
    local HasFileSize = frame:getParent().args[ 'Has file size' ] or ''
    local HasFileType = frame:getParent().args[ 'Has file type' ] or ''
    local HasIllustrativeContent = frame:getParent().args[ 'Has illustrative content' ] or ''
    local HasIllustrator = frame:getParent().args[ 'Has illustrator' ] or ''
    local HasIsbn = frame:getParent().args[ 'Has ISBN' ] or ''
    local HasIssn = frame:getParent().args[ 'Has ISSN' ] or ''
    local HasIssnOfSeries = frame:getParent().args[ 'Has ISSN of series' ] or ''
    local HasLanguageOfTheContent = frame:getParent().args[ 'Has language of the content' ] or ''
    local HasLccn = frame:getParent().args[ 'Has LCCN' ] or ''
    local HasLibraryOfCongressClassification = frame:getParent().args[ 'Has Library of Congress Classification' ] or ''
    local HasManufacturersName = frame:getParent().args[ 'Has manufacturer\'s name' ] or ''
    local HasMediaType = frame:getParent().args[ 'Has media type' ] or ''
    local HasModeOfIssuance = frame:getParent().args[ 'Has mode of issuance' ] or ''
    local HasNoteOnResource = frame:getParent().args[ 'Has note on resource' ] or ''
    local HasNumberingWithinSeries = frame:getParent().args[ 'Has numbering within series' ] or ''
    local HasOclcNumber = frame:getParent().args[ 'Has OCLC number' ] or ''
    local HasOpenLibraryIdentifier = frame:getParent().args[ 'Has Open Library identifier' ] or ''
    local HasOtherTitleInformation = frame:getParent().args[ 'Has other title information' ] or ''
    local HasPlaceOfDistribution = frame:getParent().args[ 'Has place of distribution' ] or ''
    local HasPlaceOfManufacture = frame:getParent().args[ 'Has place of manufacture' ] or ''
    local HasPlaceOfPublication = frame:getParent().args[ 'Has place of publication' ] or ''
    local HasPublishersName = frame:getParent().args[ 'Has publisher\'s name' ] or ''
    local HasStatementOfResponsibilityRelatingToSeries = frame:getParent().args[ 'Has statement of responsibility relating to series' ] or ''
    local HasStatementOfResponsibilityRelatingToTheEdition = frame:getParent().args[ 'Has statement of responsibility relating to the edition' ] or ''
    local HasStatementOfResponsibilityRelatingToTitleProper = frame:getParent().args[ 'Has statement of responsibility relating to title proper' ] or ''
    local HasSummarizationOfTheContent = frame:getParent().args[ 'Has summarization of the content' ] or ''
    local HasTitleProper = frame:getParent().args[ 'Has title proper' ] or ''
    local HasTitleProperOfSeries = frame:getParent().args[ 'Has title proper of series' ] or ''
    local HasTranslator = frame:getParent().args[ 'Has translator' ] or ''
    local HasTypeOfIdentifier = frame:getParent().args[ 'Has type of identifier' ] or ''
    local HasUniformResourceLocator = frame:getParent().args[ 'Has uniform resource locator' ] or ''
    local HasUniversalDecimalClassification = frame:getParent().args[ 'Has Universal Decimal Classification' ] or ''
    local HasWorkManifested = frame:getParent().args[ 'Has work manifested' ] or ''
    -- Armazena as propriedades e seus valores
        -- Campos simples
    frame:callParserFunction{ name = '#set', args = { 'Has author notation', HasAuthorNotation } }
    frame:callParserFunction{ name = '#set', args = { 'Has carrier type', HasCarrierType } }
    frame:callParserFunction{ name = '#set', args = { 'Has content type', HasContentType } }
    frame:callParserFunction{ name = '#set', args = { 'Has contributor', HasContributor, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has copyright date', HasCopyrightDate } }
    frame:callParserFunction{ name = '#set', args = { 'Has date of distribution', HasDateOfDistribution } }
    frame:callParserFunction{ name = '#set', args = { 'Has date of manufacture', HasDateOfManufacture } }
    frame:callParserFunction{ name = '#set', args = { 'Has date of publication', HasDateOfPublication } }
    frame:callParserFunction{ name = '#set', args = { 'Has designation of edition', HasDesignationOfEdition } }
    frame:callParserFunction{ name = '#set', args = { 'Has Dewey Decimal Classification', HasDeweyDecimalClassification } }
    frame:callParserFunction{ name = '#set', args = { 'Has dimensions', HasDimensions } }
    frame:callParserFunction{ name = '#set', args = { 'Has distributor\'s name', HasDistributorsName, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has DOI', HasDoi, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has editor', HasEditor, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has encoding format', HasEncodingFormat } }
    frame:callParserFunction{ name = '#set', args = { 'Has extent', HasExtent } }
    frame:callParserFunction{ name = '#set', args = { 'Has file size', HasFileSize } }
    frame:callParserFunction{ name = '#set', args = { 'Has file type', HasFileType } }
    frame:callParserFunction{ name = '#set', args = { 'Has illustrative content', HasIllustrativeContent } }
    frame:callParserFunction{ name = '#set', args = { 'Has illustrator', HasIllustrator, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has ISSN of series', HasIssnOfSeries } }
    frame:callParserFunction{ name = '#set', args = { 'Has ISSN', HasIssn, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has language of the content', (mw.language.fetchLanguageName( HasLanguageOfTheContent ):gsub("^%l", string.upper)) } }
    frame:callParserFunction{ name = '#set', args = { 'Has LCCN', HasLccn } }
    frame:callParserFunction{ name = '#set', args = { 'Has Library of Congress Classification', HasLibraryOfCongressClassification } }
    frame:callParserFunction{ name = '#set', args = { 'Has manufacturer\'s name', HasManufacturersName, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has Media type', HasMediaType } }
    frame:callParserFunction{ name = '#set', args = { 'Has mode of issuance', HasModeOfIssuance } }
    frame:callParserFunction{ name = '#set', args = { 'Has numbering within series', HasNumberingWithinSeries } }
    frame:callParserFunction{ name = '#set', args = { 'Has OCLC number', HasOclcNumber } }
    frame:callParserFunction{ name = '#set', args = { 'Has Open Library identifier', HasOpenLibraryIdentifier, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has other title information', HasOtherTitleInformation } }
    frame:callParserFunction{ name = '#set', args = { 'Has place of distribution', HasPlaceOfDistribution, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has place of manufacture', HasPlaceOfManufacture, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has place of publication', HasPlaceOfPublication, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has publisher\'s name', HasPublishersName, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has statement of responsibility relating to series', HasStatementOfResponsibilityRelatingToSeries } }
    frame:callParserFunction{ name = '#set', args = { 'Has statement of responsibility relating to the edition', HasStatementOfResponsibilityRelatingToTheEdition } }
    frame:callParserFunction{ name = '#set', args = { 'Has statement of responsibility relating to title proper', HasStatementOfResponsibilityRelatingToTitleProper } }
    frame:callParserFunction{ name = '#set', args = { 'Has summarization of the content', HasSummarizationOfTheContent, '+sep=(+)' } }
    frame:callParserFunction{ name = '#set', args = { 'Has title proper of series', HasTitleProperOfSeries } }
    frame:callParserFunction{ name = '#set', args = { 'Has title proper', (string.gsub( HasTitleProper, ':', '' ))  } }
    frame:callParserFunction{ name = '#set', args = { 'Has translator', HasTranslator, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has type of identifier', HasTypeOfIdentifier, '+sep=;' } }
    frame:callParserFunction{ name = '#set', args = { 'Has Universal Decimal Classification', HasUniversalDecimalClassification } }
    frame:callParserFunction{ name = '#set', args = { 'Has work manifested', 'Work:' .. HasWorkManifested } }
    if HasLccn ~= '' then
        frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'https://lccn.loc.gov/' .. HasLccn } }
    end
    if HasOclcNumber ~= '' then
        frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'https://www.worldcat.org/oclc/' .. HasOclcNumber } }
    end
        -- Casos especiais
            -- Define o título e o subtítulo da manifestação
    if HasOtherTitleInformation ~= '' then
        manifestationTitle = HasTitleProper .. ' ' .. HasOtherTitleInformation
    else
        manifestationTitle = HasTitleProper
    end
    frame:callParserFunction{ name = '#set', args = { 'Has full title', manifestationTitle } }
            -- URIs que envolvem arraymap
    frame:callParserFunction{ name = '#arraymap', args = { HasDoi, ';', 'y', '{{#set:Equivalent URI=https://doi.org/y}}' } }
    frame:callParserFunction{ name = '#arraymap', args = { HasIssn, ';', 'x', '{{#set:Equivalent URI=urn:issn:x}}' } }
    frame:callParserFunction{ name = '#arraymap', args = { HasNoteOnResource, '\\n', 'x', '{{#set:Has note on resource=x}}' } }
    frame:callParserFunction{ name = '#arraymap', args = { HasOpenLibraryIdentifier, ';', 'x', '{{#set:Equivalent URI=https://openlibrary.org/books/x}}' } }
    frame:callParserFunction{ name = '#arraymap', args = { HasUniformResourceLocator, '<nowiki> </nowiki>', 'x', '{{#set:Has uniform resource locator=x}}' } }
            -- Dado um ISBN, recupere o outro
    local isbn13 = ''
    local isbn10 = ''
    if HasIsbn ~= '' then
        -- Valid, yes or no
        if not ISBN( HasIsbn, 'fix-checksum' ) then 
            invalidISBN = '<br /><strong class="error">ISBN inválido</strong>'
        else
            local isbn = assert( ISBN( HasIsbn, 'fix-checksum') )
                isbn13 = tostring(isbn:as_isbn13())
                isbn10 = tostring(isbn:as_isbn10())
                -- Adiciona um ponto de acesso via ISBN principal
                frame:callParserFunction{ name = '#index', args = { isbn:isbn() } }
            if string.len(isbn:isbn()) == 10 then
                frame:callParserFunction{ name = '#set', args = { 'Has ISBN', isbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Has additional ISBN', isbn:as_isbn13():isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. isbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. isbn:as_isbn13():isbn() } }
            elseif string.len(isbn:isbn()) == 13 then
                frame:callParserFunction{ name = '#set', args = { 'Has ISBN', isbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Has additional ISBN', isbn:as_isbn10():isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. isbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. isbn:as_isbn10():isbn() } }
            end
            -- Se tem capa, armazene o URL dela
            if HasAvailableCover == 'Sim' then
                frame:callParserFunction{ name = '#set', args = { 'Has cover art', 'https://covers.openlibrary.org/b/isbn/' .. isbn:isbn() .. '-M.jpg' } }
                UrlCover = 'https://covers.openlibrary.org/b/isbn/' .. isbn:isbn() .. '-M.jpg'
            end
        end
    end
    local isbn132 = ''
    local isbn102 = ''
    if HasAdditionalIsbn ~= '' then
        -- Valid, yes or no
        if not ISBN( HasAdditionalIsbn, 'fix-checksum' ) then 
            invalidAdditionalISBN = '<br /><strong class="error">ISBN adicional inválido</strong>'
        else
            local additionalIsbn = assert( ISBN( HasAdditionalIsbn, 'fix-checksum') )
                isbn132 = tostring(additionalIsbn:as_isbn13())
                isbn102 = tostring(additionalIsbn:as_isbn10())
                -- Adiciona um ponto de acesso via ISBN adicional
                frame:callParserFunction{ name = '#index', args = { additionalIsbn:isbn() } }
            if string.len(additionalIsbn:isbn()) == 10 then
                frame:callParserFunction{ name = '#set', args = { 'Has additional ISBN', additionalIsbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Has additional ISBN', additionalIsbn:as_isbn13():isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. additionalIsbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. additionalIsbn:as_isbn13():isbn() } }
            elseif string.len(additionalIsbn:isbn()) == 13 then
                frame:callParserFunction{ name = '#set', args = { 'Has additional ISBN', additionalIsbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Has additional ISBN', additionalIsbn:as_isbn10():isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. additionalIsbn:isbn() } }
                frame:callParserFunction{ name = '#set', args = { 'Equivalent URI', 'urn:isbn:' .. additionalIsbn:as_isbn10():isbn() } }
            end
        end
    end
    -- Define o título para aparecer na página
    frame:callParserFunction{ name = 'DISPLAYTITLE', args = manifestationTitle }
    frame:callParserFunction{ name = '#description2', args = { manifestationTitle .. ' / ' .. HasStatementOfResponsibilityRelatingToTitleProper } }
    local category = '[[Category:Manifestation]]'
    -- Define o número de caracteres a ser desconsiderado na alfabetação (from RDA Appendice C.3)
    local numberOfNonfilingCharacters =
            string.lower(HasTitleProper):match( "^a ") or
            string.lower(HasTitleProper):match( "^al ") or
            string.lower(HasTitleProper):match( "^al-") or
            string.lower(HasTitleProper):match( "^an ") or
            string.lower(HasTitleProper):match( "^ar ") or
            string.lower(HasTitleProper):match( "^as ") or
            string.lower(HasTitleProper):match( "^das ") or
            string.lower(HasTitleProper):match( "^de ") or
            string.lower(HasTitleProper):match( "^dem ") or
            string.lower(HasTitleProper):match( "^den ") or
            string.lower(HasTitleProper):match( "^der ") or
            string.lower(HasTitleProper):match( "^des ") or
            string.lower(HasTitleProper):match( "^det ") or
            string.lower(HasTitleProper):match( "^die ") or
            string.lower(HasTitleProper):match( "^d’") or
            string.lower(HasTitleProper):match( "^een ") or
            string.lower(HasTitleProper):match( "^eene ") or
            string.lower(HasTitleProper):match( "^ein ") or
            string.lower(HasTitleProper):match( "^eine ") or
            string.lower(HasTitleProper):match( "^einem ") or
            string.lower(HasTitleProper):match( "^einen ") or
            string.lower(HasTitleProper):match( "^einer ") or
            string.lower(HasTitleProper):match( "^eines ") or
            string.lower(HasTitleProper):match( "^el ") or
            string.lower(HasTitleProper):match( "^el-") or
            string.lower(HasTitleProper):match( "^els ") or
            string.lower(HasTitleProper):match( "^en ") or
            string.lower(HasTitleProper):match( "^et ") or
            string.lower(HasTitleProper):match( "^eul ") or
            string.lower(HasTitleProper):match( "^eun ") or
            string.lower(HasTitleProper):match( "^eur ") or
            string.lower(HasTitleProper):match( "^gli ") or
            string.lower(HasTitleProper):match( "^gl’") or
            string.lower(HasTitleProper):match( "^het ") or
            string.lower(HasTitleProper):match( "^i ") or
            string.lower(HasTitleProper):match( "^il ") or
            string.lower(HasTitleProper):match( "^la ") or
            string.lower(HasTitleProper):match( "^las ") or
            string.lower(HasTitleProper):match( "^le ") or
            string.lower(HasTitleProper):match( "^les ") or
            string.lower(HasTitleProper):match( "^li ") or
            string.lower(HasTitleProper):match( "^lo ") or
            string.lower(HasTitleProper):match( "^los ") or
            string.lower(HasTitleProper):match( "^l’") or
            string.lower(HasTitleProper):match( "^o ") or
            string.lower(HasTitleProper):match( "^os ") or
            string.lower(HasTitleProper):match( "^the ") or
            string.lower(HasTitleProper):match( "^ul ") or
            string.lower(HasTitleProper):match( "^um ") or
            string.lower(HasTitleProper):match( "^uma ") or
            string.lower(HasTitleProper):match( "^un ") or
            string.lower(HasTitleProper):match( "^una ") or
            string.lower(HasTitleProper):match( "^une ") or
            string.lower(HasTitleProper):match( "^uno ") or
            string.lower(HasTitleProper):match( "^un’") or
            string.lower(HasTitleProper):match( "^ur ") or
            string.lower(HasTitleProper):match( "^ye ") or ''
    local numberOfNonfilingCharacters = #numberOfNonfilingCharacters
    if numberOfNonfilingCharacters ~= 0 then
        frame:callParserFunction{ name = '#set', args = { 'Has number of nonfiling characters', numberOfNonfilingCharacters } }
        frame:callParserFunction{ name = 'DEFAULTSORT', args = { (string.sub( HasTitleProper, numberOfNonfilingCharacters ):gsub("^%l", string.upper)) } }
    end
    -- Começo da parte visível
        -- Traz os dados da obra
    workData = frame:expandTemplate{ title = 'Work:' .. HasWorkManifested }
    -- Define o tipo de conteúdo (usado para a legenda da tabela de expressão)
    if HasContentType == 'text' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-text' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'cartographic dataset' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-cartographicDataset' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'cartographic image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-cartographicImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'cartographic moving image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-cartographicMovingImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'cartographic tactile image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-cartographicTactileImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'cartographic tactile three-dimensional form' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-cartographicTactileThreeDimensionalForm' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'cartographic three-dimensional form' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-cartographicThreeDimensionalForm' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'computer dataset' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-computerDataset' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'computer program' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-computerProgram' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'notated movement' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-notatedMovement' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'notated music' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-notatedMusic' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'performed music' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-performedMusic' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'sounds' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-sounds' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'spoken word' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-spokenWord' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'still image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-stillImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'tactile image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-tactileImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'tactile notated music' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-tactileNotatedMusic' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'tactile notated movement' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-tactileNotatedMovement' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'tactile text' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-tactileText' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'tactile three-dimensional form' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-tactileThreeDimensionalForm' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'three-dimensional form' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-threeDimensionalForm' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'three-dimensional moving image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-threeDimensionalMovingImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'two-dimensional moving image' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-twoDimensionalMovingImage' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'other' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-other' } }:gsub("^%l", string.upper))
    elseif HasContentType == 'unspecified' then
        HasContentType = (frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-unspecified' } }:gsub("^%l", string.upper))
    end
    -- Define o idioma (usado para a legenda da tabela de expressão)
    if HasLanguageOfTheContent ~= '' then
        HasLanguageOfTheContent = ' | <span itemprop="inLanguage">' .. (frame:callParserFunction{ name = '#languagename', args = { HasLanguageOfTheContent } }:gsub("^%l", string.upper)) .. '</span>'
    end
    -- Início da tabela de expressão
    local expressionData = mw.html.create( 'table' )
    expressionData
    :addClass( 'table tableRight' )
        :tag( 'caption' )
        :addClass( 'caption' )
            :wikitext( HasContentType .. HasLanguageOfTheContent )
        :done()
    if HasTranslator ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-translator' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasTranslator, ';', 'x', '<span itemprop="contributor">[[x]]</span>', '<br />' } } )
            :done()
        expressionData:node( tr )
    end
    if HasIllustrator ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-illustrator' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasIllustrator, ';', 'x', '<span itemprop="illustrator">[[x]]</span>', '<br />' } } )
            :done()
        expressionData:node( tr )
    end
    if HasEditor ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-editor' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasEditor, ';', 'x', '<span itemprop="editor">[[x]]</span>', '<br />' } } )
            :done()
        expressionData:node( tr )
    end
    if HasContributor ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-contributor' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasContributor, ';', 'x', '<span itemprop="contributor">[[x]]</span>', '<br />' } } )
            :done()
        expressionData:node( tr )
    end
    if HasIllustrativeContent ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-illustrativeContent' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#replace', args = { frame:callParserFunction{ name = '#replace', args = { HasIllustrativeContent, 'il.', 'ilustrações' } }, 'ilustrações', frame:callParserFunction{ name = 'int', args = { 'Wikincat-illustrativeContent', '2' } } } } )
            :done()
        expressionData:node( tr )
    end
    if HasSummarizationOfTheContent ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-summarizationOfTheContent' } } )
            :done()
            :tag( 'td' )
                :tag( 'div' )
                :addClass( 'mw-collapsible mw-collapsed' )
                    :tag( 'span' )
                    :css( 'font-style', 'italic' )
                        :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-clickExpandToView' } } )
                    :done()
                    :tag( 'div' )
                    :addClass( 'mw-collapsible-content' )
                    :attr( 'itemprop', 'description' )
                        :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasSummarizationOfTheContent, '(+)', 'x', 'x', '\\n\\n\\n' } } )
                    :done()
                :done()
            :done()
        expressionData:node( tr )
    end
    expressions = frame:preprocess( '{{#ask:[[Has work manifested::Work:' .. HasWorkManifested .. ']] [[:+]]|format=list|link=none|headers=hide}}' ) or ''
    if expressions ~= mw.title.getCurrentTitle().text then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-designationOfEdition', '1' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#ask', args = { '[[Has work manifested::Work:' .. HasWorkManifested .. ']] [[:+]]', '?Has date of publication', format = 'list', link = 'all', headers = 'hide', sep = '<br />' } } )
            :done()
        expressionData:node( tr )
    end
    expressionData:allDone()
    -- Exibe a imagem da OpenLibrary abaixo da tabela de expressão
    local imgTable = mw.html.create( 'table' )
    if UrlCover then
        imgTable
        :addClass( 'tableRight' )
            :tag( 'tr' )
                :tag( 'td' )
                :addClass( 'center' )
                    :wikitext( '<img src="'  .. UrlCover .. '" alt="' .. mw.title.getCurrentTitle().text .. '">' )
                :done()
            :done()
        imgTable:allDone()
    end
    -- Início da tabela de manifestação
    manifestationCaption = ''
    if HasPlaceOfPublication ~= '' then
        manifestationCaption = frame:callParserFunction{ name = '#arraymap', args = { HasPlaceOfPublication, ';', 'x', 'x' } }
    end
    if HasPublishersName ~= '' then
        manifestationCaption = manifestationCaption .. ' | ' .. frame:callParserFunction{ name = '#arraymap', args = { HasPublishersName, ';', 'x', '<span itemprop="publisher copyrightHolder">x</span>' } }
    end
    if HasDateOfPublication ~= '' then
        manifestationCaption = manifestationCaption .. ' | ' .. '<span itemprop="datePublished">' .. HasDateOfPublication .. '</span>'
    end
    local manifestationData = mw.html.create( 'table' )
    manifestationData
    :addClass( 'table tableLeft' )
        :tag( 'caption' )
        :addClass( 'caption highlighted' )
            :wikitext( manifestationCaption )
                :tag( 'meta' )
                :attr( 'itemprop', 'name' )
                :attr( 'content', manifestationTitle )
                :done()
        :done()
    if HasStatementOfResponsibilityRelatingToTitleProper ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-statementOfResponsibilityRelatingToTitleProper' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasStatementOfResponsibilityRelatingToTitleProper )
            :done()
        manifestationData:node( tr )
    end
    if HasDesignationOfEdition ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-designationOfEdition' } } )
            :done()
            :tag( 'td' )
                :tag( 'span' )
                :attr( 'itemprop', 'bookEdition' )
                    :wikitext( HasDesignationOfEdition )
                :done()
            :done()
        manifestationData:node( tr )
    end
    if HasStatementOfResponsibilityRelatingToTheEdition ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-statementOfResponsibilityRelatingToTheEdition' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasStatementOfResponsibilityRelatingToTheEdition )
            :done()
        manifestationData:node( tr )
    end
    if HasPlaceOfDistribution ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-placeOfDistribution' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasPlaceOfDistribution, ';', 'x', 'x' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasDistributorsName ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-distributorsName' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasDistributorsName, ';', 'x', 'x' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasDateOfDistribution ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-dateOfDistribution' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasDateOfDistribution )
            :done()
        manifestationData:node( tr )
    end
    if HasPlaceOfManufacture ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-placeOfManufacture' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasPlaceOfManufacture, ';', 'x', 'x' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasManufacturersName ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-manufacturersName' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasManufacturersName, ';', 'x', 'x' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasDateOfManufacture ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-dateOfManufacture' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasDateOfManufacture )
            :done()
        manifestationData:node( tr )
    end
    if HasCopyrightDate ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-copyrightDate' } } )
            :done()
            :tag( 'td' )
                :tag( 'span' )
                :attr( 'itemprop', 'copyrightYear' )
                    :wikitext( HasCopyrightDate )
                :done()
            :done()
        manifestationData:node( tr )
    end
    if HasTitleProperOfSeries ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-titleProperOfSeries' } } )
            :done()
            :tag( 'td' )
            :addClass( 'plainlinks' )
                :wikitext( frame:preprocess( '[' .. frame:callParserFunction{ name = 'fullurl', args = { 'Template:Serie', seriesname = mw.uri.encode( HasTitleProperOfSeries ) } } .. ' ' .. HasTitleProperOfSeries .. ']') )
            :done()
        manifestationData:node( tr )
    end
    if HasStatementOfResponsibilityRelatingToSeries ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-statementOfResponsibilityRelatingToSeries' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasStatementOfResponsibilityRelatingToSeries )
            :done()
        manifestationData:node( tr )
    end
    if HasIssnOfSeries ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-issnOfSeries' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasIssnOfSeries )
            :done()
        manifestationData:node( tr )
    end
    if HasNumberingWithinSeries ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-numberingWithinSeries' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasNumberingWithinSeries )
            :done()
        manifestationData:node( tr )
    end
    if HasModeOfIssuance ~= '' then
        if HasModeOfIssuance == 'single unit' then
            HasModeOfIssuance = frame:callParserFunction{ name = 'int', args = { 'Wikincat-modeOfIssuance-singleUnit' } }
        elseif HasModeOfIssuance == 'multipart monograph' then
            HasModeOfIssuance = frame:callParserFunction{ name = 'int', args = { 'Wikincat-modeOfIssuance-multipartMonograph' } }
        elseif HasModeOfIssuance == 'serial' then
            HasModeOfIssuance = frame:callParserFunction{ name = 'int', args = { 'Wikincat-contentType-modeOfIssuance-serial' } }
        elseif HasModeOfIssuance == 'integrating resource' then
            HasModeOfIssuance = frame:callParserFunction{ name = 'int', args = { 'Wikincat-modeOfIssuance-integratingResource' } }
        end
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-modeOfIssuance' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasModeOfIssuance )
            :done()
        manifestationData:node( tr )
    end
    if HasMediaType ~= '' then
        if HasMediaType == 'unmediated' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-unmediated' } }
        elseif HasMediaType == 'audio' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-audio' } }
        elseif HasMediaType == 'computer' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-computer' } }
        elseif HasMediaType == 'microform' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-microform' } }
        elseif HasMediaType == 'microscopic' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-microscopic' } }
        elseif HasMediaType == 'projected' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-projected' } }
        elseif HasMediaType == 'stereographic' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-stereographic' } }
        elseif HasMediaType == 'video' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-video' } }
        elseif HasMediaType == 'other' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-other' } }
        elseif HasMediaType == 'unspecified' then
            HasMediaType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType-unspecified' } }
        end
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-mediaType' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasMediaType )
            :done()
        manifestationData:node( tr )
    end
    if HasFileType ~= '' then
        if HasFileType == 'text file' then
            HasFileType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType-textFile' } }
        elseif HasFileType == 'audio file' then
            HasFileType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType-audioFile' } }
        elseif HasFileType == 'data file' then
            HasFileType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType-dataFile' } }
        elseif HasFileType == 'image file' then
            HasFileType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType-imageFile' } }
        elseif HasFileType == 'program file' then
            HasFileType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType-programFile' } }
        elseif HasFileType == 'video file' then
            HasFileType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType-videoFile' } }
        end
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileType' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasFileType )
            :done()
        manifestationData:node( tr )
    end
    if HasEncodingFormat ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-encodingFormat' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasEncodingFormat )
            :done()
        manifestationData:node( tr )
    end
    if HasFileSize ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-fileSize' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasFileSize )
            :done()
        manifestationData:node( tr )
    end
    if HasUniformResourceLocator ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-uniformResourceLocator' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasUniformResourceLocator, '<nowiki> </nowiki>', 'x', 'x', '\\n\\n' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasCarrierType ~= '' then
        if HasCarrierType == 'volume' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unmediatedCarriers-volume' } }
        elseif HasCarrierType == 'audio cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-audioCartridge' } }
        elseif HasCarrierType == 'audio cylinder' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-audioCylinder' } }
        elseif HasCarrierType == 'audio disc' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-audioDisc' } }
        elseif HasCarrierType == 'sound track reel' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-soundTrackReel' } }
        elseif HasCarrierType == 'audio roll' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-audioRoll' } }
        elseif HasCarrierType == 'audiocassette' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-audiocassette' } }
        elseif HasCarrierType == 'audiotape reel' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-audioCarriers-audiotapeReel' } }
        elseif HasCarrierType == 'computer card' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerCard' } }
        elseif HasCarrierType == 'computer chip cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerChipCartridge' } }
        elseif HasCarrierType == 'computer disc' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerDisc' } }
        elseif HasCarrierType == 'computer disc cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerDiscCartridge' } }
        elseif HasCarrierType == 'computer tape cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerTapeCartridge' } }
        elseif HasCarrierType == 'computer tape cassette' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerTapeCassette' } }
        elseif HasCarrierType == 'computer tape reel' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-computerTapeReel' } }
        elseif HasCarrierType == 'online resource' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-computerCarriers-onlineResource' } }
        elseif HasCarrierType == 'aperture card' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-apertureCard' } }
        elseif HasCarrierType == 'microfiche' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microfiche' } }
        elseif HasCarrierType == 'microfiche cassette' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microficheCassette' } }
        elseif HasCarrierType == 'microfilm cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microfilmCartridge' } }
        elseif HasCarrierType == 'microfilm cassette' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microfilmCassette' } }
        elseif HasCarrierType == 'microfilm reel' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microfilmReel' } }
        elseif HasCarrierType == 'microfilm roll' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microfilmRoll' } }
        elseif HasCarrierType == 'microfilm slip' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microfilmSlip' } }
        elseif HasCarrierType == 'microopaque' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microformCarriers-microopaque' } }
        elseif HasCarrierType == 'microscope slide' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-microscopicCarriers-microscopeSlide' } }
        elseif HasCarrierType == 'film cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmCartridge' } }
        elseif HasCarrierType == 'film cassette' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmCassette' } }
        elseif HasCarrierType == 'film reel' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmReel' } }
        elseif HasCarrierType == 'film roll' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmRoll' } }
        elseif HasCarrierType == 'filmslip' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmslip' } }
        elseif HasCarrierType == 'filmstrip' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmstrip' } }
        elseif HasCarrierType == 'filmstrip cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-filmstripCartridge' } }
        elseif HasCarrierType == 'overhead transparency' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-overheadTransparency' } }
        elseif HasCarrierType == 'slide' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-projectedImageCarriers-slide' } }
        elseif HasCarrierType == 'stereograph card' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-stereographicCarriers-stereographCard' } }
        elseif HasCarrierType == 'stereograph disc' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-stereographicCarriers-stereographDisc' } }
        elseif HasCarrierType == 'card' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unmediatedCarriers-card' } }
        elseif HasCarrierType == 'flipchart' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unmediatedCarriers-flipchart' } }
        elseif HasCarrierType == 'roll' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unmediatedCarriers-roll' } }
        elseif HasCarrierType == 'sheet' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unmediatedCarriers-sheet' } }
        elseif HasCarrierType == 'object' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unmediatedCarriers-object' } }
        elseif HasCarrierType == 'video cartridge' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-videoCarriers-videoCartridge' } }
        elseif HasCarrierType == 'videocassette' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-videoCarriers-videocassette' } }
        elseif HasCarrierType == 'videodisc' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-videoCarriers-videodisc' } }
        elseif HasCarrierType == 'videotape reel' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-videoCarriers-videotapeReel' } }
        elseif HasCarrierType == 'other' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unspecifiedCarriers-unspecified' } }
        elseif HasCarrierType == 'unspecified' then
            HasCarrierType = frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType-unspecifiedCarriers-unspecified' } }
        end
    local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-carrierType' } } )
            :done()
            :tag( 'td' )
                :tag( 'span' )
                :attr( 'itemprop', 'bookFormat' )
                    :wikitext( HasCarrierType )
                :done()
            :done()
        manifestationData:node( tr )
    end
    if HasExtent ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-extentOfText' } } )
            :done()
            :tag( 'td' )
                :tag( 'span' )
                :attr( 'itemprop', 'numberOfPages' )
                    :wikitext( frame:callParserFunction{ name = '#replace', args = { frame:callParserFunction{ name = '#replace', args = { HasExtent, 'p.', 'páginas' } }, 'páginas', frame:callParserFunction{ name = 'int', args = { 'Wikincat-page', '2' } } } } )
                :done()
            :done()
        manifestationData:node( tr )
    end
    if HasDimensions ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-dimensions' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasDimensions )
            :done()
        manifestationData:node( tr )
    end
    if HasNoteOnResource ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-note' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasNoteOnResource, '\\n', 'x', 'x', '<br />' } } )
            :done()
        manifestationData:node( tr )
    end
    if ISBN( HasIsbn, 'fix-checksum' ) then 
        if isbn13 then
            HasIsbn = '<span itemprop="isbn">[[Special:Booksources/' .. isbn13 .. '|' .. isbn13 .. ']]</span>, ' .. '<span itemprop="isbn">[[Special:Booksources/' .. isbn10 .. '|' .. isbn10 .. ']]</span>'
        elseif isbn10 then
            HasIsbn = '<span itemprop="isbn">[[Special:Booksources/' .. isbn10 .. '|' .. isbn10 .. ']]</span>, ' .. '<span itemprop="isbn">[[Special:Booksources/' .. isbn13 .. '|' .. isbn13 .. ']]</span>'
        end
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-identifierForTheManifestation' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasIsbn )
            :done()
        manifestationData:node( tr )
    end
    if ISBN( HasAdditionalIsbn, 'fix-checksum' ) then 
        if isbn132 then
            HasAdditionalIsbn = '<span itemprop="isbn">[[Special:Booksources/' .. isbn132 .. '|' .. isbn132 .. ']]</span>, ' .. '<span itemprop="isbn">[[Special:Booksources/' .. isbn102 .. '|' .. isbn102 .. ']]</span>'
        elseif isbn102 then
            HasAdditionalIsbn = '<span itemprop="isbn">[[Special:Booksources/' .. isbn102 .. '|' .. isbn102 .. ']]</span>, ' .. '<span itemprop="isbn">[[Special:Booksources/' .. isbn132 .. '|' .. isbn132 .. ']]</span>'
        end
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-identifierForTheManifestation' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasAdditionalIsbn )
            :done()
        manifestationData:node( tr )
    end
    if HasDoi ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-doi' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasDoi, ';', 'y', '[[doi:y|y]]' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasIssn ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-issn' } } )
            :done()
            :tag( 'td' )
                :wikitext( frame:callParserFunction{ name = '#arraymap', args = { HasIssn, ';', 'x', 'x' } } )
            :done()
        manifestationData:node( tr )
    end
    if HasLccn ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-lccn' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasLccn )
                :tag( 'small' )
                    :wikitext( ' ([//lccn.loc.gov/' .. HasLccn .. ' ' .. frame:callParserFunction{ name = 'int', args = { 'Wikincat-searchForThisBookInLC' } } .. '] - [//lccn.loc.gov/' .. HasLccn .. '/marcxml MarcXML], [//lccn.loc.gov/' .. HasLccn .. '/mods MODS], [//lccn.loc.gov/' .. HasLccn .. '/dc DublinCore])' )
                :done()
            :done()
        manifestationData:node( tr )
    end
    if HasOclcNumber ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-oclc' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasOclcNumber )
                :tag( 'small' )
                    :wikitext( ' ([//www.worldcat.org/oclc/' .. HasOclcNumber .. ' ' .. frame:callParserFunction{ name = 'int', args = { 'Wikincat-searchForThisBookInWorldCat' } } .. '])' )
                :done()
            :done()
        manifestationData:node( tr )
    end
    if HasOpenLibraryIdentifier ~= '' then
        local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-olid' } } )
            :done()
            :tag( 'td' )
                :wikitext( HasOpenLibraryIdentifier )
                :tag( 'small' )
                    :wikitext( ' ([//openlibrary.org/books/' .. HasOpenLibraryIdentifier .. ' ' .. frame:callParserFunction{ name = 'int', args = { 'Wikincat-searchForThisBookInOpenLibrary' } } .. '] - [//openlibrary.org/books/' ..  HasOpenLibraryIdentifier .. '.rdf RDF], [//openlibrary.org/books/' .. HasOpenLibraryIdentifier .. '.json JSON])' )
                :done()
            :done()
        manifestationData:node( tr )
    end
    local availableFormats = '[[Special:ExportRDF/' ..
    mw.title.getCurrentTitle().prefixedText ..
    '|RDF]], [' .. frame:callParserFunction{ name = 'fullurl', args = { 'Special:ViewXML', titles = mw.uri.encode( 'Work:' ..
    HasWorkManifested .. '|' .. mw.title.getCurrentTitle().prefixedText ) } } .. ' XML], ' ..
    frame:preprocess( '{{#ask: [[{{PAGENAME}}]]|?Has full title|?Has statement of responsibility relating to title proper|?Has designation of edition|?Has place of publication|?Has publisher\'s name|?Has date of publication|?Has extent|?Has title proper of series|?Has uniform resource locator|format=json|mainlabel=-|prettyprint=yes}}, {{#ask: [[{{PAGENAME}}]]|?Has full title|?Has statement of responsibility relating to title proper|?Has designation of edition|?Has place of publication|?Has publisher\'s name|?Has date of publication|?Has extent|?Has title proper of series|?Has uniform resource locator|format=csv|mainlabel=-|filename={{#sub:{{PAGENAMEE}}|0|50}}.csv}}, {{#ask: [[{{PAGENAME}}]]|?Has place of publication=address|?Has creator=author|?Has page name=crossref|?Has DOI=doi|?Has designation of edition=edition|?Has editor=editor|?Has extent=pages|?Has publisher\'s name=publisher|?Has title proper of series=series|?Has full title=title|?Has uniform resource locator=url|?Has date of publication=year|format=bibtex|mainlabel=-|searchlabel=BibTex}}' ) ..
    ', [' .. frame:callParserFunction{ name = 'fullurl', args = { 'Template:ABNT', fullpagename = mw.uri.encode( mw.title.getCurrentTitle().prefixedText ) } } .. ' ABNT]'
    local tr = mw.html.create( 'tr' )
        tr
            :tag( 'th' )
            :addClass( 'cell' )
                :wikitext( frame:callParserFunction{ name = 'int', args = { 'Wikincat-availableFormat' } } )
            :done()
            :tag( 'td' )
            :addClass( 'plainlinks' )
                :wikitext( availableFormats )
            :done()
        manifestationData:node( tr )
    manifestationData:allDone()

    return workData, tostring( expressionData ), tostring( imgTable ), tostring( manifestationData ), category, invalidISBN, invalidAdditionalISBN 
end
return p