Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatted code using EditorConfig #508

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ charset = utf-8
indent_style = space
indent_size = 4



# Don't insert newlines in `mimetype` files
[mimetype]
insert_final_newline = false
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
*.odp diff=zip
*.otp diff=zip
*.odf diff=zip
*.odb diff=zip
*.odb diff=zip
180 changes: 90 additions & 90 deletions documentation/nordic2020-schematron-to-html.xsl
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://purl.oclc.org/dsdl/schematron" exclude-result-prefixes="#all" version="2.0">
<xsl:template match="/">
<html lang="en" xml:lang="en">
<head>
<title>Schematron rules for Nordic EPUB 2020-1</title>
<style>
body{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
max-width: 95%;
margin: auto;
}
h1{
text-align: center;
font-size: 1.5rem;
margin-top: 1rem;
margin-bottom: 2rem;
}
table,
th,
td{
border: 0.1rem solid #ddd;
border-collapse: collapse;
padding: 0.5rem;
}
table{
margin-bottom: 2rem
}
tr:nth-child(even){
background-color: #f2f2f2;
}
tbody tr:hover{
background-color: #ddd;
}
thead{
background-color: #1D393C;
color: white;
}
td:first-child{
white-space: nowrap;
}
footer{
margin-top: 1rem;
margin-bottom: 1rem;
text-align: center;
font-size: 0.8rem;
}</style>
</head>
<body>
<h1>Schematron rules for Nordic EPUB 2020-1</h1>
<table>
<thead>
<tr>
<th>Rule</th>
<th>Global description</th>
<th>Detailed description</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="//sch:pattern">
<tr>
<td>
<xsl:value-of select="substring(sch:title, 6)"/>
</td>
<td>
<xsl:value-of select="sch:p"/>
</td>
<td>
<xsl:for-each select="sch:rule/sch:report | sch:rule/sch:assert">
<xsl:choose>
<xsl:when test="not(following-sibling::sch:report or following-sibling::sch:assert)">
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
<br/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<br/>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sch="http://purl.oclc.org/dsdl/schematron" exclude-result-prefixes="#all" version="2.0">
<xsl:template match="/">
<html lang="en" xml:lang="en">
<head>
<title>Schematron rules for Nordic EPUB 2020-1</title>
<style>
body{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
max-width: 95%;
margin: auto;
}
h1{
text-align: center;
font-size: 1.5rem;
margin-top: 1rem;
margin-bottom: 2rem;
}
table,
th,
td{
border: 0.1rem solid #ddd;
border-collapse: collapse;
padding: 0.5rem;
}
table{
margin-bottom: 2rem
}
tr:nth-child(even){
background-color: #f2f2f2;
}
tbody tr:hover{
background-color: #ddd;
}
thead{
background-color: #1D393C;
color: white;
}
td:first-child{
white-space: nowrap;
}
footer{
margin-top: 1rem;
margin-bottom: 1rem;
text-align: center;
font-size: 0.8rem;
}</style>
</head>
<body>
<h1>Schematron rules for Nordic EPUB 2020-1</h1>
<table>
<thead>
<tr>
<th>Rule</th>
<th>Global description</th>
<th>Detailed description</th>
</tr>
</thead>
<tbody>
<xsl:for-each select="//sch:pattern">
<tr>
<td>
<xsl:value-of select="substring(sch:title, 6)"/>
</td>
<td>
<xsl:value-of select="sch:p"/>
</td>
<td>
<xsl:for-each select="sch:rule/sch:report | sch:rule/sch:assert">
<xsl:choose>
<xsl:when test="not(following-sibling::sch:report or following-sibling::sch:assert)">
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
<br/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<br/>
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@
<configuration>
<excludes>
<!-- You can exclude further files from processing: -->
<exclude>src/test/**/*.epub</exclude>
<exclude>**/*.otf</exclude>
<exclude>documentation/*.odg</exclude>
<exclude>src/test/**/*.epub</exclude>
<exclude>**/*.otf</exclude>
<exclude>documentation/*.odg</exclude>
</excludes>
</configuration>
</plugin>
Expand Down
Loading