document_item

kavulix

Item type: document
Roku component: roParagraphScreen + roImageCanvas


Example

<item type="document"
      title="My document example"
      sdposterurl="http://yoursite.com/document_sd.jpg"
      hdposterurl="http://yoursite.com/document_hd.jpg"
      author="me"
      date="today">
   <body>
This is the first line.
This is the second line.
   </body>
</item>

Supported Attributes

Name: title
Type: string
Supported values
any string of text

Name: sdposterurl
Type: string
Supported values
any url pointing to a jpg, png or gif image

Name: hdposterurl
Type: string
Supported values
any url pointing to a jpg, png or gif image

Name: shortdesc
Type: string
Supported values
any string of text
Notes
The short description value will be displayed beneath the title and under the poster on poster screens. This attribute is only used for documents if BOTH the author and date attributes are omitted.

Name: author
Type: string
Supported values
the author's name
Notes
If you know the name of the author who wrote the document then include the author's name in this attribute. The name will be displayed beneath the poster on poster screens and will be added to the beginning of the body of text on document screens. If either an author OR date attribute is specified then they will be used instead of the shortdesc attribute. If the author AND date attributes are omitted then the shortdesc value will be displayed instead.

Name: date
Type: string
Supported values
any string of text
Notes
If you know the original publication date of the document then include the date in this attribute. The date will be displayed beneath the poster on poster screens and will be added to the beginning of the body of text on document screens. There is no specific format required for the date string. If either an author OR date attribute is specified then they will be used instead of the shortdesc attribute. If the author AND date attributes are omitted then the shortdesc value will be displayed instead.

Name: url
Type: string
Supported values
any url pointing to a text document
Notes
There are two ways to provide the content for document screens. The first option is to embed the text directly into the orml feed using the body element. The second option is to link to a remote text document. When the document item is selected the remote document will be downloaded and formatted according to the attributes below prior to being displayed.

Name: striphtml
Type: boolean
Supported values
true|false
Notes
If enabled all html tags will be removed from the text.

Name: stripews
Type: boolean
Supported values
true|false
Notes
If enabled all extra whitespace will be removed from the text. That includes spaces at the beginning or end of the file, more than one space back to back, or more than 2 new lines back to back.

Name: regexfilter
Type: string
Supported values
true|false
Notes
This attribute accepts any valid regular expression. It should support nearly every regex option that the perl language supports. Do not use parentheses in this expression. It is intended to filter out unwanted content rather than matching a specific sequence of characters. For example, if you have linked to a html document and you know that the content you want to display is located in a div element with an id of "news_article" then you could use the example below to filter out everything before and after the div element. You will need to encode any xml entities (e.g., [&<>"]) and if your regex statement includes quotes I would recommend using \x22 for each quote instead of the &quot; entity.
Example: "^.+?&lt;div id=\x22news_article\x22&gt;|&lt;/div&gt;.+$"


Supported Child Nodes

description

body


MongoDB Logo MongoDB