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


Kashif,

This conversation is getting a bit deep. I'll echo Craig's comments at this point and ask that you move it to the WTP newsgroup, the correct forum for WTP usage questions.

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/30/2007 11:09 AM

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

To
"Web Standard Tools developer discussions." <wtp-wst-dev@xxxxxxxxxxx>
cc
Subject
RE: [Wtp-wst-dev] WST XML editor





Hi Lawrence,
 
Just focusing more at the solution you provided:
 
Let me repeat your requirement to ensure I understand it. You want to avoid using the XML catalog, simply mentioning the location of the schema file in the XML file and having the editor and validator locate it in the same project. If this is the case simply use a relative location such as:

xsi:schemaLocation="F:\Infelxion_handheld\schema\temp
uiTemplate.xsd"
 
 
I noticed that it does work when the XML files and schema files are at the same level within the project. This is why I mentioned that I have to make it relative to the project like
 
<uiMenu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../uiMenu.xsd">
 
 
Thanks,
Kashif



From: wtp-wst-dev-bounces@xxxxxxxxxxx [mailto:wtp-wst-dev-bounces@xxxxxxxxxxx] On Behalf Of Shahzad, Kashif
Sent:
Monday, April 30, 2007 8:03 PM
To:
Web Standard Tools developer discussions.
Subject:
RE: [Wtp-wst-dev] WST XML editor

 
Hi Lawrence,
 
I think I am confused with the namespace concept. Lets for the time being we assume that there is no namespace concept exists in our problem.
 
Thanks,
Kashif
 



From: Shahzad, Kashif
Sent:
Monday, April 30, 2007 7:44 PM
To:
'Web Standard Tools developer discussions.'
Subject:
RE: [Wtp-wst-dev] WST XML editor

 
Hi Lawrence,
 
My project structure looks like this
 
Project
  • TemplateFolder
    • Template1.xml
    • Template2.xml
    • MenuFolder
      • Menu1.xml
      • Menu2.xml
      • Project.xml
      • Tokens.xml
      • Settings.xml
      • SchemaFolder
        • Schema for Template XML files
        • Schema for Menu XML files
        • Schema for Project XML files
        • Schema for Tokens XMl files
        • ………..
        • ………..
         
        What I really wanted to do is to just have a subfolder at the project level say “schema”. This is the folder which will have the schema files for all the different types of XML files (template, menu, project, tokens and settings). I don’t want to put absolute the location of the schema file. If I mention the absolute location of the schema file in the XML file then all the projects does not preserve the shareable nature. It means if in my project the location of the schema file is
         
        F:\Infelxion_handheld\schema\temp\uiTemplate.xsd
         
        This same location will not be valid for other user at his system. What I can do is for the user I can place all my schema files in the in the project root and might be XML editor allow me some sort of configuration mechanism to resolve these schema files placed under the project root. If it does have already built in mechanism that will be great which I don’t know.
         
         
        I got know that it can resolve the schema file location if I use
         
        <uiMenu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../uiMenu.xsd">
         
        uiMenu is the root element in my XMl file. This XML file is placed under the Menu folder in the Project.  But this is too an issue as user is allowed to move file from one directory to another and then we have to track the copying operation as well which seems not to be realistic.
         
        I would really appreciate your valuable comments to solve the above problem.
         
        Thanks,
        Kashif
         
         
         
         
         



        From: wtp-wst-dev-bounces@xxxxxxxxxxx [mailto:wtp-wst-dev-bounces@xxxxxxxxxxx] On Behalf Of Lawrence Mandel
        Sent:
        Monday, April 30, 2007 7:15 PM
        To:
        Web Standard Tools developer discussions.
        Subject:
        RE: [Wtp-wst-dev] WST XML editor

         

        Hi Kashif,


        Let me repeat your requirement to ensure I understand it. You want to avoid using the XML catalog, simply mentioning the location of the schema file in the XML file and having the editor and validator locate it in the same project. If this is the case simply use a relative location such as:


        xsi:schemaLocation
        ="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/30/2007 03:29 AM


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


        To
        "Web Standard Tools developer discussions." <wtp-wst-dev@xxxxxxxxxxx>
        cc
         
        Subject
        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_______________________________________________
        wtp-wst-dev mailing list
        wtp-wst-dev@xxxxxxxxxxx
        https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev
        _______________________________________________
        wtp-wst-dev mailing list
        wtp-wst-dev@xxxxxxxxxxx
        https://dev.eclipse.org/mailman/listinfo/wtp-wst-dev


Back to the top