Loading ...
Sorry, an error occurred while loading the content.
 

Combining xml and chapter numbering

Expand Messages
  • Norma Yeazell
    Thanks for the advice earlier, combining the xml is working now, but I can t figure out why my chapter numbering no longer works. When I manually combined the
    Message 1 of 2 , Sep 9, 2004
      Thanks for the advice earlier, combining the xml is working now, but I
      can't figure out why my chapter numbering no longer works. When I
      manually combined the files the numbering worked fine, now with the
      entities I get no chapter number and 1 as the dmodule for every one.
      It's as if it doesn't recognize the chapter element or dmodule element
      within the entity.

      This is the xsl for the chapter numbering

      <fo:marker marker-class-name="issue-chap-number">
      Chap <xsl:number count="chapter"/>-<xsl:number count="dmodule"/>
      </fo:marker>


      RESULT: Chap -1

      The following is the xml

      <?xml version="1.0"?>
      <!DOCTYPE pm [
      <!NOTATION xml SYSTEM "">
      <!ENTITY BIKE001-001-D00-10-01-0000-271A-A SYSTEM
      "BIKE001-001-D00-10-01-0000-271A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-D00-10-02-0000-364A-A SYSTEM
      "BIKE001-001-D00-10-02-0000-364A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-D00-10-04-0000-540A-A SYSTEM
      "BIKE001-001-D00-10-04-0000-540A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-D00-10-04-0000-740A-A SYSTEM
      "BIKE001-001-D00-10-04-0000-740A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-DA2-10-01-0000-369A-A SYSTEM
      "BIKE001-001-DA2-10-01-0000-369A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-DA2-10-02-0000-364A-A SYSTEM
      "BIKE001-001-DA2-10-02-0000-364A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-DA2-10-03-0000-364A-A SYSTEM
      "BIKE001-001-DA2-10-03-0000-364A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-DA3-10-01-0000-200A-A SYSTEM
      "BIKE001-001-DA3-10-01-0000-200A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-DA3-10-01-0000-281A-A SYSTEM
      "BIKE001-001-DA3-10-01-0000-281A-A.xml" NDATA xml> <!ENTITY
      BIKE001-001-DA3-10-01-0000-298A-A SYSTEM
      "BIKE001-001-DA3-10-01-0000-298A-A.xml" NDATA xml>
      ]>
      <pm>
      <chapter>
      <get-data ref="BIKE001-001-D00-10-01-0000-271A-A"/>
      <get-data ref="BIKE001-001-D00-10-02-0000-364A-A"/>
      <get-data ref="BIKE001-001-D00-10-04-0000-540A-A"/>
      </chapter>
      <chapter>
      <get-data ref="BIKE001-001-DA2-10-01-0000-369A-A"/>
      <get-data ref="BIKE001-001-DA2-10-02-0000-364A-A"/>
      <get-data ref="BIKE001-001-DA2-10-03-0000-364A-A"/>
      </chapter>
      <chapter>
      <get-data ref="BIKE001-001-DA3-10-01-0000-200A-A"/>
      <get-data ref="BIKE001-001-DA3-10-01-0000-281A-A"/>
      <get-data ref="BIKE001-001-DA3-10-01-0000-298A-A"/>
      </chapter>
      </pm>




      Sincerely,
      Norma Yeazell




      Sincerely,
      Norma Yeazell
      Information Engineer
      O'NEIL & ASSOCIATES, INC.
      495 Byers Rd.
      Miamisburg, Ohio 45342-3662
      Phone: (937) 865-0846 ext. [3026]
      Fax: (937) [865-5858]
      E-mail: [nyeazell@...]




      Confidentiality Notice
      The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.
    • Bob Stayton
      If you have chapters inside the entities, then the reason chapter numbering doesn t work is because your chapters don t exist in the document. They only
      Message 2 of 2 , Sep 9, 2004
        If you have chapters inside the entities, then the reason chapter numbering
        doesn't work is because your chapters don't exist in the document. They
        only appear when each get-data element is processed by its template.

        I think a better way to combine modular content is to use regular system
        entities and let the XML parser pull in the content, before the XSL
        stylesheet sees it. Then it is all ready to go and the stylesheet has
        access to all of the content for counting chapters. Your document would
        look like this:

        <?xml version="1.0"?>
        <!DOCTYPE pm [
        <!ENTITY BIKE001-001-D00-10-01-0000-271A-A SYSTEM
        "BIKE001-001-D00-10-01-0000-271A-A.xml">
        <!ENTITY BIKE001-001-D00-10-02-0000-364A-A SYSTEM
        "BIKE001-001-D00-10-02-0000-364A-A.xml" >
        etc.
        ]>
        <pm>
        <chapter>
        &BIKE001-001-D00-10-01-0000-271A-A;
        &BIKE001-001-D00-10-02-0000-364A-A;
        etc.

        The drawback of system entities is that they cannot have a DOCTYPE
        declaration. That is one of the reasons XInclude was created. XInclude is
        another approach to modular content. This reference describes how XIncludes
        work in DocBook:

        http://www.sagehill.net/docbookxsl/ModularDoc.html

        Bob Stayton
        Sagehill Enterprises
        DocBook Consulting
        bobs@...


        ----- Original Message -----
        From: "Norma Yeazell" <nyeazell@...>
        To: <XSL-FO@yahoogroups.com>
        Sent: Thursday, September 09, 2004 11:21 AM
        Subject: [XSL-FO] Combining xml and chapter numbering


        > Thanks for the advice earlier, combining the xml is working now, but I
        > can't figure out why my chapter numbering no longer works. When I
        > manually combined the files the numbering worked fine, now with the
        > entities I get no chapter number and 1 as the dmodule for every one.
        > It's as if it doesn't recognize the chapter element or dmodule element
        > within the entity.
        >
        > This is the xsl for the chapter numbering
        >
        > <fo:marker marker-class-name="issue-chap-number">
        > Chap <xsl:number count="chapter"/>-<xsl:number count="dmodule"/>
        > </fo:marker>
        >
        >
        > RESULT: Chap -1
        >
        > The following is the xml
        >
        > <?xml version="1.0"?>
        > <!DOCTYPE pm [
        > <!NOTATION xml SYSTEM "">
        > <!ENTITY BIKE001-001-D00-10-01-0000-271A-A SYSTEM
        > "BIKE001-001-D00-10-01-0000-271A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-D00-10-02-0000-364A-A SYSTEM
        > "BIKE001-001-D00-10-02-0000-364A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-D00-10-04-0000-540A-A SYSTEM
        > "BIKE001-001-D00-10-04-0000-540A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-D00-10-04-0000-740A-A SYSTEM
        > "BIKE001-001-D00-10-04-0000-740A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-DA2-10-01-0000-369A-A SYSTEM
        > "BIKE001-001-DA2-10-01-0000-369A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-DA2-10-02-0000-364A-A SYSTEM
        > "BIKE001-001-DA2-10-02-0000-364A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-DA2-10-03-0000-364A-A SYSTEM
        > "BIKE001-001-DA2-10-03-0000-364A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-DA3-10-01-0000-200A-A SYSTEM
        > "BIKE001-001-DA3-10-01-0000-200A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-DA3-10-01-0000-281A-A SYSTEM
        > "BIKE001-001-DA3-10-01-0000-281A-A.xml" NDATA xml> <!ENTITY
        > BIKE001-001-DA3-10-01-0000-298A-A SYSTEM
        > "BIKE001-001-DA3-10-01-0000-298A-A.xml" NDATA xml>
        > ]>
        > <pm>
        > <chapter>
        > <get-data ref="BIKE001-001-D00-10-01-0000-271A-A"/>
        > <get-data ref="BIKE001-001-D00-10-02-0000-364A-A"/>
        > <get-data ref="BIKE001-001-D00-10-04-0000-540A-A"/>
        > </chapter>
        > <chapter>
        > <get-data ref="BIKE001-001-DA2-10-01-0000-369A-A"/>
        > <get-data ref="BIKE001-001-DA2-10-02-0000-364A-A"/>
        > <get-data ref="BIKE001-001-DA2-10-03-0000-364A-A"/>
        > </chapter>
        > <chapter>
        > <get-data ref="BIKE001-001-DA3-10-01-0000-200A-A"/>
        > <get-data ref="BIKE001-001-DA3-10-01-0000-281A-A"/>
        > <get-data ref="BIKE001-001-DA3-10-01-0000-298A-A"/>
        > </chapter>
        > </pm>
        >
        >
        >
        >
        > Sincerely,
        > Norma Yeazell
        >
        >
        >
        >
        > Sincerely,
        > Norma Yeazell
        > Information Engineer
        > O'NEIL & ASSOCIATES, INC.
        > 495 Byers Rd.
        > Miamisburg, Ohio 45342-3662
        > Phone: (937) 865-0846 ext. [3026]
        > Fax: (937) [865-5858]
        > E-mail: [nyeazell@...]
        >
        >
        >
        >
        > Confidentiality Notice
        > The information contained in this e-mail is confidential and intended for
        use only by the person(s) or organization listed in the address. If you have
        received this communication in error, please contact the sender at O'Neil &
        Associates, Inc., immediately. Any copying, dissemination, or distribution
        of this communication, other than by the intended recipient, is strictly
        prohibited.
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.