Skip to content

Commit

Permalink
Merge branch 'release/2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomschr committed Dec 3, 2015
2 parents 795bd0c + 81f2227 commit e070c0f
Show file tree
Hide file tree
Showing 48 changed files with 1,193 additions and 472 deletions.
11 changes: 11 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[bumpversion]
current_version = 2.0.3
commit = True
tag = False

[bumpversion:file:Makefile]

[bumpversion:file:packaging/suse-xsl-stylesheets.spec]

[bumpversion:file:README.adoc]

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tmp/
.#*
*~
*.swp
env/

# This directory should be generated by bin/xmlns-build:
suse2013-ns/
59 changes: 59 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
-------------------------------------------------------------------
Tue Dec 02 13:41:00 UTC 2015 - [email protected]

Stable release DAPS 2.0.4:

Find issues in our GitHub tracker at https://github.com/openSUSE/suse-xsl/issues/NUMBER

* Schema:
- Allow constant and see (inside indexterm); make db.all.blocks zero
or more (*) for question (fbebfb6)
- Remove XLinks from DB5 elements (issue #99)
- Disallow db.all.blocks in lists (issue #100)
- Remove menuchoice from guiinlines (Novdoc) (a049b85)
- Allow menuchoice in titles (Novdoc) (975b8d6)

* Stylesheets (PDF):
- "unbolded" admonition titles (issue #46)
- Odd space in footer where productname used to beproductname not displayed
on book title page (issue #50)
- Style sect5 Titles (issue #52)
- FOP don't like empty <fo:table-cell>s (issue #97)
- Make remark handling a little more elegant
- Attribute sets: fix logic for replacing bold/italic in CJK languages

* Stylesheets (XHTML):
- Make Callouts "uncopyable" (issue #55)
- Don't link inline images (issue #65)
- Publication date is incorrectly capitalized (issue #70)
- debug.filename-id: Use xml:id for metadata
- Various fixes for JS code for tracker

* Common Stylesheet Changes:
- Style for <package/> (issue #49)
- xrefs to variablelists in another book is broken (issue #73)
- Trim spaces/newlines at beginning/end of verbatim elements (eba1e8b)
- Feature/fix bugtracker for db4 (issue #102)

* Infrastructure:
- Fixed xslns-build script (issue #57)
- Wrong includes in daps2013-ns, opensuse2013-ns (issue #107)
- Defect URLs in Entities of the *-ns Stylesheets (issue #108)
- Consistent variable names and indendation

-------------------------------------------------------------------
Tue Aug 11 15:11:52 UTC 2015 - [email protected]

Stable release 2.0.3 (only for OBS):

- Schema:
. Fixed #41: Missing prompt element

- Stylesheets:
. Fixed #18: Variablelist (with ID and Title) Lacks Permalink
. Fixed #31: not declared namespace prefix d
. Fixed #36: Fix Hard-Coded Bugzilla Link ("Report Bug")

- Infrastructure:
. no changes

-------------------------------------------------------------------
Tue Jul 02 09:11:00 UTC 2015 - [email protected]

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif
SHELL := /bin/bash
PACKAGE := suse-xsl-stylesheets
# HINT: Also raise version number in packaging/suse-xsl-stylesheets.spec
VERSION := 2.0.2
VERSION := 2.0.4
CDIR := $(shell pwd)
DIST_EXCLUDES := packaging/exclude-files_for_susexsl_package.txt
SUSE_XML_PATH := $(PREFIX)/xml/suse
Expand Down Expand Up @@ -72,7 +72,7 @@ XHTML2HTML := $(DIR2005)/common/xhtml2html.xsl
HTMLSTYLESHEETS := $(subst $(DIR2005)/xhtml,$(DEV_HTML_DIR),$(wildcard $(DIR2005)/xhtml/*.xsl))

#-------
# Local Stylsheets Directories
# Local Stylesheets Directories

DEV_DIR2005 := $(DEV_STYLE_DIR)/$(DIR2005)-ns
DEV_DIR2013_DAPS := $(DEV_STYLE_DIR)/$(DIR2013_DAPS)-ns
Expand Down
24 changes: 18 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
SUSE XSL Stylesheets
====================
SUSE XSL Stylesheets v2.0.4
===========================
Thomas Schraitle <toms@opensuse.org>

:numbered:
:website: https://github.com/openSUSE/suse-xsl

This project contains customization layers for the DocBook XSL stylesheets.

Requirements for Building the Stylesheets
-----------------------------------------

Requirements
------------
These stylesheets can be used as-is for DocBook 4 content.
To use them with DocBook 5 content, build them with `make`.
For a successful build, you will need:

* standard GNU utilities (`cat`, `sed`, `tar`, ...)
* `trang`
* `xsltproc`
* `xmlcatalog`
* `aspell`
Requirements for Using the Stylesheets
--------------------------------------

* DAPS from https://github.com/openSUSE/daps
* DocBook XSL stylesheets from https://sourceforge.net/projects/docbook/
* XSLT processor like `xsltproc`, Saxon6
* XSLT processor like `xsltproc` or Saxon 6 (needs to have support for exslt)
* Python 3
23 changes: 21 additions & 2 deletions bin/xslns-build
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,11 @@ sub nsfilter {
select($Output); $| = 1;

# Add the docbook5 namespace declaration to root element

s|(xmlns:xsl\s*=\s*"http://www.w3.org/1999/XSL/Transform"(?!>))(\s*\n?)(\s*)|$1$2$3xmlns:d="http://docbook.org/ns/docbook"\n$3|s;

# FIXME: The following line (and others in this script) assume that the
# namespace "xsl" is the namespace used for XSLT.

s|([ \t]*)(xmlns:xsl\s*=\s*"http://www.w3.org/1999/XSL/Transform")|$1$2\n$1xmlns:d="http://docbook.org/ns/docbook"|s;

# Add namespace d to exclude-result-prefixes

Expand All @@ -305,6 +308,11 @@ sub nsfilter {
# http://docbook.sourceforge.net/release/xsl-ns
s|(http://docbook.sourceforge.net/release/xsl)/|$1-ns/|sg;

# Change https://raw.githubusercontent.com/openSUSE/suse-xsl/master/*/
# to
# https://raw.githubusercontent.com/openSUSE/suse-xsl/master/*-ns/
s|(https?://raw.githubusercontent.com/openSUSE/suse-xsl/master/[^/]*)/|$1-ns/|sg;

# Convert stripNS to addNS
s|stripns\.xsl|addns.xsl|sg;
s|no\.namespace|with.namespace|sg;
Expand Down Expand Up @@ -438,6 +446,9 @@ sub indexentitydecl {
$newstring .= $before;
$newstring .= $entitystart;

# skip URls
return $string if $value =~ /^(http:|https:|ftp:)/;

while ( $value =~ /^(.*?)(\$$w|$w\(|$ns:$n|$w:|db:$n|\@$n:$n|'.*?'|&$w;|\@$w|not \(|stringlength \(|normalize-space \()(.*$)/sg ) {

# process the leading content which is not pass through
Expand Down Expand Up @@ -511,6 +522,14 @@ sub namespacefilter {
elsif ($pre =~ /[-._A-Z]$/ || $rest =~ /^[-._A-Z]/) {
$newstring .= $name;
}
# Pass through if character reference
elsif ($pre =~ /^\&#$/) {
$newstring .= $name;
}
# Pass through if font size declaration
elsif ($name =~ /^pt$/) {
$newstring .= $name;
}
else {
# add the namespace prefix
$newstring .= "d:" . $name;
Expand Down
6 changes: 1 addition & 5 deletions daps2013/fo/docbook.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format"
exclude-result-prefixes="exsl">

<!-- FIXME: Better use a full URL for catalog-based resolution here? The
caveat of doing that would of course be possible dependency issues,
since we generally want matching stylesheets not any and all that are
installed on the system. -->
<xsl:import href="../../suse2013/fo/docbook.xsl"/>
<xsl:import href="https://raw.githubusercontent.com/openSUSE/suse-xsl/master/suse2013/fo/docbook.xsl"/>

<xsl:include href="../version.xsl"/>

Expand Down
82 changes: 65 additions & 17 deletions daps2013/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ p a:visited {
color: #5C3566;
}

code, .command, .keycap, .replaceable {
code, .command, .keycap, .replaceable, .package {
font-family: 'DejaVu Sans Mono', 'DejaVuSansMono', 'Menlo', 'Andale Mono', monospace;
font-weight: normal;
padding: 0 4px;
Expand All @@ -1754,26 +1754,50 @@ code, .command, .keycap, .replaceable {
line-height: 120%;
}

code, .command, .keycap {
.verbatim-wrap code, .verbatim-wrap .command, .verbatim-wrap .replaceable,
.verbatim-wrap .literal, .verbatim-wrap .package {
/*
Avoid transforming this:
<screen><prompt>prompt $ </prompt><command>very-long-\
command</command></screen>
to output looking like this (bad!):
very-long-\
prompt $ command
instead of this (goood!):
prompt $ very-long-\
command
*/
display: inline;
}

code, .command, .keycap, .literal, .package {
font-style: normal;
}

code code, code .replaceable, .replaceable code {
/* Not quite sure if that is the best way to make sure no text inside code gets
paddings/borders... In some rare case, there might e.g. be an image inside a
code/etc. element and then this might backfire. */
code *, .keycap *, .replaceable *, .literal *, .package * {
padding: 0;
border: none;
}


.name code, a code, .admonition h6 code,
.name .replaceable, a .replaceable, .admonition h6 .replaceable {
.name .replaceable, a .replaceable, .admonition h6 .replaceable,
.name .literal, a .literal, .admonition h6 .literal,
.name .package, a .package, .admonition h6 .package {
color: inherit;
}

.admonition h6 code, .admonition h6 .replaceable {
border-color: #D1D1D3;
}

code {
code, .literal, .replaceable, .package {
font-weight: normal;
}

Expand Down Expand Up @@ -1816,15 +1840,16 @@ code {
line-height: 125%;
}

.verbatim-wrap > div {
.verbatim-wrap > div, .verbatim-wrap pre {
display: block;
width: 100%;
overflow: auto;
overflow-y: hidden;
text-align: left;
}

.verbatim-wrap code, .verbatim-wrap .replaceable {
border-radius: 0;
.verbatim-wrap code, .verbatim-wrap .replaceable, .verbatim-wrap .literal,
.verbatim-wrap .package {
background-color: transparent;
font-size: 100%;
border: none;
Expand Down Expand Up @@ -1875,6 +1900,13 @@ code {
font-weight: 600;
}

.verbatim-wrap .callout {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.calloutlist .callout {
position: relative;
top: 2px;
Expand Down Expand Up @@ -2017,8 +2049,10 @@ div.figure {

a:hover .keycap, a:focus .keycap, a:active .keycap,
a:hover code, a:focus code, a:active code,
a:hover .replaceable, a:focus .replaceable, a:active .replaceable {
border-color: #3465A4;
a:hover .replaceable, a:focus .replaceable, a:active .replaceable,
a:hover .literal, a:focus .literal, a:active .literal,
a:hover .package, a:focus .package, a:active .package {
border-color: #439239;
}


Expand Down Expand Up @@ -2081,20 +2115,27 @@ a:hover .replaceable, a:focus .replaceable, a:active .replaceable {
}

.procedure-title code, .procedure-title .replaceable, .procedure-title .keycap,
.procedure-title .literal, .procedure-title .package,
.table-title code, .table-title .replaceable, .table-title .keycap,
.table-title .literal, .table-title .package,
.example-title code, .example-title .replaceable, .example-title .keycap,
.example-title .literal, .example-title .package,
.figure-title code, .figure-title .replaceable, .figure-title .keycap,
.figure-title .literal, .figure-title .package,
.orderedlist-title code, .orderedlist-title .replaceable, .orderedlist-title .keycap,
.orderedlist-title .literal, .orderedlist-title .package,
.variablelist-title code, .variablelist-title .replaceable, .variablelist-title .keycap,
.itemizedlist-title code, .itemizedlist-title .replaceable, .itemizedlist-title .keycap {
.variablelist-title .literal, .variablelist-title .package,
.itemizedlist-title code, .itemizedlist-title .replaceable, .itemizedlist-title .keycap,
.itemizedlist-title .literal, .itemizedlist-title .package {
text-transform: none;
}

.procedure-contents {
border-left: 3px solid #8CA4C0;
font-weight: normal;
margin: 17px 0 17px;
/* Up top, 3px pf padding look better than 5 would (with line-height interfering etc.).
/* Up top, 3px of padding look better than 5 would (with line-height interfering etc.).
On the left, we use 5px-3px of border, so it sits right there with any other lists etc. */
padding: 3px 5px 6px 2px;
background-color: #F6F8FA;
Expand Down Expand Up @@ -2277,7 +2318,7 @@ div.itemizedlist {
margin: 0 0 24px;
}

.question, .question code, .question .literal {
.question, .question code, .question .keycap, .question .literal, .question .package {
color: #666;
}

Expand All @@ -2294,8 +2335,15 @@ div.itemizedlist {
}

.js-on .question:hover code, .js-on .question:focus code,
.js-on .active .question code, .js-on .question:hover .replaceable,
.js-on .question:focus .replaceable, .js-on .active .question .replaceable {
.js-on .active .question code,
.js-on .question:hover .keycap, .js-on .question:focus .keycap,
.js-on .active .question .keycap,
.js-on .question:hover .replaceable, .js-on .question:focus .replaceable,
.js-on .active .question .replaceable,
.js-on .question:hover .literal, .js-on .question:focus .literal,
.js-on .active .question .literal,
.js-on .question:hover .package, .js-on .question:focus .package,
.js-on .active .question .package {
color: #333;
}

Expand Down Expand Up @@ -2914,9 +2962,9 @@ p.ds-message {
padding-right: 0;
}

/* The page probably is not wide anymore for inline-blocks to help
/* The page probably is not wide enough anymore for inline-blocks to help
avoid wrapping. */
code, .replaceable {
code, .replaceable, .literal, .package {
display: inline;
}

Expand Down
6 changes: 1 addition & 5 deletions daps2013/xhtml/chunk.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
exclude-result-prefixes="exsl l t">

<xsl:import href="docbook.xsl"/>
<!-- FIXME: Better use a full URL for catalog-based resolution here? The
caveat of doing that would of course be possible dependency issues,
since we generally want matching stylesheets not any and all that are
installed on the system. -->
<xsl:import href="../../suse2013/xhtml/chunk-common.xsl"/>
<xsl:import href="https://raw.githubusercontent.com/openSUSE/suse-xsl/master/suse2013/xhtml/chunk-common.xsl"/>
<xsl:include href="&www;/manifest.xsl"/>
<xsl:include href="&www;/chunk-code.xsl"/>

Expand Down
Loading

0 comments on commit e070c0f

Please sign in to comment.