How to hide the header on an Xsl Fo, page overflow - xslt

I have a header, a body, and a footer set up for an Xsl Fo page sequence. There are certain items displayed on this page in blocks with a keep-together.within-page value of 1. This works really well for the most part, but I've noticed that when stuff that will span an entire page or more absolutely has to break it will end up on a new page and then get cut (which is fine) but then the header gets drawn in the middle of this making everything look a little gross/confusing (not fine) as whatever remains is drawn onto the next page.
So I'm wondering, is there some way to suppress the header on content overflow into the next page?
Or is there some way with alternative page sequences or something to achieve what I want?
Sorry for the vagueness here, and a lack of a current working representation of what's going on. I am very new to Xsl Fo, and most of our working code is under an abstracted framework, but if I knew of the correct directives or if this was possible I'm sure I could implement them into the framework and get things working.
Edit: I have attached a picture to hopefully clarify what is going on

You could put the content that you want to hide in an fo:marker and use fo:retrieve-marker in the fo:static-content that flows into the 'region-before' region.
The trick is to put a copy of the 'real' fo:marker before each of the blocks with the keep-together and also put an empty fo:marker with the same marker-class-name as the first thing inside the block. (I don't know what your XSL-FO markup is like, but you may need to put an fo:wrapper around each block as a place to put the 'real' marker.)
If retrieve-position is first-including-carryover (see https://www.w3.org/TR/xsl11/#retrieve-position), then you should get an empty fo:marker for blocks that broke across the page boundary and get the 'real' fo:marker on other pages.

Related

docmosis - repeating row (or section) is not wrapping big text

I try to integrate docmosis into my product, using the docmosis-java.
I’ve encountered an issue where there is a Java object that contains a member with huge text.
I have declared a repeating-row in my template (as I may have more than one instance from this type). In this case, the text (which is huge, contains many pages) appears partially in the report; only a single page is shown; it seems that instead of wrapping to the next page, to show the rest of the text, it is cut hence invisible in the report.
This is my template:
As mentioned, when “getBody()” return HUGE text, it is not visible in the report – only the first page of it.
Any ideas?
It looks like your template is using a table. If so, you should check that your table allows the rows to break across pages. If this is disabled, it is likely to produce only partial results since you have said the row must be on a a single page.
Does that help?

Does XSLFO support fixed layout?

I am using xslfo to generate PDF from my XML file, but whenever I edit something in my source documents, it will impact on pagination of output, that cause some indexing issue that runs according to there appearance.
Are there any attributes or elements to handle or to fix this behaviour?
I assume you have the following situation:
Initially, a page is almost filled with text.
The text is edited and becomes longer. Now it doesn't fit on one page any more.
You want to know if there's a way to automatically change the formatting so the text will fit on one page again.
Unfortunately you can't do this with XSL-FO alone. As far as I know, there is no way to specify "this block of text has to fit on one page, and if it doesn't fit, make the font size smaller until it fits".
You'd have to do some post-processing, along the line of 'count the pages in the PDF, if the page count is larger than X, change a variable in the FO template to make the text smaller and render again'.

Is there a window setting for keeping a selected passage of text even after the text has been changed/refreshed?

I have a CEdit-Box containing some text, which is being refreshed by a thread every ~0.25 seconds. The problem is that everytime the text is being refreshed, a possible selection of text is being erased.
I found 2 ways to avoid this so far:
My implementation right now (1) :
Use quite a passage of logic in order to assure that the text is actually really changing, and not just refreshing itself with the exact same string. This is kind of avoiding the problem, but it feels very clunky to be honest.
Another idea (2) :
Every cycle, before the text is being refreshed, we need to grab the selection we currently have, store it, and try to reconstruct it after our text has been refreshed. However, I don't know how this would turn out if the new text doesn't contain our old string at all. I guess the functionality is implemented in WTL, but I don't think this is a very good approach.
Is there any other way? Something like a control setting which would do something like this?

What is the best way to fin and use a template in cakephp 3

i'm new in cakephp and I have started with version 3. I want to build a beautifull app and because I'm not good in design, I would really like to use a free template or buy one that I can use within cakephp.
So, I would really appreciate all your propositions and ideas or best practises. The easy way will be the best because I don't have a lot of time with this project. Thank you in advance.
If you don't have a lot of time like you mentioned, the easiest way to go ahead and get started is to paste a lot of the code in your default.ctp layout inside of src/Template/Layout/default.ctp.
You'll notice there are some lines of PHP already in there that are relevant to fetching blocks of css, meta tags, and other bits of code that could potentially exist throughout your project.
Find the main layout of the theme your trying to use - the one that will be consistent across most of the pages. That's the one you'll use for default.ctp. Compare what's already in default.ctp and make the comparable adjustments around the HTML in that document while keeping the important lines of PHP there as well.
For other important pages like a login or registration page, just create a new document for those, like 'login.ctp', then inside the function that loads the page (maybe 'login' inside of UsersController'), change the default layout with this line of code:
$this->viewBuilder()->layout('login'); // without the .ctp ending
This way you can create one-off layouts that don't really match any other page.

XSL TreeView Define whether the xsl div is open/closed

I'v done a tree view in xsl using a javascript function
I want to change the icons depending on the status (+ for to open , - for to close)
This questions is as clear as thick molasses in a pool of mud. (Will try to answer, though.)
I assume you mean XML stylesheets with xsl. If you meant Excel, it should have been xls. But let's assume you mean stylesheets and you're using it to generate a webpage which contains a treeview. In this treeview there are icons indicating if the node is expanded or not. If expanded, display +, else display -. Am I right, here?
Now, it depends on how you've implemented this treeview in your stylesheet. The most practical way would be to just send the tree data fully expanded to the page and let the Javascript handle this client-side. In that case, all you need to know is how to expand and collapse nodes in Javascript with the additional icon change.
Another possible implementation would be when expanding and collapsing is done serverside, thus you'd only send the visible data. In that case you can also just tell the page which icon to use and there would be no need for any javascript. The icon would just be a link back to the server, updating the data through a new requests which builds a new webpage.
A third option would be the WEB 2.0 solution, where you just send the list as a collapsed treeview and every time the user clicks an icon, a AJAX event gets triggered, collecing the additional node data and changing the icon of the treenode.
These are three very different techniques and they're not always the best solution. The first solution is a problem when dealing with lots of data in your tree. It needs to load it all. The second option will generate a lot more traffic with the server but handles better with large amounts of data because you only display the open node. The third option is a bit of a mixture between the first two options. You don't need all data from the beginning and you're not recreating the webpage over and over again. But it's also more complex to code.
Now, I wonder which of these options you use. Once we know this, we can help you. (Edit your question to provide this information and perhaps even add the JavaScript tag to it.)
To be honest, xsl is only used to change the shape of an XML document and it knows nothing about treeviews or whatever. So I don't see any link between xsl and treeviews. It's just that you use xsl to transform your data into something that some Javascript library can process as a treeview. Which Javascript library is this?