cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

_nolinebreak in gentext

JeffStevenson
2-Guest

_nolinebreak in gentext

Hello everyone,


I'm working with Styler 6.0 M050. I'm looking for a way to use the _nolinebreak PI within gentext. Since PIs are stripped in gentext, I cannot find a way to retain this PI. I cannot find a _nolinebreak equivalent within custom touchup.


If anyone has any thoughts on this, it would be greatly appreciated. Thanks!



As an addendum to this. I'm not speaking of adding the nolinebreak as PI in the context in Styler. The tech editors often add the PI in Editor in specific cases. This is where the PI is being stripped.


-Jeff

9 REPLIES 9

Hi Jeff--



I think you are trying to insert some generated text, where the
generated text doesn't break across lines. Is that right?



In that case, I think you will want to use a UFE to handle that. The
general approach goes something like this:



* In your regular element context where you want to insert the
gentext, insert a UFE surrounding it. In other words, your gentext
should be something like this:

o <_ufe:noBreak>My generated text that should stay
together</ufe:nobreak>

* In the definition for _ufe:noBreak, on the Breaks tab, click
Keeps, and set "Keep element content together" to "Yes", and set "Keep
scope" to "on same line".



That should do it, if I understand your use case correctly. (If not,
please feel free to clarify.)



--Clay





Clay Helberg

Senior Consultant

TerraXML


Hi Clay,


I'm pulling content from another element into the generated text. I need for the element content to keep from breaking.


So assuming I'm pulling element <section>


<section>







</section>


I cannot apply a global rule. The editors want some of the content to keep together and allow other content within the section to break. This was rather easy in 5.3 since _nolinebreak wasn't stripped out in generated text. Now, I'm having some trouble getting around the new 6.0 functionality.


I don't think you can insert _ufe's in to the main XML stream. I could be wrong.


-Jeff

Hi Jeff--



I'm sorry, I still don't follow what your use case is. Can you please
clarify with a concrete example of source XML, and what you want the
output to look like?



--Clay





Clay Helberg

Senior Consultant

TerraXML


Hi Clay,


For example...


If I have an element <meta> with gentext that is pulling content from element <section>, they need to keep various part of <section>'s content on the same line, but allow other parts to break. The default is for all content to break to it's own line.


<section>


Here is text.


Here is some more text.


Additioinal content.


</section>


The default is formatting is...


Here is some more text.


Here is text. Here is some more text.


Are PIs your only option for markup to indicate that the content of the "p"
elements should be inline, rather than block? What about some type of
wrapper element, or an attribute? If PIs are really the only option,
perhaps you could put a non-Arbortext singleton PI into the second "p" to
indicate that it should not break onto another line.

As long as there is something to identify that different formatting is
required, you can setup your style sheet to act accordingly, including
establishing contexts that will format material differently when it is used
in gentext than in the normal flow.

-Brandon 🙂


On Tue, Sep 25, 2012 at 11:30 AM, Jeff Stevenson <
jstevenson@gpslsolutions.com> wrote:

> Hi Clay,
>
> For example...
>
> If I have an element <meta> with gentext that is pulling content from
> element <section>, they need to keep various part of <section>'s content on
> the same line, but allow other parts to break. The default is for all
> content to break to it's own line.
>
> <section>
>
>

Here is text.


>
>

Here is some more text.


>
>

Additioinal content.


>
> </section>
>
> The default is formatting is...
>
> Here is text.
>
> Here is some more text.
>
> Additonal text.
>
> However, they may want to keep some of the p's on the same line. In 5.3,
> we could add nolinebreak PIs around the

's that needed to be kept
> together.
>
> <section>
>
> **
>
>

Here is text.


>
>

Here is some more text.


>
> **
>
>

Additioinal content.


>
> </section>
>
> This would yield the following formatting within <meta>.
>
> Here is text. Here is some more text.
>
> Additional content.
>
> In 6.0, the nolinebreak PI is getting suppressed in gentext. I'm looking
> for a way to allow the editors to add these nolinebreak regions as needed
> that won't be suppressed by Editor.
>
> Thanks,
>
> -Jeff
>

Hi Jeff--



This seems like a really strange usage to me. Perhaps there's still
something I don't understand about it. But what is the advantage of

Hi guys,


I was trying to avoid modifying the DTD, but it looks like that might be the only way to accomplish the formatting.


I'm unsure why the content in the p's are separated or need to remain separated. I'm trying to reproduce the environment in 6.0 as closely as it was in 5.3. This is being driven by an upgrade.


Does anyone know how to define custom touchup PIs? PTC allows to up to 9 additional custom touchups (attr1 - 9). I can't see in the docs how to define these other than they are defined within ACL. Has anyone defined these before?


I'm trying to leave DTD mods as a last resort. Although, it's sounding like the easiest solution.


Thanks for the help!


-Jeff



In Reply to Clay Helberg:


Hi Jeff--



This seems like a really strange usage to me. Perhaps there's still
something I don't understand about it. But what is the advantage of

I have used the additional attributes on touchup but only via ACL. I'm not
sure if there is a way to "define" them other than to code both the writing
and reading (whether by stylesheet or more ACL).

On Tue, Sep 25, 2012 at 11:19 AM, Jeff Stevenson <
jstevenson@gpslsolutions.com> wrote:

> Hi guys,
>
> I was trying to avoid modifying the DTD, but it looks like that might be
> the only way to accomplish the formatting.
>
> I'm unsure why the content in the p's are separated or need to remain
> separated. I'm trying to reproduce the environment in 6.0 as closely as it
> was in 5.3. This is being driven by an upgrade.
>
> Does anyone know how to define custom touchup PIs? PTC allows to up to 9
> additional custom touchups (attr1 - 9). I can't see in the docs how to
> define these other than they are defined within ACL. Has anyone defined
> these before?
>
> I'm trying to leave DTD mods as a last resort. Although, it's sounding
> like the easiest solution.
>
> Thanks for the help!
>
> -Jeff
>
>
> In Reply to Clay Helberg:
>
> Hi Jeff--
>
>
>
> This seems like a really strange usage to me. Perhaps there's still
> something I don't understand about it. But what is the advantage of

Jeff,


Since the DTD already has the attr1-9 defined, there is no need to modify the DTD. If you want the user/writer to see something on the Editor screen OTHER than attr1-9, you can use an alias through the dtd.alias file that is initiated through the instance.acl file within the doctype folder.


To get something on the screen to respond to your selection of one or more of the attr1-9 attributes, you code the stylesheet.


With that said, I tend to agree with Clay. The separate lines you're seeing I believe are from the

coding. The PI's are not able to 'disable' the line breaks that are generated within the

tags. You'd have to have an attribute on the

tag that would give the ability for the stylesheet to react on that particular

tag by not producing a new line after the tag.


Good luck,



Bob



In Reply to Jeff Stevenson:



Hi guys,


I was trying to avoid modifying the DTD, but it looks like that might be the only way to accomplish the formatting.


I'm unsure why the content in the p's are separated or need to remain separated. I'm trying to reproduce the environment in 6.0 as closely as it was in 5.3. This is being driven by an upgrade.


Does anyone know how to define custom touchup PIs? PTC allows to up to 9 additional custom touchups (attr1 - 9). I can't see in the docs how to define these other than they are defined within ACL. Has anyone defined these before?


I'm trying to leave DTD mods as a last resort. Although, it's sounding like the easiest solution.


Thanks for the help!


-Jeff



Top Tags