String-set with no result

MyMoon
Posts: 23
Joined: Thu Feb 28, 2019 2:19 pm

String-set with no result

Post by MyMoon » Thu Jul 11, 2019 6:10 pm

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

Dan
Posts: 416
Joined: Mon Feb 03, 2003 10:56 am

Re: String-set with no result

Post by Dan » Fri Jul 12, 2019 12:22 pm

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

MyMoon
Posts: 23
Joined: Thu Feb 28, 2019 2:19 pm

Re: String-set with no result

Post by MyMoon » Fri Jul 12, 2019 3:57 pm

Hi Dan!
Big thanks, "!important" is enough.

Sincerely,
Dmitry

Post Reply