Thanks for the help! I managed to solve this based on that.

As of my last point, I think it's still confusing that if someone does
anything in "View|Add Views", then the defaults (from addons) will not
have an effect anymore, and only for that particular document. Because
this fact is not transparent, and you have no control, like an option
to drop your view customizations for that document. Or I just didn't
see it. Also that "View|Add Views" only affects a single document, and
not all documents with a particular schema (like DocBook v5) is not
obvious from the UI either. And after realizing that, they had to
figure out that such functionality still exists under Help etc. These
don't affect me much, just saying.

On Fri, Mar 12, 2021 at 12:19 PM Hussein Shafie <huss...@xmlmind.com> wrote:
>
> On 3/11/21 3:08 PM, Daniel Dekany wrote:
> > In 9.5.0 this CSS is not selected automatically anymore:
> >
> >    <include location="xxe-config:docbook5/docbook5.xxe"/>
> >
> >    <detect>
> >      <and>
> >        
> > <rootElementNamespace>http://docbook.org/ns/docbook</rootElementNamespace>
> >        <rootElementAttribute localName="conformance" value="docgen" />
> >      </and>
> >    </detect>
> >
> >    <css name="DocBook for Docgen" location="docbook-for-docgen.css" />
> >
> > If I go to the View menu, I can still select "DocBook for Docgen", but
> > the CSS is not selected automatically anymore.
>
> Attached docbook-for-docgen.xxe and docbook-for-docgen.css work for me.
> ("Test.xml" is a sample "DocBook chapter for Docgen".)
>
> Notice name="DocBook v5+ (docgen)", not
> name="DocBook v5+". The following docbook-for-docgen.xxe creates a brand
> new configuration for XXE.
>
> --------------------------------------------------------------
> <configuration name="DocBook v5+ (docgen)"
>    mimeType="application/x-docbook-5+xml"
>    icon="xxe-config:common/mime_types/docbook.png"
>    xmlns="http://www.xmlmind.com/xmleditor/schema/configuration";
>    xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration";
>    xmlns:db="http://docbook.org/ns/docbook";
>    xmlns:svg="http://www.w3.org/2000/svg";
>    xmlns:xi="http://www.w3.org/2001/XInclude";
>    xmlns:xlink="http://www.w3.org/1999/xlink";
>    xmlns:html="http://www.w3.org/1999/xhtml";>
>
>    <include location="docbook5-config:docbook5.xxe"/>
>
>    <detect>
>     <and>
>
> <rootElementNamespace>http://docbook.org/ns/docbook</rootElementNamespace>
>       <rootElementAttribute localName="conformance" value="docgen" />
>     </and>
>    </detect>
>
>    <css name="DocBook" />
>    <css name="DocBook for Docgen" location="docbook-for-docgen.css" />
>
>    <!-- OR SIMPLY
>    <css name="A stylesheet for Docgen" location="docbook-for-docgen.css" />
>    -->
>
> </configuration>
> --------------------------------------------------------------
>
> The issue comes from the fact that both the stock "DocBook" CSS and your
> "DocBook for Docgen" CSS are alternate="false" stylesheets.
>
> When several alternate="false" stylesheets are specified, the stylesheet
> having first name in alphabetical order wins.
>
> Several ways to fix this. Two of these:
>
> 1) Comment out stock "DocBook" CSS, that is, add:
> <css name="DocBook" />
> before your:
> <css name="DocBook for Docgen" location="docbook-for-docgen.css" />
>
> OR, more simply:
>
> 2) Change the name of your custom CSS stylesheet. For example:
> <css name="A stylesheet for Docgen" location="docbook-for-docgen.css" />
> (name starts with an "A")
>
>
>
> >
> > I guess that this regression is related to the view related
> > refactoring. Actually, I'm not sure how "detect" is supposed to work
> > together with things like "Help"/"Customize Configuration"/"Use
> > Current Views Settings as Default". Which is stronger when?
>
> The settings made using the "View" menu THEN "Customize
> Configuration"/"Use Current Views Settings as Default" THEN the ".xxe"
> configuration file. That is, priority is given to what has been
> interactively specified by the user.
>
>
>
> >
> > Also configuration/windowLayout is not supported anymore (which is
> > missing from the change log I believe). What's the idea there? The
> > plugin shouldn't add views, so that the user will have full control
> > over that aspect?
>
> Configuration element <windowLayout> has been superseded by similar, but
> more powerful, <viewSettings> configuration element. See
> http://www.xmlmind.com/xmleditor/_distrib/doc/configure/viewSettings.html
>
>
>
>
> > In that case, it's not exactly easy to find the
> > above menu. Maybe it should be under View, new "Add View...". Also it
> > sounds as if it has too wide effect, because what the user wants (I
> > guess), is just add a ToC view or such, and not interfere with what
> > CSS is selected for the main view.
> >
>
> This can still be very easily done (and made automatically persistent,
> as of XXE v9.5) using "View|Add Views".



-- 
Best regards,
Daniel Dekany

--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to