Determining Last page position in xsl-fo - xslt-1.0

Can we somehow determine the position of the last-page in XSL-FO?
If I want to place my footer only on the last page, then how it could be done? As Input data varies and is not static. So any number of pages can come depending on the data.

Hope, it's not too late. But anyway, for all interested people:
Create a page master
<fo:simple-page-master master-name="my-last-page">...</fo:simple-page-master>
and put your footer as a "region-after" into that master.
Add this to your repeatable-page-master-alternatives
<fo:conditional-page-master-reference page-position="last" master-reference="my-last-page"/>

This is how you could define the last page. I don`t know your structure but you can add this in a block and reference with your footer.
<fo:block id="LASTPAGE"></fo:block>

Related

How should I find element in Selenium WebDriver in Java if there are blank spaces in name and id?

I have problem with one of the selects on page that I want to locate.
SELECT name="" id="" onblur=""
OPTION selected></OPTION
OPTION value=324686977>324686977</OPTION
OPTION value=324689385>324689385</OPTION
/SELECT
The parent name is "ATTR_SECVOIPNETA" and it generates few more Selects with blank spaces too.
I tried few options before asking, however I have no more ideas.
I attached a screen to be more specific how problem looks like.
Screen1
As per screenshot, this is a part of table and if you can locate label "Numer wirtualny" (in this case), you can also locate the corresponding "select" field(drop down).
Here is a sample xpath for your use-
//*[#id='ATTR_SECVOIPNETA']//descendant::*[contains(text(),'Numer wirtualny')]//following-sibling::select
or
//*[#id='ATTR_SECVOIPNETA']//child::*[contains(text(),'Numer wirtualny')]//following-sibling::select
Note:
Make sure you talk to your developer to add some ids. :)
Descendant is similar to grand grand child. In this case you can use "child".

Adding LineBreak in List-item XSLT

Can someone tell me how I can add a break between the item-label and the body.
So first I want the firstname on a line. then a line with nothing and then the name John on a new line:
this is the code I have tried a lot but nothing works:
I am unsing Apache FOP to turn mij XSL into PDF
<fo:list-item>
<fo:list-item-label><fo:block>FirstName:</fo:block></fo:list-item-label>
<fo:list-item-body><fo:block>John</fo:block></fo:list-item-body>
</fo:list-item>
Thanks!
As far as I know, list-item is designed for placing elements side-by-side, not above each other.
Anyway, you don't need the list-item at all. Just create 2 blocks with the information you need, and they'll be placed one above the other automatically.
Specify space-after on the first block to get the empty line:
<fo:block space-after="12pt">

In aspdotnetstorefront, how can I add a different banner to each category without making different skins?

My goal is to add different banners to the bottom of each category, right below the list of products.
This could be accomplished in the following ways, but I'm not sure how to do it in aspdotnetstorefront:
Add custom CSS per category
Add custom HTML per category
I'm trying to avoid adding content using Javascript, but will do as a last resort. That would be easy, but could cause maintenance issues.
I think your best bet is to add the summary to the XMLPackage you are using for your category pages. Adding the following line will allow you to add the banners to the Summary field (editable via admin):
<xsl:value-of select="aspdnsf:GetMLValue($CurrentEntityNode/Summary)" />
This snippet assumes that the parameter CurrrentEntityNode has been declared:
<xsl:param name="CurrentEntityNode" select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]//Entity[EntityID = $CurrentEntityID]" />

Reporting Services Error?

When running a report in preview I get the following error The definition of the report is invalid , the tablix 'Tablix11' contains an invalid TablixMember. The sort Expressions element is not allowed if Group is omitted.
I have never come across this error before and cant understand what is causing it.
The error can be replicated by creating a simple Tablix and looking at the underlying XML.
When you create a Tablix with a group, the underlying RDL XML will include something like this:
<TablixRowHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember>
<Group Name="Group1">
<GroupExpressions>
<GroupExpression>=Fields!val.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!val.Value</Value>
</SortExpression>
</SortExpressions>
<TablixMembers>
<TablixMember>
<Group Name="Details3" />
</TablixMember>
</TablixMembers>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
If you remove the entire Group element, this will give the same error you're seeing:
If you also remove the SortExpressions element this will allow the report to render without error.
However - it's impossible for me to say how your RDL file got in this state in the first place. Given that hacking XML to get things running is seldom a good idea, my recommendation would be to start the tablix from scratch instead of hacking things to a working state - you might just be introducing more problems.
But at least hopefully now you can see why the error might be occurring.
I found that the Tablix header had a textbox property containing interactive sort. This text box is in the header, and not part of the detail. When I deleted the field from the detail of the tablix, the interactive sort remained on the textbox in the header.
Changing it on the header by right clicking on the header textbox of the tablix, then selecting textbox properties, then selecting "interactive sorting", and then correcting the "sort by" value to the correct field name did the trick.

XAML for floating window in AvalonDock

Can someone provide me with an AvalonDock XAML code piece that when run opens the app with a floating window instead of being always docked inside the dock pane? I've seen programmatic ways to do it, but I thought there must be a way to specify it in XAML. Thanks...
I know this is a bit late, but hopefully it will help someone with the same issue in the future...
To create a floating document, add a LayoutDocumentFloatingWindow as a child of LayoutDocumentFloatingWindow, and then add your LayoutDocument as a child of the LayoutDocumentFloatingWindow, as below:
<xcad:DockingManager>
<xcad:LayoutRoot>
<xcad:LayoutRoot.FloatingWindows>
<xcad:LayoutDocumentFloatingWindow>
<xcad:LayoutDocument Title="My Document">
<!--Add document content here-->
</xcad:LayoutDocument>
</xcad:LayoutDocumentFloatingWindow>
</xcad:LayoutRoot.FloatingWindows>
</xcad:LayoutRoot>
</xcad:DockingManager>
Similarly you can add anchorables like so:
<xcad:DockingManager>
<xcad:LayoutRoot>
<xcad:LayoutRoot.FloatingWindows>
<xcad:LayoutAnchorableFloatingWindow>
<xcad:LayoutAnchorablePaneGroup>
<xcad:LayoutAnchorablePane>
<xcad:LayoutAnchorable Title="My anchorable">
<!--Add anchorable content here-->
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
</xcad:LayoutAnchorablePaneGroup>
</xcad:LayoutAnchorableFloatingWindow>
</xcad:LayoutRoot.FloatingWindows>
</xcad:LayoutRoot>
Note that unlike LayoutDocuments, for anchorables you need to add a group pane rather than just a single LayoutAnchorable, because floating anchorables are designed to be able to be grouped in a single window but LayoutDocuments are not.
As a more general guide, an example of how to set up varioius layout elements in a DockingManager can be found here: https://xceed.com/wp-content/documentation/xceed-toolkit-plus-for-wpf/AvalonDock.html