Bug 82681 - XML wizard generates invalid URI when the path contains WS char
XML wizard generates invalid URI when the path contains WS char
Status: VERIFIED FIXED
Product: xml
Classification: Unclassified
Component: Code
5.x
All All
: P2 (vote)
: 5.x
Assigned To: Sherold Dev
issues@xml
: SPACE_IN_PATH
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo