Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [Wtp-wst-dev] WST XML editor

Hi Lawrence,

 

Thanks for the detail and it works well.

 

I want to know if there is any other way if I just mention the schema file name in the header. All the validation and suggestions could be detected by the XML editor by having the schema file at the root of the project.

 

Our requirement is if we just place the schema files at the root of Eclipse project and then mention the name of the schema file in the header. Is it possible for us to restrict XML editor to always find the schema file from the project root by never mentioning the absolute or project relative path in the XML file?? The XML files can be in the project hierarchy anywhere in the subfolders. I used XMl catalog preference but it always place location of the file like this

 

xsi:schemaLocation="F:\Infelxion_handheld\schema\temp file:///F:/Infelxion_handheld/schema/temp/uiTemplate.xsd"

 

 

Thanks,

Kashif

 


From: wtp-wst-dev-bounces@xxxxxxxxxxx [mailto:wtp-wst-dev-bounces@xxxxxxxxxxx] On Behalf Of Lawrence Mandel
Sent: Friday, April 27, 2007 9:54 PM
To: Web Standard Tools developer discussions.
Subject: Re: [Wtp-wst-dev] WST XML editor

 


Hi Shahzad,

There are a couple problems with your declaration.

1. It appears as though you've defined a grammar with a namespace. If that is the case you need to specify the namespace of the root element of your XML document.

<uiTemplate xmlns="F:\Infelxion_handheld\schema\temp" xmlns:xsd="http://www.w3.org/2001/XMLSchema"...

2. Your xsi:schemaLocation isn't correct. The way it is specified you're overriding the schema for schema. Try the following:

<uiTemplate xmlns="F:\Infelxion_handheld\schema\temp" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="F:\Infelxion_handheld\schema\temp file:///F:/Infelxion_handheld/schema/temp/uiTemplate.xsd">

Lawrence Mandel

Software Developer
IBM Rational Software
Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
lmandel@xxxxxxxxxx


"Shahzad, Kashif" <Kashif_Shahzad@xxxxxxxxxx>
Sent by: wtp-wst-dev-bounces@xxxxxxxxxxx

04/27/2007 12:31 PM

Please respond to
"Web Standard Tools developer discussions." <wtp-wst-dev@xxxxxxxxxxx>

To

<wtp-wst-dev@xxxxxxxxxxx>

cc

 

Subject

[Wtp-wst-dev] WST XML editor

 

 

 




Hi All,
 
I am using latest version of WST XML editor and we are planning to incorporate this editor. The issue I have is I could not find any way to have validation and content assist active for my XML files.
 
I tried in different ways like creating a catlog using XML editor preferences where I have defined this category
 
Location:           F:\Infelxion_handheld\schema\temp\uiTemplate.xsd
URI:                  file:///F:/Infelxion_handheld/schema/temp/uiTemplate.xsd
Key Type:         Schema Location
Key:                 F:\Infelxion_handheld\schema\temp\uiTemplate.xsd
 
 
When I add this entry to XML file thorugh Design Page the Text page shows the contents like this
 
 
<?xml version="1.0" encoding="UTF-8"?>
 
<uiTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema F:\Infelxion_handheld\schema\temp ">
     
</uiTemplate>
 
When I do validate a warning message come up which says
 
“No grammer constraints DTD or XML schema) detected for the document”
 
I will appreciate if you do let me know any workaround.
 
Thanks,
Kashif
 
----------------------------
Kashif Shahzad
 
Technical Lead, Tools Group Pakistan
Mentor Graphics Pakistan Development (Private) Ltd
www.mentorg.com/embedded
 _______________________________________________
wtp-wst-dev mailing list
wtp-wst-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev


Back to the top