XmlViewer webpart


Download          For WSS-3                          Russian                  Top                               

Purpose

Web-part XmlView is intended for installation on sites of Microsoft SharePoint Portal Server or Microsoft SharePoint Services.

The web-part is used for viewing xml-files and lists of SharePoint using of xslt-styles.

Installing

Take from archive xmlviewer.zip file XmlViewer.cab and execute a command

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN\STSADM.EXE" -o addwppack -filename XmlViewer.cab

Parameters

Parameters for convenience of filling are divided into groups on sense. 

Group XML

XML Document

The text of the xml-document intended to display.

XML Link

The reference to the document. Can be specified URL of a file on the remote server or a relative path to a file on a local server.

In a field some references divided by a symbol “;” can be specified.

Documents by references are loaded only at absence of the text валидного the document into field XML Document.

Group Xsl

XSL Script

The text of an Xsl-script for transformation of data.

XSL Link

The reference to the document. Can be specified URL of a file on the remote server or a relative path to a file on a local server.

At absence of the text or the reference to an xsl-script the built in simple style of display of xml-documents is used.

No Default XSL

Do not use the built-in style.

Group Rss

XSL Script

The text of an Xsl-script for transformation of data at work in RSS-  mode.

XSL Link

The reference to the document. Can be specified URL of a file on the remote server or a relative path to a file on a local server.

RSS Encoding

The encoding of an output stream. The encoding can be set both a name, and number of code page: utf–8, 1251, windows–1251 etc. By default  UTF-8 is used.

RSS Id

The identifier of a webpart. It is used at work in mode RSS.

I am Alone

This copy is unique web-part of the given type  on page.

Group List

List Link

The reference to one or several lists of SharePoint. References are divided by a symbol «;».

Format of the reference to the list:

[url]/<ListName>[|idx], where url absolute or relative path to a site containing the list with a name ListName,
idx – list of identifiers of records (integers divided by «,», symbol «
|» - part of syntax).

For example: /sites/info/ListName|2,5,13

The list can be on other computer (remote list).

Lists Merge variant

Type of merging of several lists. Value gets out from of some 1, 2.

Bad Symbols
 processing

Variant of processing of names of fields of the lists containing "bad" symbols:

1 – to give out the prevention of impossibility to use such name as a name of tag <field_name>…</ field_name>;

2 –  produce tags like
<
field name=”field_name”>…</field>

By default - 1.

Format of date/time field

Format string (by rules of formatting in .NET) which will be used for data of type DateTime.
 For example, «
yyyy.MM.dd HH:mm»

Group Cache

Do Not Cache

Do not use caching of data.

Path to Cache

Folder for saving of cache. For example, ~/cachedir

Group View

Empty Banner

The text, deduced web-part at absence of data. For example “View <b>XML</b> &amp; <b>SPList</b> [<i>using XSL</i>]”.

The parameter can contain the reference to the document in library SharePoint in a format «!!D:site_url::library_name::file_name», where "!!D:" - attribute of the reference, "::" - fields divider.

For example, «!!D:/configs::Templates::emptyXV.htm».

Group Common

Do Not Trace

Trace off.

 

Algorithms

The XML-documents specified in parameters are loaded into temp objects of type XmlDocument. Lists of SharePoint specified in parameters will be transformed to a format of xml-documents. The turned out objects are united in one XmlDocument to which Xsl-style (specified in parameters or built in) is applied. In an Xsl-script parameters from URL pages on which it is placed a web-part are transferred all.

The final document has following structure (value of parameter Lists Merge variant equally 1):
<Root>

      < Contents of the document_1>

     

      < Contents of the document_n>

      <Rows>

            <Row><data of list item></Row>

            … data of all list items …

      </Rows>

</Root>
<!--[if !supportLineBreakNewLine]--><!--[endif]-->

At value of parameter 2 data of lists are divided:
<Root>

      < Contents of the document_1>

     

      < Contents of the document_n>

      <list>

<Row><data of list items_1></Row>

</list>

     

      <list>

<Row>< data of list items_n></Row>

</list>

</Root>

At absence of xml-documents tag <Root> replaced by <Lists>.

The remote lists

At the instruction in field List Link of the list located on the remote server, extraction of data it is made through a corresponding web-service. For providing of access to service in a file web.config a virtual server on which it is established a web-part, it is possible to add data of the user on behalf of which the reference to a web-service (will be carried out at absence of parameters data of the current user) will be used:

 <add key="GlobalAdminName" value="name" />

<add key="GlobalAdminDomain" value="domain" />

<add key="GlobalAdminPassword" value="password" />


RSS mode

In RSS mode the web-part forms the target text according to parameters of group RSS.

Transition in mode RSS occurs at the instruction in address of page (URL) of parameters XMLVRss=<RSSId>. At the established value of parameter I am Alone mode RSS joins irrespective of value of parameter XMLVRss. In this mode all other elements of page in formation of a conclusion are not considered.

 

Data caching

It is used for acceleration of a conclusion of seldom changing data. The generated output stream is kept in a file, at the reference to a web-part with the same parameters of calculations the kept data are not made, deduced. Parameters of groups XML, XSL and List, and also parameters in URL pages on which there is a web-part are considered all.

 

Trace

At the established parameter trace of the basic stages of formation of the target text is carried out. Results of trace enter the name in the form of comments in a target stream.

 <!-- ##Trace of […]:

start=13.09.2006 22:28:01, end=13.09.2006 22:28:01, duration=0,109 sec. <=> Initializing

start=13.09.2006 22:28:01, end=13.09.2006 22:28:01, duration=0,000 sec. <=> Loading XML

start=13.09.2006 22:28:01, end=13.09.2006 22:28:02, duration=0,719 sec. <=> Loading XSL

start=13.09.2006 22:28:02, end=13.09.2006 22:28:02, duration=0,047 sec. <=> Loading ListData

start=13.09.2006 22:28:01, end=13.09.2006 22:28:02, duration=0,875 sec. <=> From start to end of data loading

start=13.09.2006 22:28:01, end=13.09.2006 22:28:06, duration=5,281 sec. <=> from start to begin of Rendering

start=13.09.2006 22:28:06, end=13.09.2006 22:28:06, duration=0,000 sec. <=> Load HTML from cache

start=13.09.2006 22:28:01, end=13.09.2006 22:28:06, duration=5,281 sec. <=> Total executing time -->