You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Ferdinand Soethe <sa...@soethe.net> on 2005/03/17 23:50:18 UTC
Validating editors
I have a real nasty problem with two validating Eclipse XML-plugins as
soon as I add doctypes to my Forrest documents:
This is the header in my files:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kursbeschreibung PUBLIC "-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
"http://ssp.bildungsverein.de/dtd/kursbeschreibung-v10.dtd">
This is in %projectdir%\src\documentation\resources\schema\catalog.xcat
<public publicId="-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
uri="kursbeschreibung-v10.dtd"/>
and the dtd-file is kursbeschreibung-v10.dtd in the same directory.
The nice part is that Forrest will now validate the file without
complaint.
Not so nice: As long as the doctype-header is in the file, XMLBuddy
and Oxygen will insist on evaluating the system id and tell me that
the domain does not exist.
Telling Oxygen where the catalog is doesn't help, XMLBuddy doesn't
even know catalogs and all the other options I tried failed as well.
On the other hand, JEDIT has no complaints, so it can't be all wrong.
I really don't want to use a fixed file-system id that need
changing whenever we move to a new machine. Anybody any ideas what
else to try to get around that?
Thanks,
Ferdinand
Re: Validating editors
Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> FS>> I have a real nasty problem with two validating Eclipse XML-plugins as
> FS>> soon as I add doctypes to my Forrest documents:
>
> Good news after installing and testing Webtools M3. The open source
> product's editor in Webtools M3 works well with Forrest documents,
> has no problems with DOCTYPE-headers and finds the right grammar using an
> entry in the preferences-section. It does not yet support the Forrest
> catalog (you have to reference each grammar seperately), but I can
> live with that for now.
Perhaps an addition to the Eclipse plugin in our tools directory could
automatically add the relevant DTD's to the XML Editor plugin.
It's low on my to do list right now. But if anyone wants to tackle it I
can help with pointers via the Dev list.
Ross
Re: Validating editors
Posted by Ferdinand Soethe <sa...@soethe.net>.
FS>> I have a real nasty problem with two validating Eclipse XML-plugins as
FS>> soon as I add doctypes to my Forrest documents:
Good news after installing and testing Webtools M3. The open source
product's editor in Webtools M3 works well with Forrest documents,
has no problems with DOCTYPE-headers and finds the right grammar using an
entry in the preferences-section. It does not yet support the Forrest
catalog (you have to reference each grammar seperately), but I can
live with that for now.
Especially since code completion seems to be a much cleaner
implementation than most closed source products and works pretty
smoothly.
Logging of problems could be improved though. If you make a mistake in
referencing the Grammar, the editor switches to deducing the grammar
from the document even though a doctype is given and you won't notice
the problem unless you really do test cases on your grammar.
Ferdinand Soethe
Re: Validating editors
Posted by Ferdinand Soethe <sa...@soethe.net>.
Ferdinand Soethe wrote:
FS> I have a real nasty problem with two validating Eclipse XML-plugins as
FS> soon as I add doctypes to my Forrest documents:
XMLBuddy's creator confirmed the problem and added that they are
working on catalog support and will speed it up because of this
problem.
As a workaround: can you have a DOCTYPE without a system-ID. That
might be enough for Forrest using the catalog and perhaps would not
upset XMLBuddy?
--
Ferdinand Soethe
Re: Validating editors
Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> Ross Gardler wrote:
>
> RG> It is my understanding (and schemas are not my strong point) that if
> RG> your projects xcat contains a reference to your DTD then the above will
> RG> work. So I suppose I am asking do you have a valid entry in your
> RG> projects.xcat?
>
> I think I do. Here it is
>
> FS> This is in %projectdir%\src\documentation\resources\schema\catalog.xcat
> FS>
> FS> <public publicId="-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
> FS> uri="kursbeschreibung-v10.dtd"/>
So your kursbeschreibung-v10.dtd is in the same directory as the XCat
and you have the relative URLs property set to yes?
Ross
Re: Validating editors
Posted by Ferdinand Soethe <sa...@soethe.net>.
Ross Gardler wrote:
RG> It is my understanding (and schemas are not my strong point) that if
RG> your projects xcat contains a reference to your DTD then the above will
RG> work. So I suppose I am asking do you have a valid entry in your
RG> projects.xcat?
I think I do. Here it is
FS> This is in %projectdir%\src\documentation\resources\schema\catalog.xcat
FS>
FS> <public publicId="-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
FS> uri="kursbeschreibung-v10.dtd"/>
which is what JEdit and Forrest use to find the DTD.
Ferdinand
Re: Validating editors
Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> Ross Gardler wrote:
>
> RG> http://forrest.apache.org/docs/dev/catalog.html
>
> Nope. If you are referring to
>
> oXygen XML Editor
>
> Select the menu:
> External Tools > Preferences > XML Catalog
> Specify the XML Catalog file:
> "forrest/main/webapp/resources/schema/catalog.xcat"
>
> Doesn't work for me if the system id in the document is not valid.
>
It is my understanding (and schemas are not my strong point) that if
your projects xcat contains a reference to your DTD then the above will
work. So I suppose I am asking do you have a valid entry in your
projects.xcat?
If you have it is probably worth copying it in a mail as there are
others here who understand this stuff far more than I.
Ross
Re: Validating editors
Posted by Ferdinand Soethe <sa...@soethe.net>.
Good Morning!
David Crossley wrote:
DC> That is just for the core catalogs and DTDs from Forrest.
DC> You need to also tell your tool where to find your
DC> project catalog.
DC> For Forrest, our internal machinery knows about your
DC> project catalog. For other tools, you need to explicitly
DC> tell them.
Sorry, to quote just that was misleading. I told Oxygen the
address of the project catalog not the core catalog.
>> Doesn't work for me if the system id in the document is not valid.
DC> Sorry, i don't understand that comment.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kursbeschreibung PUBLIC "-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
"http://ssp.bildungsverein.de/dtd/kursbeschreibung-v10.dtd">
In my DOCTYPE I havve system ids like
http://ssp.bildungsverein.de/dtd/kursbeschreibung-v10.dtd (no existing url) or
file:///P:/Forrests/Kunden/Bildungsverein/src/documentation/resources/Xschema/kursbeschreibung-v10.dtd
(no existing dir)
to simulate the situation that the dir-structure at the clients disk
will be different then mine, so that the catalog mechanism has to actually kick
in and find the corrent location (rather then me having to replace all
the doctypes there).
And with JEdit and Forrest it does work while Oxygen and XMLBuddy seem to
get stuck trying to find the resource in the doctype only.
I don't really think that it has to do with the catalog not working
because both will work just finde and validate if I remove the
doctype.
Ferdinand Soethe
Re: Validating editors
Posted by David Crossley <cr...@apache.org>.
Ferdinand Soethe wrote:
> Ross Gardler wrote:
>
> RG> http://forrest.apache.org/docs/dev/catalog.html
>
> Nope. If you are referring to
>
> oXygen XML Editor
>
> Select the menu:
> External Tools > Preferences > XML Catalog
> Specify the XML Catalog file:
> "forrest/main/webapp/resources/schema/catalog.xcat"
That is just for the core catalogs and DTDs from Forrest.
You need to also tell your tool where to find your
project catalog.
For Forrest, our internal machinery knows about your
project catalog. For other tools, you need to explicitly
tell them.
> Doesn't work for me if the system id in the document is not valid.
Sorry, i don't understand that comment.
--David
Re: Validating editors
Posted by Ferdinand Soethe <sa...@soethe.net>.
Ross Gardler wrote:
RG> http://forrest.apache.org/docs/dev/catalog.html
Nope. If you are referring to
oXygen XML Editor
Select the menu:
External Tools > Preferences > XML Catalog
Specify the XML Catalog file:
"forrest/main/webapp/resources/schema/catalog.xcat"
Doesn't work for me if the system id in the document is not valid.
Thanks anyways,
Ferdinand Soethe
Re: Validating editors
Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> I have a real nasty problem with two validating Eclipse XML-plugins as
> soon as I add doctypes to my Forrest documents:
>
> This is the header in my files:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE kursbeschreibung PUBLIC "-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
> "http://ssp.bildungsverein.de/dtd/kursbeschreibung-v10.dtd">
>
> This is in %projectdir%\src\documentation\resources\schema\catalog.xcat
>
> <public publicId="-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
> uri="kursbeschreibung-v10.dtd"/>
>
> and the dtd-file is kursbeschreibung-v10.dtd in the same directory.
>
> The nice part is that Forrest will now validate the file without
> complaint.
>
> Not so nice: As long as the doctype-header is in the file, XMLBuddy
> and Oxygen will insist on evaluating the system id and tell me that
> the domain does not exist.
>
> Telling Oxygen where the catalog is doesn't help, XMLBuddy doesn't
> even know catalogs and all the other options I tried failed as well.
http://forrest.apache.org/docs/dev/catalog.html
Ross
Re: Validating editors
Posted by Ferdinand Soethe <sa...@soethe.net>.
ken clowes wrote:
kc> I use Jedit and have been astounded at its cleverness; forrest also seems
kc> to have no problems figuring out where the DTDs are.
Exactly.
kc> (Alas, I actually hard-code paths into any DTD that is not part of
kc> standard Forrest distribution. Neither Forrest nor Jedit seems
kc> to mind...)
That's the whole idea about using the catalog.
kc> It seems to me that the problem is with XMLBuddy and/or Oxygen.
And that's where I need the work around because JEDIT with it's very
unusual interface will be hard to sell to a normal user.
--
Ferdinand Soethe
Re: Validating editors
Posted by ken clowes <kc...@gmail.com>.
Hi,
It seems to me that the problem is with XMLBuddy and/or Oxygen.
I use Jedit and have been astounded at its cleverness; forrest also seems
to have no problems figuring out where the DTDs are.
(Alas, I actually hard-code paths into any DTD that is not part of
standard Forrest distribution. Neither Forrest nor Jedit seems
to mind...)
cheers.../ken
On Thu, 17 Mar 2005 23:50:18 +0100, Ferdinand Soethe <sa...@soethe.net> wrote:
>
> I have a real nasty problem with two validating Eclipse XML-plugins as
> soon as I add doctypes to my Forrest documents:
>
> This is the header in my files:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE kursbeschreibung PUBLIC "-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
> "http://ssp.bildungsverein.de/dtd/kursbeschreibung-v10.dtd">
>
> This is in %projectdir%\src\documentation\resources\schema\catalog.xcat
>
> <public publicId="-//Bildungsverein-Hannover//ssp//DTD Kursbeschreibung V1.0//DE"
> uri="kursbeschreibung-v10.dtd"/>
>
> and the dtd-file is kursbeschreibung-v10.dtd in the same directory.
>
> The nice part is that Forrest will now validate the file without
> complaint.
>
> Not so nice: As long as the doctype-header is in the file, XMLBuddy
> and Oxygen will insist on evaluating the system id and tell me that
> the domain does not exist.
>
> Telling Oxygen where the catalog is doesn't help, XMLBuddy doesn't
> even know catalogs and all the other options I tried failed as well.
>
> On the other hand, JEDIT has no complaints, so it can't be all wrong.
>
> I really don't want to use a fixed file-system id that need
> changing whenever we move to a new machine. Anybody any ideas what
> else to try to get around that?
>
> Thanks,
> Ferdinand
>
>