How to get the most frequent attribute in XQuery? - xpath

I have XML data that has many <ref> elements that have a type attribute. I would like to get the most popular type for each of the files, but can't seem to figure it out... Right now I have
for $song in collection('/db/course/rap/data')
let $types := distinct-values($song//ref/#type)
for $type in $types
let $freq := count($song//ref[#type=$type])
order by $freq descending
return concat($song//title/string(), ' ', $type, ' ', $freq)
which gives me the name of the song (title element), and frequency values for each type in that song. However, I am only interested in the most popular item in each one. I've been trying for a long time, but can't come up with anything meaningful...
Example:
<song>
<header>
<title>Восток</title>
<artist>25/17 п.у. Саграда</artist>
<album>Межсезонье</album>
<accessDate>09/16/2013</accessDate>
<source href="http://vk.com/audio?performer=1&q=25%2F17"/>
</header>
<lyrics>
<stanza>
<line n="1"><ref type="home" value="neut">Моя земля</ref>, <ref type="war" value="neut"
>пропитана кровью</ref> до магмы,</line>
<line n="2">Я видел <ref type="war" value="neut">флагман</ref> под небесным Андреевским
флагом.</line>
<line n="3">Женщины плакали, <ref type="war" value="neut">эскадра выходила в море</ref>.
Оно так и не возвратило лейтенанта домой,</line>
<line n="4"><ref type="war" value="neut">Эсминец принял бой, был потоплен</ref>. То ли
мины, то ли в баках рвануло топливо.</line>
<line n="5">А Севастополь ждал назад и верил искренне, шагами меряя пространство
Графской пристани,</line>
<line n="6">И если пристально смотреть в сторону востока, то можно разглядеть и флаги на
флагштоках,</line>
<line n="7">погибших кораблей, ведь <ref type="soul" value="pos">через 9 дней их души
отлетают в небо как и у людей</ref>.</line>
<line n="8">
<ref type="home" value="neg">Но Черноморский флот уже не тот, чужие корабли проходят
мимо Инкерманских высот,</ref>
</line>
<line n="9">за горизонт, в эти закаты алые, пока гробницы стерегут прах
адмиралов.</line>
<line n="10">Я и не знал, что значит надпись не по нашему , на именном оружии ,
расстрелянного маршала,</line>
<line n="11">и почему <ref type="war" value="pos">всё то, что было завоевано</ref> пошло
<swear>проёбом</swear>. Или мы сами предаём это?</line>
<line n="12"><ref type="war" value="neg"><ref type="home" value="neg">Районы</ref>, как
театр военных действий</ref>, тут <ref type="drugs">опиаты</ref> рано обрывают
детство.</line>
<line n="13">Врачи лупили по щекам, мне говорили, дыши, <ref value="pos">ведь все они
погибли, ради того чтобы ты жил</ref>!</line>
</stanza>
<stanza type="chorus">
<line n="14">На свет из тени, из подземелий на воздух.</line>
<line n="15">Пока есть время и силы, пока ещё не поздно.</line>
<line n="16">Ещё не познанный, мой ориентир.</line>
<line n="17">Я вижу грозный, прекрасный, яростный мир.</line>
<line n="18">На свет из тени, из подземелий на воздух.</line>
<line n="19">Пока есть время и силы, пока ещё не поздно.</line>
<line n="20">Ещё не познанный, мой ориентир.</line>
<line n="21">Я вижу грозный, прекрасный, яростный мир.</line>
</stanza>
<stanza>
<line n="22">Учебник по истории, подобный девке площадной, готов отдаться <ref
type="politics" value="neg">каждому, кто завладел казной</ref>.</line>
<line n="23"><ref type="politics" value="neg">В очередной войне за трон</ref>, <ref
type="econ" value="neg">станок печатает тираж</ref> , <ref value="politics"
type="neg">кто защищал свой порт, а кто кричал «На абордаж».</ref></line>
<line n="24">Уже не важно, важно кто за это платит, кто подливает в твой бокал и
покупает платье.</line>
<line n="25">Ломала каблуки, хмельная, в страстном танце, потом за школой, <ref
type="sex">тебя имели иностранцы.</ref></line>
<line n="26">
<ref type="russia">Шептала, «Всех люблю, всем хватит места», а ведь когда то ты
мечтала быть невестой.</ref>
</line>
<line n="27">Семья. Сын учится ходить хватаясь за подол. Сейчас ты на коленях за арбуз.
Тебе не западло?</line>
<line n="28">И кто тебя поднимет, ведь ты сама не хочешь.</line>
<line n="29"><ref type="family">Отец</ref> сгорел от горя, ты в бреду хохочешь.</line>
<line n="30">Переписать учебник. Смыть с тебя всю грязь.</line>
<line n="31">Слезами. Потом с кровью. В очередной раз.</line>
</stanza>
<stanza type="chorus">
<line n="32">На свет из тени, из подземелий на воздух.</line>
<line n="33">Пока есть время и силы, пока ещё не поздно.</line>
<line n="34">Ещё не познанный, мой ориентир.</line>
<line n="35">Я вижу грозный, прекрасный, яростный мир.</line>
<line n="36">На свет из тени, из подземелий на воздух.</line>
<line n="37">Пока есть время и силы, пока ещё не поздно.</line>
<line n="38">Ещё не познанный, мой ориентир.</line>
<line n="39">Я вижу грозный, прекрасный, яростный мир.</line>
</stanza>
<stanza type="chorus">
<line n="40">На свет из тени, из подземелий на воздух.</line>
<line n="41">Пока есть время и силы, пока ещё не поздно.</line>
<line n="42">Ещё не познанный, мой ориентир.</line>
<line n="43">Я вижу грозный, прекрасный, яростный мир.</line>
<line n="44">На свет из тени, из подземелий на воздух.</line>
<line n="45">Пока есть время и силы, пока ещё не поздно.</line>
<line n="46">Ещё не познанный, мой ориентир.</line>
<line n="47">Я вижу грозный, прекрасный, яростный мир.</line>
</stanza>
</lyrics>
If we assume that this song has 20 war references and 5 soul references (didn't actually count), then the desired output would be the song name (title element), and the most popular referent (war).

Limit the number of results for each song to one:
for $song in collection('/db/course/rap/data')
let $types := distinct-values($song//ref/#type)
return (
for $type in $types
let $freq := count($song//ref[#type=$type])
order by $freq descending
return concat($song//title/string(), ' ', $type, ' ', $freq)
)[1]

Seems like something like the bits below (un-tested) would get you the most frequent. There are probably more efficient, better ways.
let $songs := collection('/db/course/rap/data')
return
(
for $type in $songs//ref[#type]
let $freq := count($songs//ref[#type=$type])
order by $freq descending
return ($t, $freq)
)[1]

Related

Issues with playing MPEG-DASH MPD file

I have built a simple mpeg-dash player using exoplayer API in Android. It reads and plays this MPD file. But can't play the following MPD file generated by FFmpeg:
ffmpeg -re -i .\video-h264.mkv -map 0 -map 0 -c:a aac -c:v libx264 -b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline -profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" -f dash out.mpd
What is the issue? I can't understand it.
<?xml version="1.0" encoding="utf-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:mpeg:dash:schema:mpd:2011"
xmlns:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
profiles="urn:mpeg:dash:profile:isoff-live:2011"
type="static"
mediaPresentationDuration="PT16.0S"
maxSegmentDuration="PT5.0S"
minBufferTime="PT10.0S">
<ProgramInformation>
</ProgramInformation>
<ServiceDescription id="0">
</ServiceDescription>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" contentType="video" startWithSAP="1" segmentAlignment="true" bitstreamSwitching="true" frameRate="24/1" maxWidth="1920" maxHeight="960" par="2:1">
<Representation id="0" mimeType="video/mp4" codecs="avc1.4d4028" bandwidth="800000" width="1920" height="960" sar="1:1">
<SegmentTemplate timescale="12288" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
<SegmentTimeline>
<S t="0" d="61440" r="2" />
<S d="13312" />
</SegmentTimeline>
</SegmentTemplate>
</Representation>
<Representation id="2" mimeType="video/mp4" codecs="avc1.42c00d" bandwidth="300000" width="320" height="170" sar="17:16">
<SegmentTemplate timescale="12288" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
<SegmentTimeline>
<S t="0" d="61440" r="2" />
<S d="13312" />
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" startWithSAP="1" segmentAlignment="true" bitstreamSwitching="true" lang="eng">
<Representation id="1" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audioSamplingRate="48000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
<SegmentTemplate timescale="48000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
<SegmentTimeline>
<S t="0" d="238584" />
<S d="239616" />
<S d="240640" />
<S d="50176" />
</SegmentTimeline>
</SegmentTemplate>
</Representation>
<Representation id="3" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="128000" audioSamplingRate="22050">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
<SegmentTemplate timescale="22050" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
<SegmentTimeline>
<S t="0" d="109564" />
<S d="110592" r="1" />
<S d="22519" />
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
</Period>
</MPD>
My simple ExoPlayer API code is HERE. And my MPD is located on a local server. The error I get is this:
2022-01-20 11:49:13.751 11201-11929/com.example.myexoplayer E/ExoPlayerImplInternal: Source error.
com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: Unable to connect to http://192.168.80.80/dash/out.mpd
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:194)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:102)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:65)
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:114)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by: java.io.IOException: Cleartext HTTP traffic to 192.168.80.80 not permitted
at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:127)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:462)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:429)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:350)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:192)
at com.google.android.exoplayer2.upstream.DataSourceInputStream.checkOpened(DataSourceInputStream.java:102) 
at com.google.android.exoplayer2.upstream.DataSourceInputStream.open(DataSourceInputStream.java:65) 
at com.google.android.exoplayer2.upstream.ParsingLoadable.load(ParsingLoadable.java:114) 
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
at java.lang.Thread.run(Thread.java:923) 

How to automatically scroll down to the last row of table in sapUI5?

I need to implement load more in my table with dynamic values. This is my screen.
Initially, I have displayed the values from api call. On that time my table should be scroll down automatically to the last row of the table. Then I clicked the load more button again the api calls and added the new values in the model and added into the table too. But its not scrolling down to the table. Here is the controller code I have tried for scroll down.
var oTableModel = new sap.ui.model.json.JSONModel();
oTableModel .setSizeLimit(TABLE_ARRAY.length);
oTableModel .setData({
oset: TABLE_ARRAY
});
that.getView().byId("oSmartTable").setModel(oTableModel);
//that.getView().byId("otable").getBinding("items").refresh();
var oTable = that.getView().byId("logtable");
var oLength = TABLE_ARRAY.length - 1;
//New Item that is added
var oItem = oTable.getItems()[oLength];
var oScroll = that.getView().byId("oscroll");
//Add Delay since the new item needs to be added to the HTML Doc
jQuery.sap.delayedCall(100, that, function () {
//Scroll to the newly added item
oScroll.scrollToElement(oItem);
});
And this is view.xml code for smart table
<ScrollContainer id="oscroll" height="100%" width="99%" horizontal="false" vertical="true">
<VBox class="chartBackground" alignItems="Stretch" width="100%" id="logTableVB">
<items>
<smartTable:SmartTable id="oSmartTable" entitySet="oset" smartFilterId="smartFilterBar" tableType="ResponsiveTable"
app:p13nDialogSettings="{sort:{items:[{ columnKey: 'Type', operation: 'Ascending' }]}}" useExportToExcel="false"
beforeExport="onBeforeExport" useVariantManagement="true" useTablePersonalisation="true" showTablePersonalisation="true"
header="Total Logs " showRowCount="true" showFullScreenButton="true" enableAutoBinding="true">
<Table id="logtable" sticky="ColumnHeaders" class="headercolor" growingScrollToLoad="true" growing="true" growingThreshold="50">
<!--firstVisibleRowChanged="scroll"-->
<columns getResizable="true">
<Column minScreenWidth="Tablet" demandPopin="true" width="10%">
<customData>
<core:CustomData key="p13nData"
value='\{"sortProperty": "c1_data", "filterProperty": "c1_data","columnKey": "Column 1", "leadingProperty" : "c1_data"}'/>
</customData>
<Text class="headercolor" text="Column 1"/>
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" width="15%">
<customData>
<core:CustomData key="p13nData"
value='\{"sortProperty": "c2_data", "filterProperty": "c2_data","columnKey": "Column 2", "leadingProperty" : "c2_data"}'/>
</customData>
<Text class="headercolor" text="Column 2"/>
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" width="15%">
<customData>
<core:CustomData key="p13nData"
value='\{"sortProperty": "c3_data", "filterProperty": "c3_data","columnKey": "Column 3", "leadingProperty" : "c3_data"}'/>
</customData>
<Text class="headercolor" text="Column 3"/>
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" width="15%">
<customData>
<core:CustomData key="p13nData"
value='\{"sortProperty": "c4_data", "filterProperty": "c4_data","columnKey": "Column 4", "leadingProperty" : "c4_data"}'/>
</customData>
<Text class="headercolor" text="Column 4"/>
</Column>
<Column minScreenWidth="Tablet" demandPopin="true" width="15%">
<customData>
<core:CustomData key="p13nData"
value='\{"sortProperty": "c5_data", "filterProperty": "c5_data","columnKey": "Column 5", "leadingProperty" : "c5_data"}'/>
</customData>
<Text class="headercolor" text="Column 5"/>
</Column>
<Column minScreenWidth="Tablet" demandPopin="true">
<customData>
<core:CustomData key="p13nData"
value='\{"sortProperty": "c6_data", "filterProperty": "c6_data","columnKey": "Column 6", "leadingProperty" : "c6_data"}'/>
</customData>
<Text class="headercolor" text="Column6"/>
</Column>
</columns>
<items>
<ColumnListItem type="Active" press="onLogTableClick_">
<cells>
<Text class="tabletext" text="{c1_data}"/>
<Text class="tabletext" text="{c2_data}"/>
<Text class="tabletext" text="{c3_data}"/>
<Text class="tabletext" text="{c4_data}"/>
<Text class="tabletext" text="{c5_data}"/>
<Text class="tabletext" text="{c6_data}"/>
</cells>
</ColumnListItem>
</items>
</Table>
<HBox>
<items>
<HBox class="contactMarigin" width="100%" justifyContent="Start" alignItems="Center">
<items></items>
</HBox>
<HBox class="contactMarigin" width="100%" justifyContent="Center" alignItems="Center">
<items></items>
</HBox>
<HBox class="contactMarigin" width="100%" justifyContent="End" alignItems="Center">
<items>
<Button id="oload_more" text="Load More" class="pdfMarigin" />
</items>
</HBox>
</items>
</HBox>
</smartTable:SmartTable>
</items>
</VBox>
</ScrollContainer>
I have put my smart table inside scroll container. when I click load more button the should be scroll down automatically to the last row. How can I achieve this? Thanks in advance.
setTimeout(function () {
oScroll.scrollToElement(oTable.getItems()[oLength], 800);
}, 0);

How do I set maximum bandwidth in Chromecast CAF Receiver

I can set cast.framework.PlaybackConfig.initialBandwidth. I am wondering is there a setting for max bandwidth throughout the playback.
Below is the manifest that I am receiving, Chromecast player is auto switching according to my current network speed. I want to set a max bandwidth to 2987000 so it can never go to 1080p.
<Representation bandwidth="79000" codecs="avc1.42000c" frameRate="2997/100" height="144" id="7c96d52b-6a35-406f-bcb8-d1fbdca1892c" width="256"></Representation>
<Representation bandwidth="199000" codecs="avc1.42000c" frameRate="2997/100" height="160" id="6c20b31e-4503-4c58-ac87-e431ca0814b1" width="284"></Representation>
<Representation bandwidth="349000" codecs="avc1.420015" frameRate="2997/100" height="240" id="5f38f276-918e-4b53-9e59-49828e8370e1" width="426"></Representation>
<Representation bandwidth="597000" codecs="avc1.4d001e" frameRate="2997/100" height="360" id="f98c3885-6a69-40c1-b41d-cf497fe144db" width="640"></Representation>
<Representation bandwidth="848000" codecs="avc1.4d001f" frameRate="2997/100" height="540" id="9efd598f-ab6a-48df-850a-f74e5787c35d" width="960"></Representation>
<Representation bandwidth="1094000" codecs="avc1.4d001f" frameRate="2997/100" height="576" id="4a4c0dae-1e42-45cc-a0ec-c35ebc9a1d1b" width="1024"></Representation>
<Representation bandwidth="1495000" codecs="avc1.4d001f" frameRate="2997/100" height="576" id="a023a254-0885-4ddf-895b-839f5cb384ce" width="1024"></Representation>
<Representation bandwidth="1995000" codecs="avc1.64001f" frameRate="2997/100" height="720" id="1007e5e6-8400-4d92-bcd8-8cfdaf4dde1d" width="1280"></Representation>
<Representation bandwidth="2987000" codecs="avc1.64001f" frameRate="2997/100" height="720" id="e0879e7b-19e3-4c65-8063-300411fc40bf" width="1280"></Representation>
<Representation bandwidth="4482000" codecs="avc1.640028" frameRate="2997/100" height="1080" id="5576c06c-3a6a-4167-ba7a-803b424af204" width="1920"></Representation>

Dynamic view panel column header formatting in xpages

I'm using dynamic view panel in an xpages application, and I'm using a customizer bean provided by Jesse Gallagher (https://openntf.org/XSnippets.nsf/snippet.xsp?id=dynamicviewcustomizer) to format the panel. In the code there is the treatment to render the column header according to the properties defined in the Notes view, however the properties are not being passed, since the columns in the notes view are bold and this is not being reflected in the dynamic view panel. Can someone help me to verify what is wrong?
Follow the DXL view and xpages code
<!DOCTYPE database SYSTEM "C:\Notes9\xmlschemas/domino_9_0_1.dtd">
-<database title="Gestão de despesas de água e energia de agências" allowbackgroundagents="false" path="CN=Snmb24/O=Mercantil do Brasil!!GestaoAguaEnergia.nsf" replicaid="8325802D005D8C64" maintenanceversion="1.4" version="9.0" xmlns="http://www.lotus.com/dxl">
-<databaseinfo numberofdocuments="189" percentused="87.4150815217391" diskspace="6029312" odsversion="43" dbid="8325802D005D8C64">
-<datamodified>
<datetime dst="true">20170112T164849,51-02</datetime>
</datamodified>
-<designmodified>
<datetime dst="true">20170112T165138,37-02</datetime>
</designmodified>
</databaseinfo>
-<fulltextsettings breakat="wordssentencesparagraphs" includeencryptedfields="false" includeattachments="true" update="immediate" size="1922029">
-<lastindexed>
<datetime>20170112T191311,61+00</datetime>
</lastindexed>
</fulltextsettings>
-<launchsettings>
<noteslaunch whenopened="openaboutdocument"/>
<weblaunch whenopened="openxpage" xpage="GastosPorAgência.xsp"/>
</launchsettings>
-<view noemptycategories="true" initialbuildrestricted="false" uniquekeys="false" marginbgcolor="white" marginwidth="0px" hidemarginborder="false" allowcustomizations="true" allownewdocuments="false" evaluateactions="false" boldunreadrows="false" headerbgcolor="white" totalscolor="black" bgcolor="white" haslinkcolumn="true" rowspacing="1" headerlinecount="1" rowlinecount="1" unreadcolor="black" showhierarchies="false" extendlastcolumn="false" shrinkrows="false" showmargin="true" showresponsehierarchy="true" opencollapsed="false" headers="beveled" onrefresh="displayindicator" onopengoto="lastopened" unreadmarks="none" designerversion="8.5.3" publicaccess="false" noreplace="true" showinmenu="false" alias="VGastosAgencia" name="(Gastos por agência)">
-<noteinfo sequence="39" unid="219D8F4FA6912B1D8325802D0069918A" noteid="19e">
-<created>
<datetime>20160913T161305,38-03</datetime>
</created>
-<modified>
<datetime dst="true">20170112T145220,92-02</datetime>
</modified>
-<revised>
<datetime dst="true">20170112T145220,91-02</datetime>
</revised>
-<lastaccessed>
<datetime dst="true">20170112T145220,92-02</datetime>
</lastaccessed>
-<addedtofile>
<datetime>20160913T161305,38-03</datetime>
</addedtofile>
</noteinfo>
-<updatedby>
<name>CN=Marcus Loza/O=Mercantil do Brasil</name>
</updatedby>
-<wassignedby>
<name>CN=Marcus Loza/O=Mercantil do Brasil</name>
</wassignedby>
-<code event="selection">
<formula>listaStatus:="Enviado para agência":"Enviado para gestor":"Devolvido para agência":"Enviado para contabilidade":"Ciente":"Novo"; SELECT form="GastoEnergiaAgua"& #IsMember(status;listaStatus)</formula>
</code>
-<column twisties="true" categorized="true" showaslinks="false" sortnocase="true" sortnoaccent="true" separatemultiplevalues="true" resizable="true" width="28.7500" itemname="agencia" hidedetailrows="false" sort="ascending">
-<columnheader>
<font size="9pt" style="bold"/>
</columnheader>
</column>
-<column showaslinks="true" sortnocase="true" sortnoaccent="false" separatemultiplevalues="false" resizable="true" width="23.3750" itemname="status" hidedetailrows="false" sort="ascending">
<font color="navy"/>
-<columnheader title="Status">
<font size="9pt" style="bold"/>
</columnheader>
</column>
-<column showaslinks="false" sortnocase="true" sortnoaccent="false" separatemultiplevalues="false" resizable="true" width="10" itemname="$6" hidedetailrows="false" showasicons="true">
-<columnheader>
<font size="9pt" style="bold"/>
</columnheader>
-<code event="value">
<formula>listaStatus:="Enviado para agência":"Enviado para gestor":"Devolvido para agência":"Enviado para contabilidade":"Novo"; dif:=dt_debito-#Today; #If(dif<0;"icons/cancel_or_decline/status_red.gif";"")</formula>
</code>
</column>
-<column showaslinks="false" sortnocase="true" sortnoaccent="false" separatemultiplevalues="false" resizable="true" width="10" itemname="dt_debito" hidedetailrows="false">
-<columnheader title="Data débito">
<font size="9pt" style="bold"/>
</columnheader>
<datetimeformat preference="custom" timeformat24="true" timeseparator=":" dateseparator3="/" dateseparator2="/" dateseparator1=" " weekdayformat="shortname" yearformat="fourdigityear" monthformat="twodigitmonth" dayformat="twodigitday" dateformat="weekdaydaymonthyear" zone="never" time="hourminutesecond" fourdigityearfor21stcentury="true" date="yearmonthday" show="date"/>
<numberformat bytes="false" percent="false" parens="false" punctuated="false" format="general"/>
</column>
-<column showaslinks="false" sortnocase="true" sortnoaccent="false" separatemultiplevalues="false" resizable="true" width="10" itemname="tipo_gasto" hidedetailrows="false">
-<columnheader title="Gasto">
<font size="9pt" style="bold"/>
</columnheader>
</column>
-<column showaslinks="false" sortnocase="true" sortnoaccent="false" separatemultiplevalues="false" resizable="true" width="10" itemname="valor" hidedetailrows="false">
-<columnheader title="Valor">
<font size="9pt" style="bold"/>
</columnheader>
<numberformat preference="custom" bytes="false" percent="false" parens="false" punctuated="true" format="fixed" usecustomsym="false" currencysym="R$" currencysymtype="custom" thousandssep="." decimalsym="," digits="2"/>
</column>
-<column showaslinks="false" sortnocase="true" sortnoaccent="false" separatemultiplevalues="false" resizable="true" width="10" itemname="consumo" hidedetailrows="false">
-<columnheader title="Consumo">
<font size="9pt" style="bold"/>
</columnheader>
</column>
-<item name="$FormulaTV">
<text/>
</item>
</view>
Xpages code:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xc="http://www.ibm.com/xsp/custom"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:this.afterPageLoad><![CDATA[#{javascript:sessionScope.viewPage = view.getPageName();}]]></xp:this.afterPageLoad>
<xp:this.resources>
<xp:styleSheet href="/layout.css"></xp:styleSheet>
</xp:this.resources>
<xp:this.beforePageLoad><![CDATA[#{javascript:viewStateBean.restoreState = true;
var roles = context.getUser().getRoles();
sessionScope.userRoles = roles;
var st_novo=["Rascunho","Novo"];
var st_Contratos=["Enviado para gestor"];
var st_Contabilidade=["Enviado para contabilidade"];
var st_agencia=["Devolvido para agência","Enviado para agência"];
applicationScope.Contratos=st_Contratos;
applicationScope.Contabilidade=st_Contabilidade;
applicationScope.Agencia=st_agencia;
applicationScope.Novo=st_novo
}]]></xp:this.beforePageLoad>
<xc:cc_layout navigationPath="/Gastos/PorAgência">
<xp:this.facets>
<xp:panel
xp:key="facetMiddle"
id="panelMainContent">
<xe:dynamicViewPanel
id="dynamicViewPanel1"
showColumnHeader="true"
width="100%"
rows="25"
var="viewEntry"
customizerBean="mcl.reports.DynamicViewCustomizer">
<xp:this.facets>
<xe:pagerSizes
id="pagerSizes1"
xp:key="footerPager"
for="dynamicViewPanel1">
</xe:pagerSizes>
<xp:pager
layout="Previous Group Next"
partialRefresh="true"
id="pager1"
xp:key="headerPager"
for="dynamicViewPanel1">
</xp:pager>
<xe:pagerExpand
id="pagerExpand1"
xp:key="viewTitle"
for="dynamicViewPanel1">
</xe:pagerExpand>
</xp:this.facets>
<xe:this.data>
<xp:dominoView
var="view1"
viewName="VGastosAgencia">
</xp:dominoView>
</xe:this.data>
</xe:dynamicViewPanel>
<xe:pagerSaveState
id="pagerSaveState1"
for="dynamicViewPanel1"
partialRefresh="true">
</xe:pagerSaveState></xp:panel>
<xc:cc_nav_principal xp:key="facetLeft"></xc:cc_nav_principal>
</xp:this.facets>
</xc:cc_layout>
</xp:view>
Grateful!
Marcus
What I did was override the oneui css for the dynamic view panel column headers with the tag below.
.xspPanelViewColumnHeader
{
Font-weight: bold
}

FHIR contained practionner in generalPractitioner

In the (last) FHIR specification (v1.8.0), it's mentioned that a contained resource can be embedded in a Reference (documentation), when no reference exists.
But, by looking at the XSD, I can't figure out how to validate the XML against the patient.xsd with such a mechanism.
Here is my attempt
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir">
<identifier>
<system value="urn:oid:1.2.250.1.311.1.1"/>
<value value="2000100439"/>
<assigner>
<display value="ap-hm"/>
</assigner>
</identifier>
<name>
<use value="official"/>
<family value="COPTER"/>
<given value="ELI"/>
</name>
<gender value="male"/>
<birthDate value="1954-08-14"/>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<line value="45 boulevard des cigales"/>
<city value="MARSEILLE 10"/>
<postalCode value="13010"/>
</address>
<maritalStatus>
<coding>
<system value="http://hl7.org/fhir/v3/MaritalStatus"/>
<code value="U"/>
</coding>
</maritalStatus>
<generalPractitioner>
<contained>
<Practitioner>
<id value="p1"/>
<name>
<family value="PASTEUR"/>
<given value="LOUIS"/>
</name>
<address>
<city>MARSEILLE</city>
<postalCode>13005</postalCode>
</address>
<gender value="male"/>
</Practitioner>
</contained>
</generalPractitioner>
</Patient>
What is the correct way to have a contained reference ?
All contained resources are sent near the top using the "contained" element. They are then referenced as a local reference. So your example would look as follows:
<?xml version="1.0" encoding="UTF-8"?>
<Patient xmlns="http://hl7.org/fhir">
<contained>
<Practitioner>
<id value="p1"/>
<name>
<family value="PASTEUR"/>
<given value="LOUIS"/>
</name>
<address>
<city>MARSEILLE</city>
<postalCode>13005</postalCode>
</address>
<gender value="male"/>
</Practitioner>
</contained>
<identifier>
<system value="urn:oid:1.2.250.1.311.1.1"/>
<value value="2000100439"/>
<assigner>
<display value="ap-hm"/>
</assigner>
</identifier>
<name>
<use value="official"/>
<family value="COPTER"/>
<given value="ELI"/>
</name>
<gender value="male"/>
<birthDate value="1954-08-14"/>
<deceasedBoolean value="false"/>
<address>
<use value="home"/>
<line value="45 boulevard des cigales"/>
<city value="MARSEILLE 10"/>
<postalCode value="13010"/>
</address>
<maritalStatus>
<coding>
<system value="http://hl7.org/fhir/v3/MaritalStatus"/>
<code value="U"/>
</coding>
</maritalStatus>
<generalPractitioner>
<reference value="#p1"/>
</generalPractitioner>
</Patient>

Resources