Skip to content

Commit

Permalink
Fix validation issues for xml:id and linkend
Browse files Browse the repository at this point in the history
GeekoDoc restricts identifiers in xml:id/linkend attributes
and allows only specific characters (no dots, underscores).

* Replace dots/underscores with "-"
* Correct ROOTID in DC files
* Set validation schema in DC files to GeekoDoc
  • Loading branch information
tomschr committed Jul 23, 2024
1 parent b31d9ee commit 05a8958
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 21 deletions.
5 changes: 3 additions & 2 deletions DC-obs-admin-guide
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Basics
MAIN="MAIN-obs.xml"
# See "book-obs-admin-guide.xml"
ROOTID="book.obs-admin"
ROOTID="book-obs-admin"

## Profiling
PROFOS="opensuse;novell"
Expand All @@ -18,8 +18,9 @@ PROFCONDITION="bogus"
STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns"
FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse"

### Use DocBook5 instead of GeekoDoc
### Use GeekoDoc
#DOCBOOK5_RNG_URI="http://docbook.org/xml/5.2/rng/docbookxi.rng"
DOCBOOK5_RNG_URI="urn:x-suse:rng:v2:geekodoc-flat"

## Disabled SUSE logo
XSLTPARAM="--param generate.logo=0"
Expand Down
3 changes: 2 additions & 1 deletion DC-obs-all
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ PROFCONDITION="bogus"
STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns"
FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse"

### Use DocBook5 instead of GeekoDoc
### Use GeekoDoc
#DOCBOOK5_RNG_URI="http://docbook.org/xml/5.2/rng/docbookxi.rng"
DOCBOOK5_RNG_URI="urn:x-suse:rng:v2:geekodoc-flat"

## enable sourcing
export DOCCONF=$BASH_SOURCE
5 changes: 3 additions & 2 deletions DC-obs-user-guide
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Basics
MAIN="MAIN-obs.xml"
# See "book-obs-user-guide.xml"
ROOTID="book.obs-user"
ROOTID="book-obs-user"

## Profiling
PROFOS="opensuse;novell"
Expand All @@ -18,8 +18,9 @@ PROFCONDITION="bogus"
STYLEROOT="/usr/share/xml/docbook/stylesheet/suse2022-ns"
FALLBACK_STYLEROOT="/usr/share/xml/docbook/stylesheet/suse"

### Use DocBook5 instead of GeekoDoc
### Use GeekoDoc
#DOCBOOK5_RNG_URI="http://docbook.org/xml/5.2/rng/docbookxi.rng"
DOCBOOK5_RNG_URI="urn:x-suse:rng:v2:geekodoc-flat"

## Disabled SUSE logo
XSLTPARAM="--param generate.logo=0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ daps2docker DC-obs-user-guide validate
or if you want to preview the HTML files you can use

```
rm -rf /tmp/daps2docker-*; daps2docker DC-obs-user-guide html; xdg-open /tmp/daps2docker-*/obs-user-guide/html/book.obs-user/index.html
rm -rf /tmp/daps2docker-*; daps2docker DC-obs-user-guide html; xdg-open /tmp/daps2docker-*/obs-user-guide/html/book-obs-user/index.html
```

For more detailed information see
Expand Down
10 changes: 5 additions & 5 deletions xml/art-obs-beginners-guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ https://www.suse.com/communities/blog/suse-studio-integration/
</listitem>
</varlistentry>
<varlistentry>
<term><xref linkend="sec.obsbg.uc.install-from-obs"/></term>
<term><xref linkend="sec-obsbg-uc-install-from-obs"/></term>
<listitem>
<para>
Integrating the download repository into your system
Expand Down Expand Up @@ -1196,7 +1196,7 @@ Patch0: &sampleprj;_main.diff</screen>
</para>
</sect1>

<sect1 xml:id="sec.obsbg.uc.install-from-obs">
<sect1 xml:id="sec-obsbg-uc-install-from-obs">
<title>Installing Packages from &obsa;</title>
<para>
&obsa; provides a place containing all the distribution-specific and
Expand All @@ -1221,7 +1221,7 @@ Patch0: &sampleprj;_main.diff</screen>
<para>To install the <package>&sampleprj;</package> package from your home project,
use the following steps:</para>
<procedure>
<step xml:id="st.obsbg.uc.install-from-obs.repourls">
<step xml:id="st-obsbg-uc-install-from-obs-repourls">
<para>Inside your working directory, determine the download repository
URLs:</para>
<screen>&prompt.user;<command>osc</command> repourls
Expand All @@ -1232,7 +1232,7 @@ Patch0: &sampleprj;_main.diff</screen>
<para>Copy the desired URL of your preferred distribution. In our case, that
is the line containing <systemitem>openSUSE_Tumbleweed</systemitem>.</para>
</step>
<step xml:id="st.obsbg.uc.install-from-obs.zypperar">
<step xml:id="st-obsbg-uc-install-from-obs-zypperar">
<para>Use <command>zypper</command> and add the copied URL:
</para>
<screen>&prompt.root;<command>zypper</command> addrepo &obsdnlurlhome1;/openSUSE_Tumbleweed/&obshome1;.repo</screen>
Expand All @@ -1247,7 +1247,7 @@ Patch0: &sampleprj;_main.diff</screen>
<para>
To update the package again, run <xref linkend="st-obsbg-install"/>.
You do not need to execute
<xref linkend="st.obsbg.uc.install-from-obs.repourls"/>, as the
<xref linkend="st-obsbg-uc-install-from-obs-repourls"/>, as the
repository is already configured in your system.
</para>
</sect1>
Expand Down
2 changes: 1 addition & 1 deletion xml/book-obs-admin-guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1" xml:lang="en"
xml:id="book.obs-admin">
xml:id="book-obs-admin">
<title>Administrator Guide</title>
<subtitle>&productname;</subtitle>
<info>
Expand Down
2 changes: 1 addition & 1 deletion xml/book-obs-user-guide.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>
<book version="5.1" xml:lang="en" xml:id="book.obs-user"
<book version="5.1" xml:lang="en" xml:id="book-obs-user"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" >
Expand Down
4 changes: 2 additions & 2 deletions xml/common_intro_available_doc_i.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<para>The following documentation is available for &obsa;:</para>
<variablelist>
<varlistentry>
<term><xref linkend="book.obs-admin"/></term>
<term><xref linkend="book-obs-admin"/></term>
<listitem>
<para>
This guide offers information about the initial setup and maintenance
Expand All @@ -22,7 +22,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><xref linkend="book.obs-user"/></term>
<term><xref linkend="book-obs-user"/></term>
<listitem>
<para>
This guide is intended for users of &obs;. The first part describes basic
Expand Down
2 changes: 1 addition & 1 deletion xml/obs_admin_appliance.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<title>Image Types</title>
<para> There are different types of &obsa; appliance images.</para>
<table
xml:id="cha.obs.best-practices.appliance_types">
xml:id="cha-obs-best-practices-appliance-types">
<title>Appliance Types</title>
<tgroup cols="2" align="left">
<thead>
Expand Down
2 changes: 1 addition & 1 deletion xml/obs_admin_backend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
>man page</link>. For example, to restart the
repository server, use:</para>
<screen><command>systemctl restart obsrepserver.service</command></screen>
<table xml:id="tab.obs.service-names">
<table xml:id="tab-obs-service-names">
<title>Service Names</title>
<tgroup cols="2" align="left">
<thead>
Expand Down
4 changes: 2 additions & 2 deletions xml/obs_basic_workflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
</para>
</sect1>

<sect1 xml:id="sec.obs.basicworkflow.create-new">
<sect1 xml:id="sec-obs-basicworkflow-create-new">
<title>Creating a New Package</title>
<para>
This section covers how to create packages for an arbitrary software project,
Expand Down Expand Up @@ -512,7 +512,7 @@ Fri Aug 23 08:42:42 UTC 2017 - &exampleuser_mail;</screen>
</sect2>
</sect1>

<sect1 xml:id="sec.obs.basicworkflow.add-dependencies">
<sect1 xml:id="sec-obs-basicworkflow-add-dependencies">
<title>Adding Dependencies to Your Project</title>
<para>
Software usually depends on other software: To run an application, you
Expand Down
2 changes: 1 addition & 1 deletion xml/obs_best_practice_distribution_setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1" xml:id="cha.obs.best-practices.distribution-setup"><title>Distribution Setup</title><info/>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1" xml:id="cha-obs-best-practices-distribution-setup"><title>Distribution Setup</title><info/>

<para>
This document describes ways to set up an entire distribution, including
Expand Down
2 changes: 1 addition & 1 deletion xml/obs_best_practice_maintained_release.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1" xml:id="cha.obs.best-practices.distribution-setup"><title>Distribution Setup</title><info/>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1" xml:id="cha-obs-best-practices-distribution-setup"><title>Distribution Setup</title><info/>

<para>
This document describes ways to set up an entire distribution, including
Expand Down

0 comments on commit 05a8958

Please sign in to comment.