BI Publisher not compiling <xsl:attribute>? - xslt

I'm using MS Word to create rtf templates for Oracle BI Publisher.
My goal is to conditionally assign a color to the title in the header section.
My xsl code looks like this:
<?if:DRUCKTITEL ="NICHT FREIGEGEBEN"?><xsl:attribute name="color">red</xsl:attribute><?end if?><?DRUCKTITEL?>
I expect the words "NICHT FREIGEGEBEN" to appear in red, however what I get is this:

It seems BI Publisher has a problem with changing font color even when the code gets interpreted as code.
I settled on a work around of putting text formatted in red in Word inside the if clause instead of the xsl-code.
This works and while it looks weird in the layout it leads to the wanted result.

Try:
<?attribute#incontext:color;'red'?>
Or, you can use this inside of a field's "Help Text" or BI Publisher code section.
<xsl:attribute xdofo:ctx="block" name="color">red</xsl:attribute>
I highly recommend installing the desktop tool if you have not already done so.

Related

How to avoid HTML codes with Regular Expression

I'm using google sheet and google webapp crud. for this i'm adding the HTML code into google sheets's cells to give better look into search results output.
The problem I'm facing is, when we do a search. e.g. I cannot filter the Mercedes Benz C Class because I have HTML code class= which is showing all results that contains C class. or Audi A4 etc...
To avoid extra spacing, I'm using this regular expression
var searchWords = searchinput.split(/\s+/);
E.g.I have the Google Sheet cell like this.
"<h6>MERCEDES BENZ C200 PREMIUM 2019</h6></b><p style='font-size:12px;color:#808080'>23003 KM</p> <div><a href='https://autodirect.lk/listings/mercedes-benz-c200-premium/'title='Website' target='_blank'><img src='https://img.icons8.com/plumpy/20/000000/technology-items.png'/></a>
<a href='https://docs.google.com/document/d/1l7sIdRPy2_t5_WavkyxoMpyaOMYi5mCBQCK0eQRk/preview'title='Quotation' target='_blank'><img src='https://img.icons8.com/plumpy/20/000000/paper--v1.png'/></a> <a href='https://drive.google.com/drive/folders/1mdASYRRd_bhngPVa0ZHFgDIFRPBOkr1Z'title='Images' target='_blank'><img src='https://img.icons8.com/plumpy/20/000000/camera.png'/></a></div>"
in the above code, I only want to have the below to be detected and avoid all other objects expect below words
The vehicle name and Year MERCEDES BENZ C200 PREMIUM 2019
Image
Quotation
Website
Is it possible to remove the HTML codes with regular expression?
Your best bet is actually to use a library to do so. You can add a bundled library in a .gs file on Apps Script.
If for some reason you really want to do it yourself, you really need to know the possible outputs. Will it always 100% be the exact same format? If not, regex won't work.

papaja: Changing font sizes and faces for code listings and R output

Based on the answer to this question, I was able to get 2-column papaja with listings wrapping (rather than overflowing column width). But the listings package turns off various features that help code listings and R output stand out relative to the main text.
A simple solution would be if I could globally change the font faces and/or sizes selectively for code and R output. Is there a way to do that in papaja? I haven't been able to figure this out from papaja or Rmarkdown documentation. Thank you!
When you use the listings package in a papaja (or bookdown) document, what is technically happening is that all code is wrapped into an lstlisting LaTeX environment that comes with its own capabilities of customizing code appearance. Hence, you don't see the syntax highlighting that you would otherwise see if you would not use the listings package. The documentation of the listings package with instructions how to style your code can be found here.
To make use of this, you can extend the YAML header of your papaja document like this:
documentclass : "apa6"
classoption : "jou"
output :
papaja::apa6_pdf:
pandoc_args: --listings
header-includes:
- \lstset{breaklines=true,language=R,basicstyle=\tiny\ttfamily,frame=trB,commentstyle=\color{darkgray}\textit}
Here, I first specify the code's language, and use a tiny monospace font. With frame, I add a frame around the code block, and with commentstyle I set comments in italic and gray.

Power BI Desktop - How to change data source?

When I'm trying to change my existing data source (Microsoft Azure CosmosDB) to Blob Storage, the Change source is disabled. How do I workaround this?
I have gone through various questions but none of them were similar to mine.
Any help is much appreciated.
Thanks
Workaround
Click on edit queries
Select the query
Advanced Editor
You can change the datasource from here.
Then do apply , export if necessary
Like #rinjan stated above go to the advanced editor on your table in the query editor. Then you will get something like this (This is an Excel connection):
let
Source = Folder.Files("J:\TestPath"),
#"J:\TestPath\Map1 xlsx" = Source{[#"Folder Path"="J:\TestPath\",Name="Map1.xlsx"]}[Content],
#"Imported Excel" = Excel.Workbook(#"J:\TestPath\Map1 xlsx"),
Map1_Sheet = #"Imported Excel"{[Item="Map1",Kind="Sheet"]}[Data],
....and so on
Best way to go here is to copy paste the whole text into the text editor and chose the option replace all with the following line (for this example):
Old value: J:\TestPath
New value: J:\New\Path
If it is not working you have to inspect the lines of codes. Maybe you find the missing piece.
The first line of every table must be Source:
https://community.powerbi.com/t5/Community-Blog/Why-can-t-I-change-the-Data-Source-in-Power-BI-disabled-button/ba-p/915365

How do I display a field name containing the substring OMIT in ApEx?

One of the fields in my database table is named DATEOFDISCHARGEFROMITU. In any report output, this displays as DATEOFDISCHARGEFRU. I've figured out that the missing characters form the word 'OMIT', which makes me think it's related to this old problem in a previous version of ApEx (I'm using version 4.1.)
Is there a way to display the whole field name in the report header when the field name contains the string 'OMIT'?
Note: Using html character codes will allow the field name to display properly, but then when the report is exported to CSV the character codes are of course shown instead of the full field name. I need a solution that works for exports as well as displaying onscreen.
Platforms (tested): Oracle Application Express (APEX), Version 4.0.2
Note: I am not sure how the linked OTN post is relevant to your problem aside from the coincidence that their file export contains the word "OMIT" and your column title contains the word "OMIT".
It's safe to say that "OMIT" isn't an APEX or ORACLE reserved word that is sabotaging your output. However, if you were talking about a scrap of SQL that attempted to create a table named "SELECT" or "WHERE"
i.e., SELECT * FROM "SELECT" WHERE...
you'll be blocked by the RDBMS from proceeding. :)
I tried an export with a query that contained a column header labeled "OMIT" (see the far right in the example.) The .csv file interpreted by Microsoft Excel looked like this:
I wrote up a separate Q&A post about creating dynamic APEX report headers to answer your follow-on question about a suitable solution for providing a clean, htmlcode-free output when a report is eventually exported to a text, comma separated (or other delimited) output.
In summary, the linked post suggests to set up a dynamic PL/SQL Function within a page item. The page item can be referenced directly in the report column header definition. This is a screenshot demonstrating a possible solution:
The link to the general explanation has more details on the APEX design tasks that gets to this final product.
Onward.
I solved this by using this solution for exporting to csv without an enclosing quote character - as that was another challenge I was faced with for the particular application I was developing. By manually creating the export file I was also able to define the column headings exactly, and the "OMIT" issue did not occur.
Technically that's not a solution for displaying a report with the required headings that can also be exported (Richard's response does that) but it does what I need it to and solves the immediate problem of the DATEOFDISCHARGEFROMITU column heading.

OpenOffice/LibreOffice calc hyperlink

I'm using OpenOffice calc (or rather the Libreoffice verion in Ubuntu 11.04). I used the hyperlink function to add links to a column using the function: =hyperlink("http://www.ncbi.nlm.nih.gov/pubmed?term="&D2,D2)
All appears okay on the spreadsheet, but when I save as html, the links column is saved as plain text and not as hyperlinks to where I want them to go to!
Am I doing something wrong?
Thanks!
You could report a bug, but it looks like the underlying problem is that the spreadsheet formulas are removed when saving to html, something as simple as A1*3 is not converted to javascript, and the hyperlink() function isn't converted either. If you insert a link with Insert -> Hyperlink it should work fine.