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

Problems with DITA RNG schemas

Expand Messages
  • Steinar Bang
    I ve generated Relax-NG compact syntax schemas from the DITA DTDs using trang. But I have problems with them. I get messages like eg. this: File mode
    Message 1 of 11 , Nov 22, 2007
      I've generated Relax-NG compact syntax schemas from the DITA DTDs using
      trang. But I have problems with them. I get messages like eg. this:

      File mode specification error: (error "Duplicate definition of task-info-types at position 3505 in ~/workspaces/project/users_guide/schemas/relaxng/task.mod.rnc")

      Line 3505 is the last line of task.mod.rnc, it contains only one line
      with "element task", and according to grep, that's the only line with
      "element task" in the entire directory.

      Does anyone know what causes this duplicate message? Or even better:
      does anyone know of a set of DITA RNG/RNC schemas that works?

      Thanx!


      - Steinar
    • Florent Georges
      Steinar Bang wrote: Hi Steinar, ... Could you please post a link to the original DTDs and the way you have invoked trang? And maybe put your generated RNC
      Message 2 of 11 , Nov 22, 2007
        Steinar Bang wrote:

        Hi Steinar,

        > I've generated Relax-NG compact syntax schemas from the
        > DITA DTDs using trang. But I have problems with them.

        Could you please post a link to the original DTDs and the way you
        have invoked trang? And maybe put your generated RNC schemas on the
        web (I don't know if the list allows attachments)?

        Just to see if I can reproduce the problem.

        Regards,

        --drkm

























        _____________________________________________________________________________
        Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
      • Steinar Bang
        ... The original DTDs are part of the DITA Open Toolkit http://sourceforge.net/project/showfiles.php?group_id=132728 (the topmost file, ie. the one titled
        Message 3 of 11 , Nov 22, 2007
          >>>>> Florent Georges <darkman_spam@...>:

          > Steinar Bang wrote:
          > Hi Steinar,

          >> I've generated Relax-NG compact syntax schemas from the
          >> DITA DTDs using trang. But I have problems with them.

          > Could you please post a link to the original DTDs and the way you have
          > invoked trang?

          The original DTDs are part of the DITA Open Toolkit
          http://sourceforge.net/project/showfiles.php?group_id=132728
          (the topmost file, ie. the one titled "DITA Open Toolkit 1.4")

          My conversions were done back in September. When I tried doing them
          today, trang didn't work. It's this issue:
          https://bugs.launchpad.net/ubuntu/+source/trang/+bug/141447

          I'll try finding the upstream java version of trang and running it from
          java.

          > And maybe put your generated RNC schemas on the web (I don't know if
          > the list allows attachments)?

          I'll try attaching it to this message, and we'll see.

          > Just to see if I can reproduce the problem.

          Great! Thanx!


          - Steinar
        • Steinar Bang
          ... They seems to be survive At least on gmane s version of the message still has the attachment: http://permalink.gmane.org/gmane.emacs.nxml.general/1626
          Message 4 of 11 , Nov 22, 2007
            >>>>> Steinar Bang <sb@...>:

            >>>>> Florent Georges <darkman_spam@...>:
            >> And maybe put your generated RNC schemas on the web (I don't know if
            >> the list allows attachments)?

            > I'll try attaching it to this message, and we'll see.

            They seems to be survive

            At least on gmane's version of the message still has the attachment:
            http://permalink.gmane.org/gmane.emacs.nxml.general/1626
          • Florent Georges
            Steinar Bang wrote: [ sorry for the multi-post on RNG List and nXML List, where this question was asked ] ... Actually, that s _position_ 3505. That means the
            Message 5 of 11 , Nov 22, 2007
              Steinar Bang wrote:

              [ sorry for the multi-post on RNG List and nXML List,
              where this question was asked ]

              > File mode specification error: (error "Duplicate
              > definition of task-info-types at position 3505 in
              > ~/workspaces/project/users_guide/schemas/relaxng/task.mod.rnc")

              > Line 3505 is the last line of task.mod.rnc, it contains
              > only one line with "element task", and according to grep,
              > that's the only line with "element task" in the entire
              > directory.

              Actually, that's _position_ 3505. That means the 3505-th
              character in the buffer. That's the position of the first
              character after the definition of task-info-types. Below is
              what I thought about your problem:

              1/ the Dita DTD modules use entity calls to modularize the
              DTDs, with a default definition of the entity

              2/ task.mod uses (and defines) the entity task-info-types,
              this entity can be "overriden" by an including DTD

              3/ ditabase.dtd includes task.mod without defining the
              entity, so in the resulting tasl.mod.rnc generated by
              Trang, you have the definition of an identifier named
              task-info-types

              4/ task.dtd includes task.mod and defines the entity.
              This is legal with DTD, this is the way to override
              default values in DTD composition. Because the
              corresponding identifier is already defined in
              task.rnc, Trang doesn't define it again in task.mod.rnc

              5/ so if you use separated sets of Trang-generated RNC
              files (one set per top-level generation: one for
              ditabase.dtd, one for task.dtd...), everything's ok

              6/ But I guess you generated in the same output directory,
              once for task.dtd then once for ditabasse.dtd (for
              instance), so the result was a task.rnc including
              task.mod.rnc, but this later was overriden by the
              subsequent generation and contains now the definition
              of task-info-types

              Could you please try to generate again your RNC files with
              Trang, but this time putting each output in a different
              directory, and modifying your schemas.xml in accordance?

              Regards,

              --drkm






















              _____________________________________________________________________________
              Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
            • Steinar Bang
              ... [snip!] ... Will do. Thanx for the feedback!
              Message 6 of 11 , Nov 22, 2007
                >>>>> Florent Georges <darkman_spam@...>:

                [snip!]
                > Could you please try to generate again your RNC files with Trang, but
                > this time putting each output in a different directory, and modifying
                > your schemas.xml in accordance?

                Will do. Thanx for the feedback!
              • Steinar Bang
                ... Ok. I did the following: - Downloaded trang-20030619.zip - In DITA-OT1.4-src/dtd/ did the following - ls *.dtd - for each DTD - created a subdirectory of
                Message 7 of 11 , Nov 22, 2007
                  >>>>> Steinar Bang <sb@...>:

                  >>>>> Florent Georges <darkman_spam@...>:
                  > [snip!]
                  >> Could you please try to generate again your RNC files with Trang, but
                  >> this time putting each output in a different directory, and modifying
                  >> your schemas.xml in accordance?

                  > Will do. Thanx for the feedback!

                  Ok. I did the following:
                  - Downloaded trang-20030619.zip
                  - In DITA-OT1.4-src/dtd/ did the following
                  - ls *.dtd
                  - for each DTD
                  - created a subdirectory of my relaxng directory
                  - ran "java -jar trang.jar dtdname.dtd dtdname.dtd"
                  - moved all .rnc file to the subdirectory with the same name as the
                  dtd
                  - In the schemas.xml that actually found the schemas, for each of the
                  DTDs, added the subdirectory

                  Then nxml found the correct schema, and had no load errors on the
                  schema, at least for the two document types I tried; task and concepts
                  (those are the ones I'll be editing).

                  But the results weren't correct. Instead of <task> or <concept> as the
                  top directory, both DTDs had <no-topic-nesting> with no children as the
                  only legal element.

                  I'll guess I try that entity expansion script suggested on the other
                  list.
                • Steinar Bang
                  ... [snip!] ... I tried the expansion script, and created RNC files from the expanded DTDs... and ran into the same problem, ie. as the only
                  Message 8 of 11 , Nov 23, 2007
                    >>>>> Steinar Bang <sb@...>:

                    [snip!]
                    > But the results weren't correct. Instead of <task> or <concept> as
                    > the top directory, both DTDs had <no-topic-nesting> with no children
                    > as the only legal element.

                    > I'll guess I try that entity expansion script suggested on the other
                    > list.

                    I tried the expansion script, and created RNC files from the expanded
                    DTDs... and ran into the same problem, ie. <no-topic-nesting> as the
                    only legal element.

                    Hm...
                  • Florent Georges
                    ... I m affraid I can t help furthemore on this issue. Maybe you will find the DITA Architectural Specification interresting:
                    Message 9 of 11 , Nov 23, 2007
                      Steinar Bang wrote:

                      > I tried the expansion script, and created RNC files from
                      > the expanded DTDs... and ran into the same problem,
                      > ie. <no-topic-nesting> as the only legal element.

                      > Hm...

                      I'm affraid I can't help furthemore on this issue. Maybe
                      you will find the DITA Architectural Specification interresting:

                      http://docs.oasis-open.org/dita/v1.1/OS/archspec/archspec.html

                      in particular:

                      http://docs.oasis-open.org/dita/v1.1/OS/archspec/dtdorganization.html
                      http://docs.oasis-open.org/dita/v1.1/OS/archspec/dtdmod.html

                      Good luck!

                      --drkm





















                      _____________________________________________________________________________
                      Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
                    • Steinar Bang
                      ... I ve been pointed to this approach, which I will try out later today: http://tech.groups.yahoo.com/group/dita-users/message/6711 Basically, it s your
                      Message 10 of 11 , Nov 23, 2007
                        >>>>> Florent Georges <darkman_spam@...>:

                        > I'm affraid I can't help furthemore on this issue.

                        I've been pointed to this approach, which I will try out later today:
                        http://tech.groups.yahoo.com/group/dita-users/message/6711

                        Basically, it's your approach, then manually changing the start
                        declaration of each generated RNC schema.

                        Thanx for you assistance in this!


                        - Steinar
                      • Steinar Bang
                        ... Yep it worked. I had to change start = in the following schemas: concept/concept.rnc reference/reference.rnc task/task.rnc topic/topic.rnc The following
                        Message 11 of 11 , Nov 23, 2007
                          >>>>> Steinar Bang <sb@...>:

                          > I've been pointed to this approach, which I will try out later today:
                          > http://tech.groups.yahoo.com/group/dita-users/message/6711

                          > Basically, it's your approach, then manually changing the start
                          > declaration of each generated RNC schema.

                          Yep it worked. I had to change "start =" in the following schemas:
                          concept/concept.rnc
                          reference/reference.rnc
                          task/task.rnc
                          topic/topic.rnc

                          The following already had "start =" that looked ok:
                          bookmap/bookmap.rnc
                          ditabase/ditabase.rnc
                          glossary/glossary.rnc
                          map/map.rnc

                          I've attached this schema to this message, in the hope that it will be
                          useful to a future googler, looking for the same thing as me.

                          Note to same googler: This schema is derived from the DTDs of DITA Open
                          Toolkit 1.4.


                          - Steinar
                        Your message has been successfully submitted and would be delivered to recipients shortly.