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 82681 - XML wizard generates invalid URI when the path contains WS char
Summary: XML wizard generates invalid URI when the path contains WS char
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords: SPACE_IN_PATH
Depends on:
Blocks:
 
Reported: 2006-08-15 01:42 UTC by Samaresh Panda
Modified: 2007-04-10 22:38 UTC (History)
1 user (show)

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 Samaresh Panda 2006-08-15 01:42:09 UTC
Here is how you can get to the problem:
1. Create a project in a location that contains whitespace. For example, on
windows, "C:\Documents and Settings/Administrator".
2. Create a schema (XSD) file, say PO.xsd in some package.
3. In the same package, create a XML file, say PO.xml and in the wizard, choose
PO.XSD as the document type.

Here is how PO.xml looks like:
<purchaseOrder xmlns='http://xml.netbeans.org/schema/newXMLSchema'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='http://xml.netbeans.org/schema/newXMLSchema
   file:/C:/Documents and
Settings/Administrator/JavaApplication1/src/javaapplication1/newpo.xsd'>  
</purchaseOrder>

When you validate this xml, it doesn't work because it cannot find the schema. 

As per schema spec, http://www.w3.org/TR/xmlschema-0/#schemaLocation, the
attribute schemaLocation can specify multiple namespace+schema pair separated by
whitespaces.

The wizard should generate proper URI for the schema in schemaLocation.
Comment 1 Sherold Dev 2006-08-15 11:04:42 UTC
TM -> 5.5
Comment 2 Sherold Dev 2006-08-16 14:12:09 UTC
F.

The fix also takes care of proper escaping the non-ASCII characters.

Checking in src/org/netbeans/modules/xml/core/wizard/SchemaPanel.java;
/cvs/xml/core/src/org/netbeans/modules/xml/core/wizard/SchemaPanel.java,v  <-- 
SchemaPanel.java
new revision: 1.6.260.2; previous revision: 1.6.260.1
done
Comment 3 tonybeckham 2007-04-10 22:38:54 UTC
Fix VERIFIED in NetBeans IDE Dev (Build 200704091800)