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

Cannot find the declaration of element 'map'.

Expand Messages
  • lodewijkn
    Hi all, I was browsing through the messages in this group and found a few messages concerning the error message [DOTJ012F][FATAL]. I also get the following
    Message 1 of 6 , Jul 6, 2009
      Hi all,
      I was browsing through the messages in this group and found a few messages concerning the error message [DOTJ012F][FATAL].

      I also get the following message when I want to generate output with DITA OT 1.4.2.

      C:\ditaot\build_preprocess.xml:32: [DOTJ012F][FATAL] Failed to parse the input file '00_map_simple.ditamap' due to below exception. Please correct the input base on the exception message.:00_map_simple.ditamap Line 5:cvc-elt.1: Cannot find the declaration of element 'map'.

      You can troubleshoot this message by adding a doctype declaration. But there is something I do not understand here. It is true that my files do not contain a DOCTYPE declaration and I think this is because validation of my files is schema-based, while the DOCTYPE declaration is only needed for files that are validated against DTDs. Is this correct?

      Does this mean that you can only generate output for files that are DTD-based using the DITA OT, or do you have to specify somewhere that the validation of your ditafiles is based on schema's rather than on DTDs?


      Thanks for your input.
    • Jeremy H. Griffith
      On Mon, 06 Jul 2009 12:58:18 -0000, lodewijkn ... It s best to have a DOCTYPE, always. ... Many tools still work with DTDs rather than schemas. In fact, for
      Message 2 of 6 , Jul 6, 2009
        On Mon, 06 Jul 2009 12:58:18 -0000, "lodewijkn"
        <lodewijk.nollet@...> wrote:

        >It is true that my files do not contain a DOCTYPE
        >declaration and I think this is because validation
        >of my files is schema-based, while the DOCTYPE
        >declaration is only needed for files that are
        >validated against DTDs. Is this correct?

        It's best to have a DOCTYPE, always.

        >Does this mean that you can only generate output
        >for files that are DTD-based using the DITA OT,
        >or do you have to specify somewhere that the
        >validation of your ditafiles is based on schema's
        >rather than on DTDs?

        Many tools still work with DTDs rather than schemas.
        In fact, for DITA, the DTDs are "normative" and the
        schemas are not. So even if you generate the files
        with a schema-aware tool, do include the DOCTYPE.

        For the OT, it's possible you can avoid that by
        using the commercial version of Saxon, Saxon-SA,
        where the "SA" means Schema Aware. But even so,
        I'd consider omitting the DOCTYPE bad practice.
        It reduces interoperability.

        -- Jeremy H. Griffith, at Omni Systems Inc.
        <jeremy@...> http://www.omsys.com/
      • lodewijkn
        Hi, Following up on the statement that it s better to have a DOCTYPE, I ve created an xslt, that converts the reference to a schema to a reference to a DTD,
        Message 3 of 6 , Aug 20, 2009
          Hi,

          Following up on the statement that it's better to have a DOCTYPE, I've created an xslt, that converts the reference to a schema to a reference to a DTD, just like this :


          <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
          <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-system="C:\ditaot\dtd\reference.dtd"/>

          <xsl:template match="/reference">
          <reference id="{@id}">
          <xsl:copy-of select="*"/>
          </reference>
          </xsl:template>

          This works fine, but when I incorporate my scripts in the DITA OT and process my files using saxon, a few attributes ('xmlns:xsi' and 'xmlns:xsa3') are inserted in elements such as the title, shortdesc.


          <shortdesc xmlns:xsa3="http://dita.oasis-open.org/architecture/2005/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" class="- topic/shortdesc ">xxxxxxxx </shortdesc>

          As a result, publication fails.
          Has anyone had similar problems? Should I adapt the my xslt-script or add a particular attribute in my SAXON command? Should I adapt the DITA DTD's?

          Regards,
          Lodewijk

          --- In dita-users@yahoogroups.com, "Jeremy H. Griffith" <jeremy@...> wrote:
          >
          > On Mon, 06 Jul 2009 12:58:18 -0000, "lodewijkn"
          > <lodewijk.nollet@...> wrote:
          >
          > >It is true that my files do not contain a DOCTYPE
          > >declaration and I think this is because validation
          > >of my files is schema-based, while the DOCTYPE
          > >declaration is only needed for files that are
          > >validated against DTDs. Is this correct?
          >
          > It's best to have a DOCTYPE, always.
          >
          > >Does this mean that you can only generate output
          > >for files that are DTD-based using the DITA OT,
          > >or do you have to specify somewhere that the
          > >validation of your ditafiles is based on schema's
          > >rather than on DTDs?
          >
          > Many tools still work with DTDs rather than schemas.
          > In fact, for DITA, the DTDs are "normative" and the
          > schemas are not. So even if you generate the files
          > with a schema-aware tool, do include the DOCTYPE.
          >
          > For the OT, it's possible you can avoid that by
          > using the commercial version of Saxon, Saxon-SA,
          > where the "SA" means Schema Aware. But even so,
          > I'd consider omitting the DOCTYPE bad practice.
          > It reduces interoperability.
          >
          > -- Jeremy H. Griffith, at Omni Systems Inc.
          > <jeremy@...> http://www.omsys.com/
          >
        • Deborah Pickett
          ... ITYM doctype-system= file:///c:/ditaot/dtd/reference.dtd . URLs, not filenames. ... Those extra attributes shouldn t be causing errors. The DITA-OT
          Message 4 of 6 , Aug 20, 2009
            lodewijkn wrote:
            > Following up on the statement that it's better to have a DOCTYPE, I've
            > created an xslt, that converts the reference to a schema to a reference
            > to a DTD, just like this :
            > doctype-system="C:\ditaot\dtd\reference.dtd"

            ITYM doctype-system="file:///c:/ditaot/dtd/reference.dtd". URLs, not
            filenames.

            > This works fine, but when I incorporate my scripts in the DITA OT and
            > process my files using saxon, a few attributes ('xmlns:xsi' and
            > 'xmlns:xsa3') are inserted in elements such as the title, shortdesc.
            > <shortdesc xmlns:xsa3="http://dita.oasis-open.org/architecture/2005/
            > <http://dita.oasis-open.org/architecture/2005/>"
            > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
            > <http://www.w3.org/2001/XMLSchema-instance>" class="- topic/shortdesc
            > ">xxxxxxxx </shortdesc>
            > As a result, publication fails.

            Those extra attributes shouldn't be causing errors. The DITA-OT
            processor should know to ignore them. What error are you actually getting?

            > Has anyone had similar problems? Should I adapt the my xslt-script or
            > add a particular attribute in my SAXON command?

            You should add additional empty templates which eliminate these default
            attributes:

            <xsl:template match="@class"/>

            And mark certain prefixes as not to be produced in the result document:

            <xsl:stylesheet ... exclude-result-prefixes="xsi" ...>

            Also advice on XSLT style:
            > <xsl:copy-of select="*"/>

            This is almost always not the best way to do it. Better, use
            <xsl:apply-templates select="@*|node()"/> (which also catches attributes
            and text nodes, which yours doesn't). Search online for "XSLT identity
            stylesheet".
          • lodewijkn
            The error message produced by the DITA OT is the following one (there are a few similar messages for other elements): [pipeline] entries_in_reference.xml Line
            Message 5 of 6 , Aug 20, 2009
              The error message produced by the DITA OT is the following one (there are a few similar messages for other elements):
              [pipeline] entries_in_reference.xml Line 6:Attribute "xmlns:xsa3" must be declared for element type "title".
              When I manually remove those attributes, the publication succeeds.

              Thanks,
              Lodewijk

              --- In dita-users@yahoogroups.com, Deborah Pickett <debbiep-list-ditausers@...> wrote:
              >
              > lodewijkn wrote:
              > > Following up on the statement that it's better to have a DOCTYPE, I've
              > > created an xslt, that converts the reference to a schema to a reference
              > > to a DTD, just like this :
              > > doctype-system="C:\ditaot\dtd\reference.dtd"
              >
              > ITYM doctype-system="file:///c:/ditaot/dtd/reference.dtd". URLs, not
              > filenames.
              >
              > > This works fine, but when I incorporate my scripts in the DITA OT and
              > > process my files using saxon, a few attributes ('xmlns:xsi' and
              > > 'xmlns:xsa3') are inserted in elements such as the title, shortdesc.
              > > <shortdesc xmlns:xsa3="http://dita.oasis-open.org/architecture/2005/
              > > <http://dita.oasis-open.org/architecture/2005/>"
              > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
              > > <http://www.w3.org/2001/XMLSchema-instance>" class="- topic/shortdesc
              > > ">xxxxxxxx </shortdesc>
              > > As a result, publication fails.
              >
              > Those extra attributes shouldn't be causing errors. The DITA-OT
              > processor should know to ignore them. What error are you actually getting?
              >
              > > Has anyone had similar problems? Should I adapt the my xslt-script or
              > > add a particular attribute in my SAXON command?
              >
              > You should add additional empty templates which eliminate these default
              > attributes:
              >
              > <xsl:template match="@class"/>
              >
              > And mark certain prefixes as not to be produced in the result document:
              >
              > <xsl:stylesheet ... exclude-result-prefixes="xsi" ...>
              >
              > Also advice on XSLT style:
              > > <xsl:copy-of select="*"/>
              >
              > This is almost always not the best way to do it. Better, use
              > <xsl:apply-templates select="@*|node()"/> (which also catches attributes
              > and text nodes, which yours doesn't). Search online for "XSLT identity
              > stylesheet".
              >
            • Deborah Pickett
              ... Duh, that makes sense. You are validating against the DTD, which is not really namespace-aware. You *could* build with the validate=false option, to
              Message 6 of 6 , Aug 21, 2009
                lodewijkn wrote:
                > [pipeline] entries_in_reference.xml Line 6:Attribute "xmlns:xsa3" must
                > be declared for element type "title".

                Duh, that makes sense. You are validating against the DTD, which is not
                really namespace-aware.

                You *could* build with the validate=false option, to bypass DTD
                validation, but I agree that it's better to delete them, since you're
                transforming the topic anyway. The exclude-result-prefixes approach is
                normally the way to do that.
              Your message has been successfully submitted and would be delivered to recipients shortly.