Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Validating an XML snippet against a default schema, without referencing it
Validating an XML snippet against a default schema, without referencing it [message #199983] Wed, 19 September 2007 07:56 Go to next message
Eclipse User
Originally posted by: oemer.yildiz.semanticedge.com

Hi,

the user is able to open an (WST) XML editor which gets its contents
from a custom IEditorInput. It only returns the relevant part of the
"backing" XML document. Is it possible to tell the editor to validate
this snippet against the schema specified in the document?

Best regards,
Ömer
Re: Validating an XML snippet against a default schema, without referencing it [message #200160 is a reply to message #199983] Fri, 21 September 2007 02:34 Go to previous messageGo to next message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
>Hi,
>
>the user is able to open an (WST) XML editor which gets its contents
>from a custom IEditorInput. It only returns the relevant part of the
>"backing" XML document. Is it possible to tell the editor to validate
>this snippet against the schema specified in the document?
>
>Best regards,
>Ömer

Hi Ömer,

Can you clarify your scenario? Do you mean you've got a custom editor from
which you want to invoke validation, that the WST XML editor isn't
validating your document, something else? The more details the better.

Lawrence
Re: Validating an XML snippet against a default schema, without referencing it [message #200168 is a reply to message #200160] Fri, 21 September 2007 07:53 Go to previous messageGo to next message
Eclipse User
Originally posted by: oemer.yildiz.semanticedge.com

Hi Lawrence,

the editor I'm opening is the WST XML Editor, but not with a custom
IEditorInput, which only returns a specific snippet of an XML document.
So the editor doesn't know anything about that, therefore it does not
see the schema declaration in the backing XML file. If there were a
schema declaration the editor would automatically do schema validation
on user input. My question was whether it is possible to tell the editor
programmatically against which schema to validate... because it only
sees the XML snippet, and no schema declaration at all.

I hope i could clarify my scenario :-)

Best regards,
Ömer

lmandel@ca.ibm.com schrieb:
>> Hi,
>>
>> the user is able to open an (WST) XML editor which gets its contents
>>from a custom IEditorInput. It only returns the relevant part of the
>> "backing" XML document. Is it possible to tell the editor to validate
>> this snippet against the schema specified in the document?
>>
>> Best regards,
>> Ömer
>
> Hi Ömer,
>
> Can you clarify your scenario? Do you mean you've got a custom editor from
> which you want to invoke validation, that the WST XML editor isn't
> validating your document, something else? The more details the better.
>
> Lawrence
Re: Validating an XML snippet against a default schema, without referencing it [message #200176 is a reply to message #200168] Fri, 21 September 2007 08:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: oemer.yildiz.semanticedge.com

Sorry, there's an error in my first sentence.
I meant that, the WST XML editor is opened *with* a custom IEditorInput,
which returns a specific snippet of an XML document.

Best regards

Ömer Yildiz schrieb:
> Hi Lawrence,
>
> the editor I'm opening is the WST XML Editor, but not with a custom
> IEditorInput, which only returns a specific snippet of an XML document.
> So the editor doesn't know anything about that, therefore it does not
> see the schema declaration in the backing XML file. If there were a
> schema declaration the editor would automatically do schema validation
> on user input. My question was whether it is possible to tell the editor
> programmatically against which schema to validate... because it only
> sees the XML snippet, and no schema declaration at all.
>
> I hope i could clarify my scenario :-)
>
> Best regards,
> Ömer
>
> lmandel@ca.ibm.com schrieb:
>>> Hi,
>>>
>>> the user is able to open an (WST) XML editor which gets its contents
>>> from a custom IEditorInput. It only returns the relevant part of the
>>> "backing" XML document. Is it possible to tell the editor to validate
>>> this snippet against the schema specified in the document?
>>>
>>> Best regards,
>>> Ömer
>>
>> Hi Ömer,
>>
>> Can you clarify your scenario? Do you mean you've got a custom editor
>> from which you want to invoke validation, that the WST XML editor
>> isn't validating your document, something else? The more details the
>> better.
>>
>> Lawrence
Re: Validating an XML snippet against a default schema, without referencing it [message #200355 is a reply to message #200176] Mon, 24 September 2007 04:38 Go to previous message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
Hi Ömer,

The XML editor delegates to the XML validator for validation. As you've
said, the validator needs to be able to find a schema for the XML document
- in your case fragment. Does your fragment use namespaces? If so, have
you tried registering schemas for your namespaces in the XML catalog?
(Window->Preferences->Web and XML->XML Catalog) This can be done
programmatically or manually.

Lawrence
Previous Topic:Using EJB client classes in an RCP application
Next Topic:Design view with WTP?
Goto Forum:
  


Current Time: Tue Sep 16 15:35:11 GMT 2014

Powered by FUDForum. Page generated in 0.08503 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software