XML Editing Features For Documents Without A DOCTYPE Declaration [message #188088] |
Fri, 16 February 2007 07:57  |
Eclipse User |
|
|
|
Originally posted by: webwhysguy.gmail.com
Greetings,
I'm looking to create an editor that duplicates the functionality
demonstrated when editing XML files that reference DTD's/Schemas (including
entries in the XML Catalog) in the DOCTYPE declaration (DTD/Schema-specific
grammar validation, content assist, code folding). The challenge I have is
the XML file will not always have a DOCTYPE declaration to point it to the
right DTD/Schema, so I can't get away with just creating an XML Catalog
entry. I need a way to associate an XML file to a specific DTD without it
being specified in the file (the file will always have a specific name,
e.g., data.cfg). Is this possible? Any suggestions on how I might approach
this problem without duplicating all of the features and functionality
already provided by the XML editor?
Thanks in advance!
Take Care,
- Billy
|
|
|
Re: XML Editing Features For Documents Without A DOCTYPE Declaration [message #188096 is a reply to message #188088] |
Fri, 16 February 2007 11:53   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Billy,
Wouldn't the document be using a namespace such that the namespace
itself can be mapped to a schema document using the catalog?
webwhysguy wrote:
> Greetings,
>
> I'm looking to create an editor that duplicates the functionality
> demonstrated when editing XML files that reference DTD's/Schemas (including
> entries in the XML Catalog) in the DOCTYPE declaration (DTD/Schema-specific
> grammar validation, content assist, code folding). The challenge I have is
> the XML file will not always have a DOCTYPE declaration to point it to the
> right DTD/Schema, so I can't get away with just creating an XML Catalog
> entry. I need a way to associate an XML file to a specific DTD without it
> being specified in the file (the file will always have a specific name,
> e.g., data.cfg). Is this possible? Any suggestions on how I might approach
> this problem without duplicating all of the features and functionality
> already provided by the XML editor?
>
> Thanks in advance!
>
> Take Care,
> - Billy
>
>
>
|
|
|
Re: XML Editing Features For Documents Without A DOCTYPE Declaration [message #188202 is a reply to message #188096] |
Mon, 19 February 2007 00:25   |
Eclipse User |
|
|
|
Originally posted by: webwhysguy.gmail.com
Hi Ed,
Thanks for replying. If I understand you correctly, unfortunately the
answer is no. That is precisely the crux of my challenge. Within the text
of the instance document there will not be a reference to a schema namespace
or DTD. Of course, the structure of the document, all elements etc., are
defined via DTD. Unfortunately, I'm working with a predefined instance
document so this is not something I can change. The system that consumes
the document identifies it primarily by its physical location and it's name,
then uses the DTD to validate it. I need to do something similar.
Thanks
- Billy
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:er45v3$o4n$1@utils.eclipse.org...
> Billy,
>
> Wouldn't the document be using a namespace such that the namespace itself
> can be mapped to a schema document using the catalog?
>
>
> webwhysguy wrote:
>> Greetings,
>>
>> I'm looking to create an editor that duplicates the functionality
>> demonstrated when editing XML files that reference DTD's/Schemas
>> (including entries in the XML Catalog) in the DOCTYPE declaration
>> (DTD/Schema-specific grammar validation, content assist, code folding).
>> The challenge I have is the XML file will not always have a DOCTYPE
>> declaration to point it to the right DTD/Schema, so I can't get away with
>> just creating an XML Catalog entry. I need a way to associate an XML
>> file to a specific DTD without it being specified in the file (the file
>> will always have a specific name, e.g., data.cfg). Is this possible?
>> Any suggestions on how I might approach this problem without duplicating
>> all of the features and functionality already provided by the XML editor?
>>
>> Thanks in advance!
>>
>> Take Care,
>> - Billy
>>
>>
>>
|
|
|
|
Re: XML Editing Features For Documents Without A DOCTYPE Declaration [message #188356 is a reply to message #188270] |
Wed, 21 February 2007 00:04  |
Eclipse User |
|
|
|
Originally posted by: webwhysguy.gmail.com
Thanks Craig, unfortunately I don't have any control over the XML format.
In fact, I have about four such document types that I have to create
management tools for as part of my project. Any thoughts on where I would
start the digging process? Does this mean I have to start from scratch or
can I take advantage of what the XML tool is doing behind the scenes?
Thanks,
- Billy
"craig" <csalter@ca.ibm.com> wrote in message
news:87c7434b86de6f06825789f713e54f83$1@www.eclipse.org...
> I'd recommend using namespaces if you have any control at all over the xml
> format. For example...
>
> <foo xmlns="http://foo/bar">
> <bar>
> </bar>
> </foo>
>
> If you just structure you document as shown here you'll be able to
> associate the schema fairly easily. Otherwise you're going to have to dig
> quite deeply in the plumbing in order to make things work.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04875 seconds