Problem with Author CSS mode not finding stylesheet

Having trouble installing Oxygen? Got a bug to report? Post it all here.
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Problem with Author CSS mode not finding stylesheet

Post by martindholmes »

Hi there,

I'm building a project file which has three document types, one with a template, each associated with a different schema, and all associated with a single transformation scenario; these are all working fine. I also have the document types associated with some CSS for Author Mode, and that doesn't work properly because of a path problem. Here's what appears in the XPR file for one of those document types (only the relevant bits, I think):

Code: Select all


<documentTypeDescriptor-array>
<documentTypeDescriptor>
<field name="extensionPatch">
<null/>
</field>
<field name="name">
<String>ISE Basic</String>
</field>
<field name="schemaDescriptor">
<docTypeSchema>
<field name="type">
<Integer>6</Integer>
</field>
<field name="uri">
<String>${pdu}/schemas/ise_basic.rng</String>
</field>
</docTypeSchema>
</field>
<field name="classpath">
<String-array/>
</field>
<field name="parentClassLoaderID">
<null/>
</field>
<field name="authorExtensionDescriptor">
<authorExtension>
<field name="cssDescriptors">
<cssFile-array>
<cssFile>
<field name="href">
<String>${pdu}/css/ise_tei.css</String>
</field>
<field name="title">
<String>ISE Oxygen Author CSS</String>
</field>
<field name="alternate">
<Boolean>false</Boolean>
</field>
</cssFile>
</cssFile-array>
</field>
[...]

<documentTypeRule-array>
<documentTypeRule>
<field name="namespace">
<String>http://www.tei-c.org/ns/1.0</String>
</field>
<field name="rootElem">
<String>TEI</String>
</field>
<field name="fileName">
<String>*</String>
</field>
<field name="publicID">
<String>*</String>
</field>
<field name="javaRuleClass">
<String></String>
</field>
<field name="attributeLocalName">
<String>rend</String>
</field>
<field name="attributeNamespace">
<String>*</String>
</field>
<field name="attributeValue">
<String>ise:basic</String>
</field>
</documentTypeRule>
</documentTypeRule-array>

[...]
This should, if I understand correctly, cause the document type to be recognized based on the root element attribute @rend="ise:basic", and this works -- I know because the associated template, schema validation and transformation scenario also work. It should also, I think, cause this document type to be rendered in author mode with the CSS file found here:

${pdu}/css/ise_tei.css

I assume ${pdu} is the location of the XPR file itself. However, when I open a document that matches this document type here:

${pdu}/samples/basic.xml

then go to Author mode, I see this error message:

Cannot load the associated CSS file(s).
The error was '/home/mholmes/[...]/temp/samples/ise_tei.css (no such file or directory)

where the "temp" folder is ${pdu} (where the XPR file is).

So instead of searching for the CSS file in ${pdu}/css/, it seems to be searching for it in ${cfd} (expecting it to be alongside the XML file itself).

Even if I move the file to another location (in temp itself), Oxygen still seems to look for the CSS file in temp/samples.

I simply can't figure this out. "samples" does not appear anywhere in the XPR file at all. I'm happy to send the entire XPR file and example project to anyone that has a clue about this.

All help appreciated,
Martin
martindholmes
Posts: 176
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: Problem with Author CSS mode not finding stylesheet

Post by martindholmes »

Figured this out -- I had another association with a higher priority that was getting in the way. Apologies for the post. :-)
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem with Author CSS mode not finding stylesheet

Post by Radu »

Hi Martin,

No problem, thanks for posting the solution.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply