Perl Cd Bookshelf [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Perl Cd Bookshelf [Electronic resources] - نسخه متنی

Mark V. Scardina, Ben ChangandJinyu Wang

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








previous chapter and add Portal functionality to it. This will include building a login area, dynamic page areas, web service areas, and a customization area.



Designing the Framework



The idea behind this portal site is to build it to serve the purposes of a development team who can use it as a home page for all documentation, tips, latest developments, status, and FAQs. This site needs to leverage the previously introduced concept of modularity so that the site can continually be customized and expanded as needed. This framework consists of a set of XSQL pages that were called from each other with appropriate parameters to alter behavior or display dynamic content. What we are going to introduce now is how to combine this modularity into single container pages whose content is supplied by several XSQL pages firing at once.


Figure 15-1 shows what the finished site will look like. As you can see, it contains new areas that were not on the FAQ site. Reviewing clockwise, you’ll note a new What’s New area (where the FAQ list was) that has links to the latest interesting XML articles, displaying ten links at a time. Next is a new login area for XDK users, with the requisite Name and Password fields. This area serves as the major user action area of the page and is handled by a separate XSQL page. It also will be used as a role-specific link area after a successful login.




Figure 15-1: Finished Oracle XML Development Group portal site


Below the login area is the Hot Topics area, which appears as a list of links but actually is dynamically generated from a web service that is supplied by the Oracle Technology Network (OTN) site. The web service provider, employing a push model, keeps this area current; you will include it on your site by using another XSQL page. Below the Hot Topics area is a Hot Links area, which is actually populated by XML content from a file. Finally, the left-hand bar serves as a static area that repopulates the center area when its links are clicked with content from queries executed by the series of XSQL pages linked here.


You will also be creating an administrative page to facilitate adding users, content, links, etc. This will be a separate role based upon the permission level of the user login, using the page illustrated in Figure 15-2. Note that the login area has specific links for this role and that the left-hand bar now displays administrative tasks, such as inserting or updating a news item, adding links, and approving new users.




Figure 5-2: Development Group portal administrative page


Turning to how this web site is designed, an XSQL container page is used to call additional XSQL pages to populate the areas, as shown in the following listing for index.xsql:


<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" media="msie" href="?>
<?xml-stylesheet type="text/xsl" media="mozilla"
href="?>
<page xmlns:xsql="urn:oracle-xsql">
<login>
<xsql:include-xsql reparse="yes" href="/>
</login>
<nav>
<xsql:include-xml href="/>
</nav>
<link>
<xsql:include-xml href="/>
</link>
<content>
<xsql:if-param name="appname" exists="yes">
<xsql:include-xsql reparse="yes" href="/>
</xsql:if-param>
<xsql:if-param name="appname" exists="no">
<xsql:if-param name="pagename" exists="yes">
<xsql:include-xsql reparse="yes" href="/>
</xsql:if-param>
<xsql:if-param name="pagename" exists="no">
<xsql:include-xsql reparse="yes" href=" cat=xdk"/>
</xsql:if-param>
</xsql:if-param>
</content>
<topic>
<xsql:include-xsql href="/>
</topic>
</page>


Examining this listing, you will see the familiar XSLT stylesheet entries to account for the different behavior between Netscape and Internet Explorer, this distinction being made by using the media attribute of the <?xml-stylesheet?> processing instruction. You then see element groups defining the different areas of the page, as follows:





<login> Calls to populate the login area.





<nav> Loads nav.xml to populate the left-hand navigation bar.





<link> Loads link.xml to populate the Hot Links area.





<content> Calls specify XSQL pages depending on the appname and pagemane input. By default, it calls news.xsql to populate the What’s New section as well as iteratively calling the paging engine as described in the previous chapter to create pages of entries.





<topic> Calls otnnews.xsql to populate the Hot Topics area.





This page demonstrates retrieving content not only from the database but also from a file system and a web service, thus demonstrating a broad range of functionality that you can implement with this architecture. We will discuss each of these forms of retrieval in the following sections.


/ 218