Subject:Entity Resolver in UI? Author:Adam Erickson Date:11 Jun 2007 07:47 PM
I'm not sure if Entity Resolver is the right term here, but here's what I need. If someone has answered this question before I couldn't find it in the forums, please point me to it.
I work with a custom application which uses Xalan and Xerces to process XML and XSLT in a custom built application. Somewhere in that application, certain known DTDs are referenced as though they were in the same location as the file being processed, even though they're not. Here's an example:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Plan SYSTEM "makalu.Service.plan.dtd">
When I try to edit this file in Stylus Studio, anything that has to parse the file (like indenting XML tags) fails because it cannot find the DTD.
Is there a way in the Stylus UI to set up a table of these DTD references and point them to a location on my local machine?
Subject:Entity Resolver in UI? Author:Adam Erickson Date:12 Jun 2007 03:38 PM
Thanks, that's what I need. One more question. I'm creating a custom catalog where the documents live in various folders under a CVS tree. I'd like to distribute this catalog to the team but everyone has their sandbox in a different place. I thought I would overcome this by making an entity reference inside the catalog file, like this:
<!DOCTYPE catalog SYSTEM "www.stylusstudio.com/Stylus-Catalog.dtd" [
<!ENTITY filePath "e:\my_cvs_sandbox\folder\subfolder">
]>
and then referencing that inside the catalog, like this:
When I check the well-formedness and validity of the catalog xml file it's valid. And it will properly replace the declared entity in the body of the xml if I try to "indent XML tags" so I know that the entity reference is working. However, when I try to "indent XML tags" on the original document (which references the DTD through this catalog) I get an error which says it cannot find the DTD. It's as though the catalog is not loading, or the entity in the catalog is not being expanded.
"Parsing error in file:///[filepath]: Cannot open makalu.Service.plan.dtd"
If I remove the &filepath; reference from the DTD it seems to resolve just fine.
Subject:Entity Resolver in UI? Author:(Deleted User) Date:22 Jun 2007 04:16 AM
Hi Adam,
currently Stylus removes the internal DTD from the files used as catalogs, so the entity you are defining will be lost; we are investigating if this behavior can be changed.