cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Configuring XML schemas and stylesheets?

ptc-953343
1-Visitor

Configuring XML schemas and stylesheets?

Does anyone have experience with this? I've only recently switched to using schemas within Arbortext and having the following problem. I seem to be finding the schema properly as there is no warning about not finding the schema. What I do get a warniing about is that Arbortext can't find the stylesheet to go with it. I then navigate over to the stylesheet and it launches just fine.


I then close the document and try and reopen it, I get the same message about not finding the stylesheet.


I know I can add an association to the stylesheet, but I would prefer not, also I have 2400 existing files I need to touch, I don't want to do this for every file.


I'm not sure, but it almost looks like the Editor is finding the Schema via the URL somewhere other than my system. I have my catalog path set to a catalog that has the following entry:


URI "http://www.s1000d.org/S1000D_4-0/xml_schema_flat/descript.xsd" "./s1000d-4.0.1schemas/descript/descript.xsd"


The path is correct and the schema and stylesheet are at that location. The stylesheet is named descript.style as well.


What did I miss?


Part of the reason I don't want to set the association is becasue people have different drive letters mapped and this is only a temporay location for these schemas until I can get them into the PE server and make them official.


..dan

6 REPLIES 6

Dan,

On the Help->Session dialog, it will show you the physical location of a document's doctype file. You can use that to verify that the catalog file is doing its job. If it isn't, check out your catalogpath preference (under Advanced Preferences) and make sure the directory containing your catalog file is there.

By default, Arbortext looks for a .style file in the same directory as your document type file with the same base name as the doc type file (which, as a general rule, should be the same as the directory name) so, in this case, s1000d-4.0.1 schemas/descript/descript.style. (.fos also works for FOSI stylesheets if you're not using Styler). So once you're sure the catalog is doing its job, make sure the stylesheet is in the right place with the right name.

One more thing that might be getting involved here, though probably not, is that you can specify an alternative directory for your doctype's stylesheets using the stylesheetDirectory attribute on <options> in your document type's DCF file (this is how all of Arbortext's DITA doctypes use the same stylesheet). Unless you or someone on your team has explicitly set that, though, it's probably not the culprit.

Chris

Also check to make sure you don't have something set in your preferences. (WCF file which is in different places for different versions. For Arbortext 6 it might be in C:\Users\yourname\AppData\Roaming\PTC\Arbortext\Editor)

The session information is saying that it is finding the schema at the url http://www.s1000d.org/S1000D_4-0/xml_schema_flat/descript.xsdwhich does have a copy of the schema. I'll double check the other stuff. I kno wthe catalog path is set correctly as I cut and pasted that path and the catalog file is there. Style sheet location hasn't been changed and there is no dcf file defined.

Well I recreated the paths in the catlog file, just in case there was a typo and that didn't do anything for me. those that uses schemas, what does the session information report for a schema? I am bothered by the fact mine is reporting the URL rather than something local but that might be correct.


..dan

Dan,

It's using the URI as it's specified in the document, which suggests that it's not finding your catalog file for some reason. I'm a developer, so my impulse is to jump to the command-line; your mileage may vary; but try out this command:

eval catalog_resolve("URI", "

If you get a blank window, then for whatever reason, it's not finding your catalog entry. If it does return your local file location, then I don't know what's going on.

Chris

Just to close this thread out.


1) Even though a schema has a URL to indicate it's location, the reported path in the Session info should be to your local file. There is no difference in working with schemas and DTDs - setting up that is.


What threw me off was the fact the "DTD/schema" was not being looked for just the stylesheet. With DTDs those are not available on any system because the paths are always file paths, not URLs. So the URL was used to find the schema but then there was no stylesheet at that location.


My catalog wasn't working because I had changed s1000d issues from 4.0 to 4.0.1 and they had changed the URL for 4.0.1. Catlog was setup for issue 4.0.


thanks everyone for the sanity check and help.

Announcements

Top Tags