Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

floatingText should be in model.divTopPart or content model of opener #2607

Open
jamescummings opened this issue Oct 25, 2024 · 0 comments
Open

Comments

@jamescummings
Copy link
Member

I believe that <floatingText> should claim membership of model.divTopPart (alongside elements like <opener>).

Use case:

I'm encoding a letter where there is a list written before the <opener> material. One might want to encode it as:

       <div>
            <head>A Heading</head>
            <list>
               <item>Item 1</item>
               <item>Item 2</item>
                <!-- many more -->
            </list>
            <opener>
               <dateline><placeName>Newcastle</placeName>, <date>25 October 2024</date></dateline>
               <salute>Dear Sir,</salute>
            </opener>
            <p>Please buy me the things on the list above.</p>
            <closer>
               <salute>With great regard,</salute>
               <signed>James</signed>
            </closer>
         </div>

This of course won't be valid, since once you have a <list> you can't have something from further down the content model of <div> like model.common or model.global, for example an <opener> here or just a <salute> by itself.

I am not going to propose that we open up model.divTopPart to all sorts of other elements, as that way lies madness and ambiguous content models... However, given that it is easy to encounter other letters and similar documents which have embedded before the main content structural elements which could be seen as texts which interrupt the main text being encoded, I do think making <floatingText> available here is a suitable solution. i.e. in the case of the above:

        <div>
            <head>A Heading</head>
            <floatingText>
               <body>
                  <list>
                     <item>Item 1</item>
                     <item>Item 2</item>
                     <!-- many more -->
                  </list>      
               </body>
            </floatingText>            
            <opener>
               <dateline><placeName>Newcastle</placeName>, <date>25 October 2024</date></dateline>
               <salute>Dear Sir,</salute>
            </opener>
            <p>Please buy me the things on the list above.</p>
            <closer>
               <salute>With great regard,</salute>
               <signed>James</signed>
            </closer>
         </div>

To do this we would add <floatingText> to model.divTopPart and thus it would become a member of model.divTop.
There is another possibility which is to add it to the content model of <opener>. (It exists in <postscript> but not in <closer>.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants