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 228959 - Check XML action does not make check syntax of xmlns attribute
Summary: Check XML action does not make check syntax of xmlns attribute
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Validation (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-24 13:44 UTC by chrislovsund
Modified: 2013-04-25 14:44 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chrislovsund 2013-04-24 13:44:57 UTC
If you have a xml file with this content:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
                xmlns:="http://support.procad.de"
                version="1.0">
</xsl:stylesheet>

It should probably catch that the attribute xmlns:="http://support.procad.de" is missing an alias/name. It should be either xmlns="http://support.procad.de" or something like xmlns:procad="http://support.procad.de"

Opening the same file in Chrome will render:
"This page contains the following errors:
error on line 3 at column 7: Failed to parse QName 'xmlns:'
Below is a rendering of the page up to the first error."

Firefox:
XML Parsing Error: not well-formed
Location: file:///C:/temp/test.xml
Line Number 3, Column 23:
                xmlns:="http://support.procad.de"
----------------------^
Comment 1 Svata Dedic 2013-04-25 14:44:31 UTC
Strangely enough, the standard JAXP parser accepts such syntax. The reported attribute as NS URI "http://www.w3.org/2000/xmlns/" and localName = "".

But obviously such attribute is usually not what the user wanted to type