Skip to content

Commit b439815

Browse files
committed
Fix problem with <category>
Now the category works as expected
1 parent 50b87ed commit b439815

4 files changed

Lines changed: 22 additions & 24 deletions

File tree

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<?xml-model href="file:../portal-config-schema.rnc" type="application/relax-ng-compact-syntax"?>
33
<categories xmlns:xi="http://www.w3.org/2001/XInclude">
4-
<xi:include href="categories/en-us.xml" />
4+
<category lang="en-us">
5+
<item categoryid="about">
6+
<title>Hello</title>
7+
</item>
8+
</category>
9+
<category lang="de-de">
10+
<item categoryid="about">
11+
<title>Hallo</title>
12+
</item>
13+
</category>
14+
<!-- <xi:include href="categories/en-us.xml" />-->
515
<!--<xi:include href="categories/de-de.xml" />-->
616
</categories>

src/docbuild/config/xml/data/config.d/categories/de-de.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<category lang="de-de" default="false">
1+
<?xml-model href="file:../../portal-config-schema.rnc" type="application/relax-ng-compact-syntax"?>
2+
3+
<category lang="de-de">
24
<language categoryid="about" title="Über" />
35
<language categoryid="deployment" title="Deployment" />
46
<language categoryid="inital-config" title="Initiale Konfiguration" />

src/docbuild/config/xml/data/config.d/categories/en-us.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<language categoryid="deployment" title="Deployment" />
66
<language categoryid="inital-config" title="Initial configuration" />
77
<!-- ... more entries ... -->
8-
</category>
8+
</category>

src/docbuild/config/xml/data/portal-config-schema.rnc

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -670,10 +670,10 @@ div {
670670
## Wrapper for all category elements
671671
element categories {
672672
ds.xmlbase.attr?,
673-
ds.category.default,
674-
ds.category.translation*
675-
# (ds.category.translation & xi.include)*
676-
# (ds._category & xi.include*)+
673+
(
674+
(ds.category.default, ds.category.translation*)
675+
| xi.include+
676+
)
677677
}
678678
}
679679

@@ -711,40 +711,26 @@ div {
711711
element category {
712712
ds.xmlbase.attr?,
713713
ds.lang.attr,
714-
ds.category_language
714+
ds.category_language+
715715
}
716716
}
717717

718718

719719
[
720-
db:refname [ "language (variant 1)" ]
720+
db:refname [ "language" ]
721721
db:refpurpose [ "Metadata for category displayed on product detail navigational page" ]
722722
]
723723
div {
724724
ds.category_language =
725725
## Metadata for category displayed on product detail navigational page
726-
element language {
726+
element language { # TODO: language
727727
ds.categoryid.attr,
728728
ds.title.attr,
729729
ds.htmlblock*
730730
}
731731
}
732732

733733

734-
[
735-
db:refname [ "language (variant 2)" ]
736-
db:refpurpose [ "Metadata for category displayed on product detail navigational page (dependent languages)" ]
737-
]
738-
div {
739-
ds.categorylanguage_translation =
740-
## Metadata for category displayed on product detail navigational page (dependent languages, third-level category)
741-
element language {
742-
#ds.lang.attr,
743-
ds.title.attr,
744-
ds.htmlblock*
745-
}
746-
}
747-
748734

749735
# DOCSETS
750736
[

0 commit comments

Comments
 (0)