Uploading, Transforming and Externalizing Content using
OTN CMSXDB application
This file is a walkthrough explaining how Content Managers
can Upload, Transform and Externalize content using OTN CMS application. The
sample data provided along with this application can be used to understand how
to upload, transform XML content to HTML or PDF and externalize them to a site
pre-defined in the application.
Uploading and Transforming
Go to <SAMPLE_HOME>/docs/sampledata/xsl,
Edit newstohtml.xsl and modify the 'dburl' parameter
to the database hostname and port.
Open your favorite browser and point it to http://<machinename>:<port>/cmsxdb/Main.jsp
Click on the Sign Up button and create new user with username as 'technews'
and password as 'welcome'.
On successful Sign Up, content of '/cmshome' will be displayed, create two
new directories with name 'technews' and 'xsl'.
Navigate to 'xsl' directory and create two new files by uploading <SAMPLE_HOME>/docs/sampledata/xsl/newstohtml.xsl
and <SAMPLE_HOME>/docs/sampledata/xsl/newstofo.xsl
Return to '/cmshome' and navigate to 'technews' directory and create a new
file by uploading '<SAMPLE_HOME>/docs/sampledata/technews/tech04212003.xml'
Create a new directory with name 'images' ( under /cmshome/technews ) and
upload all the images in <SAMPLE_HOME>/docs/sampledata/technews/images
directory.
Navigate back to 'technews' and click on 'ChangeView' link corresponding
to tech04212003.xml, this pops a new window with options to set view type.
Set view type to HTML and provide '/cmshome/xsl/newstohtml.xsl'
as XSL and click on 'Preview' to view the news as HTML [ If the authentication
dialog pops up, enter the username/password of the logged in user (technews/welcome)
and remember to clear the cache once you log out].
Set view type to PDF and provide '/cmshome/xsl/newstofo.xsl'
and click on 'Preview' to view the news as PDF.
Select a view type and set the appropriate xsl file and click on 'Change'
to save the preference info.
Select 'tech04212003.xml' and click on 'globe' icon () to send externalize request to Admin.
[ Note: Currently images are accessed directly from XDB server, if
the images have to be accessed from file system, change the absolute path
of images to relative path in tech04212003.xml, remove the 'dburl' parameter
in xsl file and Raise Extern Request for the xml file and images. ]
Externalizing
Login as Admin [ cmsadmin/cmsadmin ] to Grant/Reject Externalization Requests
or Grant/Deny Privilege Request.
Once files have been accepted for externalization, files will be generated
based on the view type set by the user.
The generated file can be found under <siteRootPath>/<resourcepath>/<resourcename>.<extn>
For example, If the resource '/cmshome/technews/tech04212003.xml'
has been set with view type as 'HTML' and XSL files as '/cmshome/xsl/newstohtml.xsl',
When the Externalization Request for this resource is accepted by Admin, the
externalized file will be generated at D:\testsite\cmshome\technews\tech04212003.html,
if <siteRootPath> was set to D:\testsite
in Connection.properties