This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 156382 - Netbeans won't validate docbook version 5 xml Documents
Summary: Netbeans won't validate docbook version 5 xml Documents
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Validation (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 22:12 UTC by daywalker2000
Modified: 2011-03-18 13:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daywalker2000 2009-01-06 22:12:50 UTC
Netbeans XML Validator can't validate perfectly validate docbook version 5 xml documents.
e.g.:

<?xml version="1.0" encoding="utf-8"?>
<article xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
  <title>Sample article</title>
  <para>This is a very short article.</para>
</article>

when trying to validate produces:

Checking ...newXMLDocument.xml...
cvc-elt.1: Cannot find the declaration of element 'article'. [2] 
XML validation finished.

Sample is taken from Docbook 5 and i even checked it with the w3c validator at http://validator.w3.org/

As a sidenote i can't create a xml file with a reference to the docbook schema -> "Please select a schema that has root
elements as primary."

I guess it's related so i did not created 2 separate issues yet.
Comment 1 Sergey Lunegov 2009-05-08 14:24:46 UTC
Vladimir, please take a look.
Comment 2 Vladimir Yaroslavskiy 2009-07-28 15:04:41 UTC
The validator from jdk is used for validation of xml, can't change anything.
Comment 3 MarkCraig 2011-03-18 13:14:06 UTC
I realize this one is set to "resolved - wontfix" but could it be investigated any further?

This document that points to the schema validates right away in Eclipse IDE for Java Developers downloaded today. A shame we cannot use NetBeans to edit DocBook 5.

<?xml version="1.0" encoding="UTF-8"?>
<book xmlns='http://docbook.org/ns/docbook'
	xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
	xsi:schemaLocation='http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd'>
    <info>
        <title>Test Book</title>
    </info>
    <chapter>
        <title>Only Chapter</title>
        <para>This is a very short book.</para>
    </chapter>
</book>

In NetBeans 7.0 Beta 2, I see the following in "Output - XML check" when attempting to validate the document.


XML validation started.
Checking file:/Users/.../src/main/doc/TestBook.xml...
Referenced entity at "http://docbook.org/xml/5.0/xsd/docbook.xsd".
Referenced entity at "http://docbook.org/xml/5.0/xsd/xlink.xsd".
Referenced entity at "nbres:/org/netbeans/modules/j2ee/ddloaders/catalog/resources/XMLSchema.dtd".
Referenced entity at "nbres:/org/netbeans/modules/j2ee/ddloaders/catalog/resources/datatypes.dtd".
src-resolve: Cannot resolve the name 'xml:id' to a(n) 'attribute declaration' component. [6] http://docbook.org/xml/5.0/xsd/docbook.xsd
s4s-elt-must-match.1: The content of 'db.common.attributes' must match (annotation?, ((attribute | attributeGroup)*, anyAttribute?)). A problem was found starting at: attribute. [6] http://docbook.org/xml/5.0/xsd/docbook.xsd
XML validation finished.