Validating an XML snippet against a default schema, without referencing it [message #199983] |
Wed, 19 September 2007 03:56  |
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 #200168 is a reply to message #200160] |
Fri, 21 September 2007 03:53   |
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 04:30   |
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 00:38  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03554 seconds