Changeset 4fe47e3


Ignore:
Timestamp:
Feb 27, 2011, 4:05:52 PM (13 years ago)
Author:
Joe Ciccone <jciccone@…>
Children:
d17cfb8
Parents:
eef46e9
Message:

Add the initial changes for a new xml format for the packages part
of the book. This is still preliminary and currently is pretty
broken, more to come in the future as bugs get squashed.

Location:
BOOK
Files:
8 added
5 edited

Legend:

Unmodified
Added
Removed
  • BOOK/Makefile

    reef46e9 r4fe47e3  
    33
    44VALIDATEDIR     := $(RENDERDIR)/validate
     5DBXMLDIR        := $(RENDERDIR)/docbook
    56PROFILEDIR      := $(RENDERDIR)/profile
    67
     
    2324                   ppc ppc64 \
    2425                   alpha
     26
     27x86_ML          := 32
     28x86_64_ML       := 32,64
     29x86_64-64_ML    := 64
     30sparc_ML        := 32
     31sparc64_ML      := 32,64
     32sparc64-64_ML   := 64
     33mips_ML         := 32
     34mips64_ML       := 32,n32,64
     35mips64-64_ML    := 64
     36ppc_ML          := 32
     37ppc64_ML        := 32,64
     38alpha_ML        := 64
    2539
    2640ifdef V
     
    7185          if test $${?} -ne 0; then true; else false; fi
    7286
     87ARCHS_DB_XML := $(ARCHS:%=%-db-xml)
     88.PHONY: $(ARCHS_DB_XML)
     89$(ARCHS_DB_XML): override arch = $(@:%-db-xml=%)
     90$(ARCHS_DB_XML):
     91        @$(MAKE) --no-print-directory $(arch)-validate_dump-xml
     92        @echo "Generating DocBook XML for $(arch)..."
     93        $(Q)mkdir -p $(DBXMLDIR)
     94        $(Q)xsltproc --nonet \
     95          --stringparam clfs.arch "$(arch)" \
     96          --stringparam clfs.multilib "$($(arch)_ML)" \
     97          --output $(DBXMLDIR)/$(arch)-db.xml \
     98          $(PWD)/stylesheets/clfs-profile.xsl \
     99          $(VALIDATEDIR)/$(arch)-full.xml
     100
    73101ARCHS_P_XML := $(ARCHS:%=%-profiled-xml)
    74102.PHONY: $(ARCHS_P_XML)
    75103$(ARCHS_P_XML): override arch = $(@:%-profiled-xml=%)
    76104$(ARCHS_P_XML):
    77         @$(MAKE) --no-print-directory $(arch)-validate_dump-xml
     105        @$(MAKE) --no-print-directory $(arch)-db-xml
    78106        @echo "Profiling $(arch) for rendering..."
    79107        $(Q)mkdir -p $(PROFILEDIR)
    80         $(Q)xsltproc --nonet --stringparam profile.condition html \
     108        $(Q)xsltproc --nonet \
     109          --stringparam profile.condition html \
    81110          --output $(PROFILEDIR)/$(arch)-html.xml \
    82111          $(PWD)/stylesheets/lfs-xsl/profile.xsl \
    83           $(VALIDATEDIR)/$(arch)-full.xml
     112          $(DBXMLDIR)/$(arch)-db.xml
    84113
    85114ARCHS_VDB_XML := $(ARCHS:%=%-validate_db-xml)
     
    90119        $(Q)xmllint --noout --nonet \
    91120          --relaxng $(TOP)/schema/docbook/4.5/rng/docbook.rng \
    92           $(VALIDATEDIR)/$(arch)-full.xml \
     121          $(PROFILEDIR)/$(arch)-html.xml \
    93122          2>&1 | grep -v " validates$$"; \
    94123          if test $${?} -ne 0; then true; else false; fi
  • BOOK/schema/clfs/0.1/rng/clfs.rnc

    reef46e9 r4fe47e3  
    11
    2 include "../../../docbook/4.5/rng/docbook.rnc"
     2namespace c = "http://schema.cross-lfs.org/book"
    33
     4# We are building around the DocBook Schema
     5include "../../../docbook/4.5/rng/docbook.rnc" {
     6  sect1 = (
     7    element sect1 {
     8      sect1.attlist,
     9      sect1info?,
     10      sect.title.content,
     11      nav.class*,
     12      ((divcomponent.mix+, (refentry.class* | sect2* | simplesect*))
     13       | refentry.class+
     14       | sect2+
     15         | simplesect+),
     16    nav.class*
     17    } | clfs.sect1.package )
     18}
     19
     20# Extend the standard profiling attributes
     21local.effectivity.attrib &=
     22  clfs.attrib.arch,
     23  clfs.attrib.bits,
     24  clfs.attrib.multilib
     25
     26# Custom attributes unsed in this schema
     27clfs.attrib.arch = attribute c:arch { text }?
     28clfs.attrib.bits = attribute c:bits { text }?
     29clfs.attrib.multilib = attribute c:multilib { "true" | "false" }?
     30clfs.attrib.multibuild = attribute c:multibuild { "true" | "false" }
     31
     32# Package element to be used inside of the chapter element
     33clfs.sect1.package =
     34  element c:package {
     35    attribute id { text },
     36    clfs.attrib.arch,
     37    clfs.attrib.bits,
     38    clfs.attrib.multilib,
     39    clfs.attrib.multibuild,
     40    sect1
     41  }
     42
     43# Switch case to be used inside of a sect1
     44clfs.sect1.switch =
     45  element c:switch {
     46    element c:case {
     47      clfs.attrib.arch,
     48      clfs.attrib.bits,
     49      clfs.attrib.multilib
     50    }*,
     51    element c:default {
     52      empty
     53    }
     54  }
  • BOOK/schema/clfs/0.1/rng/clfs.rng

    reef46e9 r4fe47e3  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <grammar xmlns="http://relaxng.org/ns/structure/1.0">
    3   <include href="../../../docbook/4.5/rng/docbook.rng"/>
     2<grammar xmlns:c="http://schema.cross-lfs.org/book" xmlns="http://relaxng.org/ns/structure/1.0">
     3  <!-- We are building around the DocBook Schema -->
     4  <include href="docbook.rng">
     5    <define name="sect1">
     6      <choice>
     7        <element name="sect1">
     8          <ref name="sect1.attlist"/>
     9          <optional>
     10            <ref name="sect1info"/>
     11          </optional>
     12          <ref name="sect.title.content"/>
     13          <zeroOrMore>
     14            <ref name="nav.class"/>
     15          </zeroOrMore>
     16          <choice>
     17            <group>
     18              <oneOrMore>
     19                <ref name="divcomponent.mix"/>
     20              </oneOrMore>
     21              <choice>
     22                <zeroOrMore>
     23                  <ref name="refentry.class"/>
     24                </zeroOrMore>
     25                <zeroOrMore>
     26                  <ref name="sect2"/>
     27                </zeroOrMore>
     28                <zeroOrMore>
     29                  <ref name="simplesect"/>
     30                </zeroOrMore>
     31              </choice>
     32            </group>
     33            <oneOrMore>
     34              <ref name="refentry.class"/>
     35            </oneOrMore>
     36            <oneOrMore>
     37              <ref name="sect2"/>
     38            </oneOrMore>
     39            <oneOrMore>
     40              <ref name="simplesect"/>
     41            </oneOrMore>
     42          </choice>
     43          <zeroOrMore>
     44            <ref name="nav.class"/>
     45          </zeroOrMore>
     46        </element>
     47        <ref name="clfs.sect1.package"/>
     48      </choice>
     49    </define>
     50  </include>
     51  <!-- Extend the standard profiling attributes -->
     52  <define name="local.effectivity.attrib" combine="interleave">
     53    <ref name="clfs.attrib.arch"/>
     54    <ref name="clfs.attrib.bits"/>
     55    <ref name="clfs.attrib.multilib"/>
     56  </define>
     57  <!-- Custom attributes unsed in this schema -->
     58  <define name="clfs.attrib.arch">
     59    <optional>
     60      <attribute name="c:arch"/>
     61    </optional>
     62  </define>
     63  <define name="clfs.attrib.bits">
     64    <optional>
     65      <attribute name="c:bits"/>
     66    </optional>
     67  </define>
     68  <define name="clfs.attrib.multilib">
     69    <optional>
     70      <attribute name="c:multilib">
     71        <choice>
     72          <value>true</value>
     73          <value>false</value>
     74        </choice>
     75      </attribute>
     76    </optional>
     77  </define>
     78  <define name="clfs.attrib.multibuild">
     79    <attribute name="c:multibuild">
     80      <choice>
     81        <value>true</value>
     82        <value>false</value>
     83      </choice>
     84    </attribute>
     85  </define>
     86  <!-- Package element to be used inside of the chapter element -->
     87  <define name="clfs.sect1.package">
     88    <element name="c:package">
     89      <attribute name="id"/>
     90      <ref name="clfs.attrib.arch"/>
     91      <ref name="clfs.attrib.bits"/>
     92      <ref name="clfs.attrib.multilib"/>
     93      <ref name="clfs.attrib.multibuild"/>
     94      <ref name="sect1"/>
     95    </element>
     96  </define>
     97  <!-- Switch case to be used inside of a sect1 -->
     98  <define name="clfs.sect1.switch">
     99    <element name="c:switch">
     100      <zeroOrMore>
     101        <element name="c:case">
     102          <ref name="clfs.attrib.arch"/>
     103          <ref name="clfs.attrib.bits"/>
     104          <ref name="clfs.attrib.multilib"/>
     105        </element>
     106      </zeroOrMore>
     107      <element name="c:default">
     108        <empty/>
     109      </element>
     110    </element>
     111  </define>
    4112</grammar>
  • BOOK/x86-index.xml

    reef46e9 r4fe47e3  
    99
    1010  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/x86/bookinfo.xml"/>
     11  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="testpart.xml"/>
    1112  <!--
    1213  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/dedication.xml"/>
    1314  -->
    1415  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/preface.xml"/>
     16
    1517
    1618  <part id="part1">
  • BOOK/x86_64-index.xml

    reef46e9 r4fe47e3  
    66]>
    77
    8 <book>
     8<book xmlns:c="http://schema.cross-lfs.org/book">
    99
    1010  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/x86_64/bookinfo.xml"/>
     11  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="testpart.xml"/>
    1112  <!--
    1213  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="prologue/dedication.xml"/>
Note: See TracChangeset for help on using the changeset viewer.