Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » XML Editing Features For Documents Without A DOCTYPE Declaration
XML Editing Features For Documents Without A DOCTYPE Declaration [message #188088] Fri, 16 February 2007 07:57 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #188270 is a reply to message #188202] Tue, 20 February 2007 04:06 Go to previous messageGo to next message
Craig Salter is currently offline Craig SalterFriend
Messages: 169
Registered: July 2009
Senior Member
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.
Re: XML Editing Features For Documents Without A DOCTYPE Declaration [message #188356 is a reply to message #188270] Wed, 21 February 2007 00:04 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Announcing WTP 1.5.3
Next Topic:URL to access web services client
Goto Forum:
  


Current Time: Tue Mar 19 04:05:47 GMT 2024

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

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

Back to the top