Page 1 of 1

String-set with no result

Posted: Thu Jul 11, 2019 6:10 pm
by MyMoon
Hi group!
I've got a standard construction to build strings:

Code: Select all

*[class ~= "map/map"] >  
 *[class ~= "topic/topic"] > 
   *[class ~= "topic/title"]   
    { 
     string-set: chaptertitle1 content(), chaptertitle2 "", chaptertitle3 ""; 
}

*[class ~= "map/map"] >  
 *[class ~= "topic/topic"] > 
  *[class ~= "topic/topic"] >
   *[class ~= "topic/title"]   
    { 
     string-set: chaptertitle2 content(), chaptertitle3 ""; 
}

*[class ~= "map/map"] >  
 *[class ~= "topic/topic"] > 
  *[class ~= "topic/topic"] >
    *[class ~= "topic/topic"] >
     *[class ~= "topic/title"]   
    { 
     string-set: chaptertitle3 content() 
}
But

Code: Select all

string(chaptertitle1)
is empty. It looks like chapters of higher level don't exist, so

Code: Select all

string(chaptertitle2)
doesn't see them and repeats with no dependance which chapter is current now.
My .ditamap is here:

Code: Select all

    <chapter href="sg/concept/c_introduction.dita"/>
    <chapter href="sg/concept/c_structure_and_tools.dita"/>
    <chapter href="sg/concept/c_fonts_and_colors.dita"/>
    <chapter href="sg/concept/c_transformation_settings.dita"/>
    <chapter href="sg/concept/c_frameworks.dita"/>
    <chapter navtitle="Создание топиков">
        <topicref href="sg/concept/c_preparation.dita"/>
        <topicref href="sg/concept/c_generic_topics.dita"/>
        <topicref href="sg/concept/c_registers.dita"/>
        <topicref href="sg/concept/c_operations.dita"/>
    </chapter>
    <chapter href="sg/concept/c_pictures.dita"/>
    <chapter href="sg/concept/c_notes.dita"/>
    <chapter href="sg/reference/r_style_definitions.dita"/>
Where I'm wrong?
Thanks for any advice!

Regards,
Dmitry

Re: String-set with no result

Posted: Fri Jul 12, 2019 12:22 pm
by Dan
Hello Dmitry,

I think those selectors have a lower specificity than the ones from the built-in CSSs.
Depending on the numbering parameter from the transformation scenario, one of the built-in CSSs are used:

p-numbering-deep-chapter-scope-no-page-reset.css
p-numbering-deep-chapter-scope.css
p-numbering-deep.css

I recommend either copying the relavant rules (the ones defining the string-sets) from those CSSs to your customization CSS and then modifying the defined strings, or adding an !important to your string-set properties.

Many regards,
Dan

Re: String-set with no result

Posted: Fri Jul 12, 2019 3:57 pm
by MyMoon
Hi Dan!
Big thanks, "!important" is enough.

Sincerely,
Dmitry