Hi Grzegorz,
Ahh. That's not an issue with
the XML Schema. You are getting that error because the xml document
contains a DOCTYPE.
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN"
"map.dtd" []>
<map xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:concept.xsd:1.1"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
The XML parser is attempting to validate
the XML document using the Map DTD. The xsi namespace and attribute
are not defined in the DTDs.
Here is the FAQ that explains the validation
algorithm.
http://xerces.apache.org/xerces2-j/faq-pcfp.html#faq-3
Eric
Eric A. Sirois
Staff Software Developer
DB2 Universal Database - Information Development
DITA Migration and Tools Development
IBM Canada Ltd. - Toronto Software Lab
Email:
esirois-G1DYhSM1WHTQT0dZR+AlfA@public.gmane.org
Phone:(905) 413-2841
Blue
Pages (Internal)
"Transparency and accessibility requirements dictate that public information
and government
transactions avoid depending on technologies that imply or impose a specific
product or
platform on businesses or citizens" - EU on XML-based office document
formats.
Grzegorz Junka <xgjx-wo4oW1Pw1HF3vZ0LZ0W7Rg@public.gmane.org>
Sent by: news <news-dbVV3NMTNubNLxjTenLetw@public.gmane.org>
05/26/2008 12:03 PM
|
|
To
|
serna-users-YYLLxrGCLz9BDgjK7y7TUQ@public.gmane.org
|
|
cc
|
|
|
Subject
|
Re: [Serna] Compiling non-standard
attributes with DITA open toolkit |
|
Grzegorz Junka <xgjx <at> ...> writes:
>
> Hi,
> I have a simple structure with some ditamaps and some topics, which
I try to
> compile with 1.4.1 DITA open toolkit. The compilation fails because
original
> schemas don't define attributes xmlns:xsi and xsi:noNamespaceSchemaLocation,
> which Serna adds to each created DITA file. Also the Publish command
from Serna
> produces warnings for each such file.
>
> How can I configure Serna to not add not standard attributes to these
files, or
> change relevant schemas in the toolkit directory so these attributes
are
> recognized and don't produce any errors or warnings?
>
> Many thanks for your help in advance.
> Kind Regards
> Grzegorz Junka
>
Hi Eric,
Here is the error from DITA open toolkit:
----->
Unable to locate tools.jar. Expected to find it in C:\Program Files
(x86)\Java\jre1.6.0_03\lib\tools.jar
Buildfile: build_test.xml
(...)
check-arg:
[echo] *****************************************************************
[echo] * basedir = C:\DITA-OT1.4.1
[echo] * dita.dir = C:\DITA-OT1.4.1
[echo] * input = DITA\Root.ditamap
[echo] * transtype = xhtml
[echo] * tempdir = temp
[echo] * outputdir = DITA\_output
[echo] * extname = .xml
[echo] * clean.temp = true
[echo] * xslt.parser = XALAN
[echo] *****************************************************************
(...)
gen-list-without-flagging:
[pipeline] Using XERCES.
BUILD FAILED
C:\DITA-OT1.4.1\build_test.xml:117: The following error occurred while
executing
this line:
C:\DITA-OT1.4.1\build_preprocess.xml:32: [DOTJ012F][FATAL] Failed to parse
the
input file 'Root.ditamap' due to below ex
ception. Please correct the input base on the exception message.:Root.ditamap
Line 3:Attribute "xsi:noNamespaceSchemaLoc
ation" must be declared for element type "map".
Total time: 1 second
c:\DITA-OT1.4.1>
----->
Here are errors from Serna:
----->
(...)
check-arg:
[echo] *****************************************************************
[echo] * basedir = D:\Program Files
(x86)\Syntext\Serna-3.7\plugins\dita\DITA-OT1.4
[echo] * dita.dir = D:\Program Files
(x86)\Syntext\Serna-3.7\plugins\dita\DITA-OT1.4
[echo] * input = I:/DITA/publishTemp.520.ditamap
[echo] * transtype = xhtml
[echo] * tempdir = z:/_publishTemp.520.ditamap_
[echo] * outputdir = I:/DITA/_output
[echo] * extname = .xml
[echo] * clean.temp = ${clean.temp}
[echo] * xslt.parser = XALAN
[echo] *****************************************************************
(...)
gen-list-without-flagging:
[pipeline] Using XERCES.
[pipeline] [Error] :3:152: Attribute "xmlns:xsi" must be declared
for element
type "map".
[pipeline] [Error] :3:152: Attribute "xsi:noNamespaceSchemaLocation"
must be
declared for element type "map".
[pipeline] [Error] :3:132: Attribute "xmlns:xsi" must be declared
for element
type "map".
[pipeline] [Error] :3:132: Attribute "xsi:noNamespaceSchemaLocation"
must be
declared for element type "map".
[pipeline] [Error] :3:155: Attribute "xmlns:xsi" must be declared
for element
type "concept".
[pipeline] [Error] :3:155: Attribute "xsi:noNamespaceSchemaLocation"
must be
declared for element type "concept".
[pipeline] [Error] :3:155: Attribute "xmlns:xsi" must be declared
for element
type "concept".
[pipeline] [Error] :3:155: Attribute "xsi:noNamespaceSchemaLocation"
must be
declared for element type "concept".
[pipeline] [Error] :3:155: Attribute "xmlns:xsi" must be declared
for element
type "concept".
[pipeline] [Error] :3:155: Attribute "xsi:noNamespaceSchemaLocation"
must be
declared for element type "concept".
[pipeline] [Error] :3:155: Attribute "xmlns:xsi" must be declared
for element
type "concept".
[pipeline] [Error] :3:155: Attribute "xsi:noNamespaceSchemaLocation"
must be
declared for element type "concept".
gen-list-with-flagging:
gen-list:
debug:
[pipeline] [Error] Portals.ditamap:3:152: Attribute "xmlns:xsi"
must be
declared for element type "map".
[pipeline] [Error] Portals.ditamap:3:152: Attribute
"xsi:noNamespaceSchemaLocation" must be declared for element
type "map".
[pipeline] [Error] shopping.xml:3:155: Attribute "xmlns:xsi"
must be declared
for element type "concept".
[pipeline] [Error] shopping.xml:3:155: Attribute
"xsi:noNamespaceSchemaLocation" must be declared for element
type "concept".
[pipeline] [Error] Profiles.ditamap:3:132: Attribute "xmlns:xsi"
must be
declared for element type "map".
[pipeline] [Error] Profiles.ditamap:3:132: Attribute
"xsi:noNamespaceSchemaLocation" must be declared for element
type "map".
[pipeline] [Error] event.xml:3:155: Attribute "xmlns:xsi" must
be declared for
element type "concept".
[pipeline] [Error] event.xml:3:155: Attribute "xsi:noNamespaceSchemaLocation"
must be declared for element type "concept".
[pipeline] [Error] product.xml:3:155: Attribute "xmlns:xsi"
must be declared
for element type "concept".
[pipeline] [Error] product.xml:3:155: Attribute "xsi:noNamespaceSchemaLocation"
must be declared for element type "concept".
[pipeline] [Error] definition.xml:3:155: Attribute "xmlns:xsi"
must be declared
for element type "concept".
[pipeline] [Error] definition.xml:3:155: Attribute
"xsi:noNamespaceSchemaLocation" must be declared for element
type "concept".
----->
And here is the beginning of Root.ditamap:
----->
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"
[]>
<map xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:concept.xsd:1.1"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<title>The main root of all documents</title>
----->
When I remove both attributes:
xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:concept.xsd:1.1"
and
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
everything compiles without any problems
Thanks
GregJ