OASIS LegalDocumentML (LegalDocML) TC

Expand all | Collapse all

Fwd: Re: [akomantoso-xml] mapping of Akoma Ntoso to HTML elements

  • 1.  Fwd: Re: [akomantoso-xml] mapping of Akoma Ntoso to HTML elements

    Posted 09-20-2013 13:58
    The same invitation for legalDocML TC members. mp -------- Messaggio originale -------- Oggetto: Re: [akomantoso-xml] mapping of Akoma Ntoso to HTML elements Data: Fri, 20 Sep 2013 15:56:26 +0200 Mittente: monica.palmirani <monica.palmirani@unibo.it> A: akomantoso-xml@googlegroups.com Hi Ashok, please find in attachment the XSLT that we have developed for the Italian Senate in order to transform an XML AKN 3.0 file in XHTML. The main purpose was to have an XHTML usable by Scriba for producing ePub format. I am happy if you could test it in order to improve the transformation for all the kind of AKN documents. Yours, Monica Il 20/09/2013 15:36, Ashok Hariharan ha scritto: Is there a standard recommended mapping of Akoma Ntoso elements to HTML elements ?  I can see the logical way to map things (blocks -> div, inlines -> span) , but is there a recommended method ?  Ashok -- You received this message because you are subscribed to the Google Groups akomantoso-xml group. To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xml+unsubscribe@googlegroups.com . To post to this group, send email to akomantoso-xml@googlegroups.com . Visit this group at http://groups.google.com/group/akomantoso-xml . For more options, visit https://groups.google.com/groups/opt_out . -- =================================== Associate professor of Legal Informatics School of Law Alma Mater Studiorum Università di Bologna C.I.R.S.F.I.D. http://www.cirsfid.unibo.it/ Palazzo Dal Monte Gaudenzi - Via Galliera, 3 I - 40121 BOLOGNA (ITALY) Tel +39 051 277217 Fax +39 051 260782 E-mail monica.palmirani@unibo.it ==================================== <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" ; xmlns:akn=" http://docs.oasis-open.org/legaldocml/ns/akn/3.0/CSD03" ; xmlns=" http://www.w3.org/1999/xhtml" ; exclude-result-prefixes="akn" version="2.0"> <!-- XSLT for converting XML AKOMA NTOSO file in XHTML developed by CIRSFID Luca Cervone Monica Palmirani with the gentle cooperation of the Senate of Italian Republic --> <xsl:output method="xml" doctype-system=" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ; doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="text()"> <xsl:value-of select="normalize-space(.)"/> </xsl:template> <xsl:template match="akn:akomaNtoso"> <html> <head> <title>AkomaNtoso document</title> <style type="text/css"> html{ } body{ padding:10px; } .coverPage{ text-align:left; } .coverPage .docProponent{ font-weight:bold; margin-left:5px; } .coverPage .docProponent:after{ content:'a'; white-space:pre; } .preface{ text-align:center; width:80%; margin-left:auto; margin-right:auto; } .preface .docTitle{ font-weight:bold; display:block; } .preface .docNumber{ font-weight:bold; display:block; } .preface .docType{ font-weight:bold; display:block; } .preface .docDate{ font-style:italic; display:block; } .preface .docProponent{ font-style:italic; } .preamble p{ text-indent:10px; } .listIntroduction{ display:block; font-style:italic; margin-bottom:10px; } ul{ list-style:none; margin:0px; padding:0px; } .blockList{ margin-left:10px; } li .num{ display:inline; float:left; margin-right:5px; } .point .num{ display:inline; float:left; margin-right:5px; font-style:italic; } p[data-class = centrado]{ text-align:center; } p[data-class = center]{ text-align:center; } p[data-class = centrato]{ text-align:center; } .hierarchy{ margin-left:10px; } .body > .hierarchy > .content > p > .docTitle{ display:block; text-align:center; font-weight:bold; } .title > .num{ display:block; margin-bottom:5px; } .chapter .num{ font-weight:bold; display:block; text-align:center; margin-bottom:10px; } .chapter .heading{ font-style:italic; display:block; text-align:center; width:100%; margin-bottom:10px; } .chapter .subheading{ display:block; margin-bottom:5px; } .article .num{ font-weight:bold; display:block; text-align:center; } .article .heading{ font-style:italic; display:block; text-align:center; width:100%; } .section .num{ display:inline; float:left; margin-right:5px; } .section .heading{ } .clause{ margin-left:0px; } .conclusions p{ font-weight:bold; } .paragraph .num{ display:block; float:left; margin-right:5px; } .mainBody .img{ width:80%; }</style> </head> <body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="akn:doc"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:mainBody"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:statement"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:amendmentList"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:officialGazette"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:documentCollection"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:interstitial"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' blocksreq')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:collectionBody"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:fragment"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:fragmentBody"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:act"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:bill"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' container')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:body"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' bodyType')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:debateReport"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:debate"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:debateBody"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:judgement"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:judgementBody"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:amendment"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:amendmentBody"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:recitals"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:recital"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:citations"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:citation"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:longTitle"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' blocksreq')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:formula"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:coverPage"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' basicopt')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:preamble"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' preambleopt')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:preface"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' prefaceopt')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:conclusions"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' basicopt')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:header"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' blocksopt')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:attachments"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:componentRef"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <a> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:attribute name="href" select="@src"/> <xsl:apply-templates/> </a> </xsl:template> <xsl:template match="akn:documentRef"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchicalStructure')"/> <a> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:attribute name="href" select="@src"/> <xsl:apply-templates/> </a> </xsl:template> <xsl:template match="akn:clause"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:section"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:part"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:paragraph"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:chapter"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:title"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:book"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:tome"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:article"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:division"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:list"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:point"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:indent"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:alinea"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subsection"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subpart"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subparagraph"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subchapter"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subtitle"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subdivision"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:subclause"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:sublist"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:transitional"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' hierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:content"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' blocksreq')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:num"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' inline')"/> <span> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="akn:heading"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' inline')"/> <span> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="akn:subheading"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' inline')"/> <span> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </span> </xsl:template> <xsl:template match="akn:intro"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' blocksreq')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:wrap"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' blocksreq')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:administrationOfOath"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:rollCall"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:prayers"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:oralStatements"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:writtenStatements"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:personalStatements"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:ministerialStatements"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:resolutions"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:nationalInterest"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:declarationOfVote"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:communication"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if> <xsl:apply-templates/> </div> </xsl:template> <xsl:template match="akn:petitions"> <xsl:variable name="originalClass" select="@class"/> <xsl:variable name="class" select="$originalClass, ' ', concat(local-name(.),' althierarchy')"/> <div> <xsl:attribute name="class" select="$class"/> <xsl:if test="@id"> <xsl:attribute name="id" select="@id"/> </xsl:if> <xsl:if test="@style"> <xsl:attribute name="style" select="@style"/> </xsl:if&


  • 2.  Re: [legaldocml] Fwd: Re: [akomantoso-xml] mapping of Akoma Ntoso to HTML elements

    Posted 09-20-2013 15:02
    Thank you very much monica ! Ashok On 20 September 2013 16:57, monica.palmirani < monica.palmirani@unibo.it > wrote: The same invitation for legalDocML TC members. mp -------- Messaggio originale -------- Oggetto: Re: [akomantoso-xml] mapping of Akoma Ntoso to HTML elements Data: Fri, 20 Sep 2013 15:56:26 +0200 Mittente: monica.palmirani <monica.palmirani@unibo.it> A: akomantoso-xml@googlegroups.com Hi Ashok, please find in attachment the XSLT that we have developed for the Italian Senate in order to transform an XML AKN 3.0 file in XHTML. The main purpose was to have an XHTML usable by Scriba for producing ePub format. I am happy if you could test it in order to improve the transformation for all the kind of AKN documents. Yours, Monica Il 20/09/2013 15:36, Ashok Hariharan ha scritto: Is there a standard recommended "mapping" of Akoma Ntoso elements to HTML elements ?  I can see the logical way to map things (blocks -> div, inlines -> span) , but is there a recommended method ?  Ashok -- You received this message because you are subscribed to the Google Groups "akomantoso-xml" group. To unsubscribe from this group and stop receiving emails from it, send an email to akomantoso-xml+unsubscribe@googlegroups.com . To post to this group, send email to akomantoso-xml@googlegroups.com . Visit this group at http://groups.google.com/group/akomantoso-xml . For more options, visit https://groups.google.com/groups/opt_out . -- =================================== Associate professor of Legal Informatics School of Law Alma Mater Studiorum Università di Bologna C.I.R.S.F.I.D. http://www.cirsfid.unibo.it/ Palazzo Dal Monte Gaudenzi - Via Galliera, 3 I - 40121 BOLOGNA (ITALY) Tel +39 051 277217 Fax +39 051 260782 E-mail monica.palmirani@unibo.it ==================================== --------------------------------------------------------------------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail.  Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php