Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsXML Editing Features For Documents Without A DOCTYPE Declaration
https://www.eclipse.org/forums/index.php/mv/msg/59486/188088/#msg_188088
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]]>2007-02-16T07:57:01-00:00Re: XML Editing Features For Documents Without A DOCTYPE Declaration
https://www.eclipse.org/forums/index.php/mv/msg/59486/188096/#msg_188096
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
>
>
>]]>2007-02-16T11:53:00-00:00Re: XML Editing Features For Documents Without A DOCTYPE Declaration
https://www.eclipse.org/forums/index.php/mv/msg/59486/188202/#msg_188202
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
>>
>>
>>]]>2007-02-19T00:25:10-00:00Re: XML Editing Features For Documents Without A DOCTYPE Declaration
https://www.eclipse.org/forums/index.php/mv/msg/59486/188270/#msg_188270
format. For example...
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.]]>Craig Salter2007-02-20T04:06:01-00:00Re: XML Editing Features For Documents Without A DOCTYPE Declaration
https://www.eclipse.org/forums/index.php/mv/msg/59486/188356/#msg_188356
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.
>]]>2007-02-21T00:04:16-00:00