config.xml
Page configurations are mainly used by TPageService to modify or append the application configuration. As the name indicates, a page configuration is associated with a directory storing some page files. It is stored as an XML file named config.xml. ページコンフィグは、主に、アプリケーションコンフィグを修正するか、付加するためにTPageServiceによって使われます。 名前が示す様に、ページのコンフィグはいくつかのページファイルが保存されているディレクトリに関与します。 それは、config.xml と名付けられたXMLファイルとして保存されます。
When a user requests a page stored under /dir1/dir2, the TPageService will try to parse and load config.xml files under <BasePath>, <BasePath>/dir1 and <BasePath>/dir1/dir2. Paths, modules, and parameters specified in these configuration files will be appended or merged into the existing application configuration. Here <BasePath> is as defined in page service. ユーザーが<basePath>/dir1/dir2下に保存されたページをリクエストする時に、TPageServiceは、<basePath>/dir1、および<basePath>/dir1/dir2下でconfig.xmlファイルを構文解析し、ロードしようとします。これらのコンフィグファイルの中で指定されたパス、モジュール、およびパラメータは既存のアプリケーションコンフィグの中に付加されるか、合併されるでしょう。 ここで、<basepath>は、ページサービスにおいて定義されるようにです。
The format of a page configuration file is as follows, ページのコンフィギュレーションファイルのフォーマットは次の通りです。<configuration> <paths> <alias id="AliasID" path="AliasPath" /> <using namespace="Namespace" /> </paths> <modules> <module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... /> </modules> <parameters> <parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... /> </parameters> <include file="path.to.extconfig" when="PHP expression" /> <authorization> <allow pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="get" /> <deny pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" /> </authorization> <pages PropertyName="PropertyValue" ...> <page id="PageID" PropertyName="PropertyValue" ... /> </pages> </configuration>
The <paths>,<modules>,<parameters> and <include> are similar to those in an application configuration. The <authorization> element specifies the authorization rules that apply to the current page directory and all its subdirectories. For more details, see authentication and authorization section. The <pages> element specifies the initial values for the properties of pages. Each <page> element specifies the initial property values for a particular page identified by the id attribute. Initial property values given in the <pages> element apply to all pages in the current directory and all its subdirectories.<paths>、<modules>、<parameters>、および <include>はアプリケーションコンフィグのものと類似しています。<authorazation>エレメントは、現在のページディレクトリととすべてのそのサブディレクトリィにあてはまる承認の規則を指定します。詳細については、認証と承認セクションを見てください。 <page>エレメントはページの特性のために初期値を指定します。各<page>エレメントは id属性によって識別された特定のページに対するプロパティの初期値を指定します。 <page>エレメントの中で設定された初期プロパティの値は、カレントディレクトリとそのサブディレクトリ下にあるすべてのページに適用されます。
Complete specification of page configurations can be found in the DTD and XSD files. ページコンフィグの完全仕様書はDTD とXSD ファイルでみることができます。