JP2016170592A - Program, content analyzer, and content analyzing method - Google Patents
Program, content analyzer, and content analyzing method Download PDFInfo
- Publication number
- JP2016170592A JP2016170592A JP2015049449A JP2015049449A JP2016170592A JP 2016170592 A JP2016170592 A JP 2016170592A JP 2015049449 A JP2015049449 A JP 2015049449A JP 2015049449 A JP2015049449 A JP 2015049449A JP 2016170592 A JP2016170592 A JP 2016170592A
- Authority
- JP
- Japan
- Prior art keywords
- decoration
- unused
- property
- designation information
- control attribute
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、プログラム、コンテンツ分析装置及びコンテンツ分析方法に関する。 The present invention relates to a program, a content analysis apparatus, and a content analysis method.
WWW(World Wide Web)システムを用いてインターネット上に公開されるWebサイトとしてのコンテンツは1以上のWebページの集合によって構成される。Webページは、例えばHTML(HyperText Markup Language)により構成される。HTMLは文書の論理構造をタグで表現するマークアップ言語である。
このようなWebページは、閲覧ソフトウェアであるWebブラウザに内包されるレンダリングエンジンによってタグの解釈が行われ、Webブラウザ上での描画が行われる。
Content as a website published on the Internet using the WWW (World Wide Web) system is composed of a set of one or more web pages. The web page is configured by, for example, HTML (HyperText Markup Language). HTML is a markup language that expresses the logical structure of a document with tags.
Such a Web page is subjected to tag interpretation by a rendering engine included in a Web browser which is browsing software, and is rendered on the Web browser.
HTMLで記述されたWebページに対してスタイルを定義する言語の1つとしてCSS(Cascading Style Sheets)が知られている。CSSはHTMLを構成する各タグに対して、レイアウトや、フォントの大きさ、色などをはじめ、どのように装飾を施すべきかを指定する。 CSS (Cascading Style Sheets) is known as one of the languages for defining styles for Web pages described in HTML. The CSS specifies how to decorate each tag constituting the HTML, including layout, font size, color, and the like.
Webサイトは、複数のWebページごとに対応するHTMLファイルと、WebページのスタイルをCSSにより定義したCSSファイルとを有する。そのうえで、Webサイトを構成するHTMLファイルとCSSファイルは、例えば特定のドメイン名のもとで管理される。 The Web site has an HTML file corresponding to each of a plurality of Web pages, and a CSS file in which the Web page style is defined by CSS. In addition, the HTML file and the CSS file constituting the Web site are managed under a specific domain name, for example.
同じWebサイトに存在するWebページは、例えば見やすさなどの観点から統一的な装飾が施されることが多い。このために、同じWebサイトに存在する複数のWebページで使用される同一のタグには同じスタイルが指定されることが多い。 Web pages existing on the same Web site are often decorated in a unified manner from the viewpoint of, for example, ease of viewing. For this reason, the same style is often specified for the same tag used in a plurality of Web pages existing on the same Web site.
近年では、Webサイトが保持するWebページが大規模化しており、各Webページにおいて統一的なスタイルを必要とする箇所が増加している。そのため、予め考え得るスタイルを網羅的にテンプレートとしてCSSファイルに登録することが一般的に行われるようになっている。
上記のようにCSSファイルにテンプレートが含まれる場合、レンダリングエンジンは、Webページの描画処理をするにあたり、CSSファイルにおける全てのプロパティをメモリに読み込むようにしている。そのうえで、レンダリングエンジンは、読み込んだプロパティのうちから処理対象のタグに指定されたスタイルを検出し、検出したスタイルをタグの内容に適用するという出力処理をしている。この場合、実際にはWebページの出力に使用されていない無駄なスタイル情報も多く含むCSSの情報のうちから必要なスタイルを検出していることになり、処理効率が低下する。
In recent years, Web pages held by Web sites are becoming large-scale, and the number of locations that require a uniform style on each Web page is increasing. For this reason, it is generally performed to register possible styles in the CSS file as exhaustive templates.
When the CSS file includes a template as described above, the rendering engine reads all the properties in the CSS file into the memory when drawing the web page. In addition, the rendering engine performs an output process of detecting the style specified for the tag to be processed from the read properties and applying the detected style to the contents of the tag. In this case, a necessary style is detected from CSS information that also includes a lot of useless style information that is not actually used for outputting a Web page, and the processing efficiency decreases.
そこで、Webページの出力に必要なスタイル情報を保持した定義ファイルを用意し、定義ファイルに基づいて特定したスタイルのみを使用してWebページを出力するようにした構成が知られている(例えば、特許文献1参照)。 Therefore, a configuration is known in which a definition file holding style information necessary for outputting a web page is prepared, and the web page is output using only the style specified based on the definition file (for example, Patent Document 1).
しかし、上記の構成においては、予め使用するスタイルを定義した情報を作成しておく必要があり、大規模化に伴って複数のWebページの追加、編集、削除が求められるような状況に柔軟に対応することが困難である。 However, in the above configuration, it is necessary to create information that defines a style to be used in advance, and flexibly handle situations where addition, editing, and deletion of multiple Web pages are required as the scale increases. It is difficult to respond.
また、近年では、Webブラウザのプラグイン機能として、スタイルの編集機能を持つメンテナンスツールが提供されている。編集機能では、例えばCSSにおけるスタイル情報(プロパティとも呼ばれる)の値の追加、変更、削除等を行うことが可能とされており、即座にWebブラウザ上でスタイルの反映結果を確認することができる。 In recent years, a maintenance tool having a style editing function is provided as a plug-in function of a Web browser. In the editing function, for example, the value of style information (also referred to as a property) in CSS can be added, changed, or deleted, and the reflection result of the style can be immediately confirmed on the Web browser.
しかし、近年のWebサイトでは、Webページとして、静的Webページに加えて動的Webページも多く使用されるようになってきている。静的Webページは、クライアントからの要求に応答して、Webサーバからクライアントに送信される内容が常に同じとなるWebページである。動的Webページは、例えばJavaScript(登録商標)などのスクリプト言語を用いて、クライアントからの要求に応じた内容となるように動的に生成されたWebページである。
動的Webページでは、静的Webページでは利用していないスタイルが適用される場合がある。しかし、上記のようなメンテナンスツールは、静的Webページに対応した未使用のプロパティの検出は可能であるが、動的Webページのみで利用されるプロパティの検出を行うことができない。このために、動的Webページのみで使用されるプロパティが未使用のプロパティとして検出されてしまう可能性があった。
However, in recent Web sites, dynamic Web pages are often used as Web pages in addition to static Web pages. A static Web page is a Web page in which the content transmitted from the Web server to the client is always the same in response to a request from the client. The dynamic web page is a web page that is dynamically generated using a script language such as JavaScript (registered trademark) so as to have contents according to a request from the client.
In a dynamic Web page, a style that is not used in a static Web page may be applied. However, the maintenance tool as described above can detect an unused property corresponding to a static Web page, but cannot detect a property used only on a dynamic Web page. For this reason, there is a possibility that a property used only in the dynamic Web page is detected as an unused property.
本発明は、このような事情に鑑みてなされたもので、静的単位コンテンツと動的単位コンテンツとが混在するコンテンツから、未使用の装飾制御属性を適切に検出できるようにすることを目的とする。 The present invention has been made in view of such circumstances, and it is an object of the present invention to appropriately detect unused decoration control attributes from content in which static unit content and dynamic unit content are mixed. To do.
上述した課題を解決するために、本発明の一態様は、コンピュータに、構造化文書と前記構造化文書における要素についての装飾を指定する装飾指定情報とを含むコンテンツを対象として、前記コンテンツを構成する静的単位コンテンツと動的単位コンテンツとのそれぞれに対応する前記構造化文書の構造及び前記装飾指定情報の構造を解析する文書解析ステップと、前記文書解析ステップにより解析された前記構造化文書の構造における要素と前記装飾指定情報の構造における装飾制御属性との対応関係を特定する対応関係特定ステップと、前記対応関係特定ステップにより前記構造化文書の構造における要素と対応関係のあることが特定された前記装飾指定情報の構造における装飾制御属性と、前記装飾指定情報における装飾制御属性とを比較した結果に基づいて、前記装飾指定情報における装飾制御属性のうちから、静的単位コンテンツと動的単位コンテンツとのいずれにも使用されていない未使用装飾制御属性を検出する未使用装飾制御属性検出ステップとを実行させるためのプログラムである。 In order to solve the above-described problem, according to one aspect of the present invention, the content is configured with respect to content including a structured document and decoration designating information for designating decoration for an element in the structured document. A document analysis step for analyzing the structure of the structured document and the structure of the decoration designating information corresponding to each of the static unit content and the dynamic unit content, and the structured document analyzed by the document analysis step. A correspondence specifying step for specifying a correspondence between an element in the structure and a decoration control attribute in the structure of the decoration designation information, and the correspondence specifying step specifies that there is a correspondence with the element in the structure of the structured document. The decoration control attribute in the structure of the decoration designation information, and the decoration control attribute in the decoration designation information An unused decoration control attribute that detects an unused decoration control attribute that is not used for either static unit content or dynamic unit content from among the decoration control attributes in the decoration designation information based on the comparison result This is a program for executing the detection step.
本発明の一態様は、上記のプログラムであって、前記コンピュータに、前記未使用装飾制御属性検出ステップにより検出された未使用装飾制御属性の全てまたは一部を前記装飾指定情報から削除する装飾制御属性削除ステップをさらに実行させるためのプログラムである。 One aspect of the present invention is the above-described program, wherein the computer controls the computer to delete all or part of the unused decoration control attributes detected by the unused decoration control attribute detection step from the decoration designation information. This is a program for further executing an attribute deletion step.
本発明の一態様は、上記のプログラムであって、前記装飾制御属性削除ステップは、前記装飾指定情報における削除対象の未使用装飾制御属性に対応する記述を削除してもよい。 One aspect of the present invention is the above-described program, wherein the decoration control attribute deletion step may delete a description corresponding to an unused decoration control attribute to be deleted in the decoration designation information.
本発明の一態様は、上記のプログラムであって、前記装飾制御属性削除ステップは、削除対象の未使用装飾制御属性が前記装飾指定情報において無効であることを示す削除指定情報を前記装飾指定情報の構造に付加してもよい。 One aspect of the present invention is the above-described program, wherein the decoration control attribute deletion step includes deletion designation information indicating that an unused decoration control attribute to be deleted is invalid in the decoration designation information. It may be added to the structure.
本発明の一態様は、上記のプログラムであって、前記装飾制御属性削除ステップは、前記装飾指定情報の構造に付加された削除指定情報を削除することにより、前記装飾指定情報から削除された未使用装飾制御属性が前記装飾指定情報において復元されるようにしてもよい。 One aspect of the present invention is the above-described program, wherein the decoration control attribute deletion step deletes the deletion designation information added to the structure of the decoration designation information, thereby deleting the decoration designation information. The used decoration control attribute may be restored in the decoration designation information.
本発明の一態様は、上記のプログラムであって、前記装飾制御属性削除ステップは、前記未使用装飾制御属性検出ステップにより検出された未使用装飾制御属性のうちから削除対象の未使用装飾制御属性を指定する操作に応じて、指定された削除対象の未使用装飾制御属性を前記装飾指定情報から削除してもよい。 One aspect of the present invention is the above-described program, wherein the decoration control attribute deletion step includes an unused decoration control attribute to be deleted from the unused decoration control attributes detected by the unused decoration control attribute detection step. In response to an operation for designating, the designated unused decoration control attribute to be deleted may be deleted from the decoration designation information.
本発明の一態様は、上記のプログラムであって、前記装飾制御属性削除ステップは、前記未使用装飾制御属性検出ステップによる未使用装飾制御属性の検出に応じて、検出された未使用装飾制御属性の全てまたは一部を前記装飾指定情報から削除してもよい。 One aspect of the present invention is the above-described program, wherein the decoration control attribute deletion step detects the unused decoration control attribute detected in response to detection of the unused decoration control attribute by the unused decoration control attribute detection step. May be deleted from the decoration designation information.
本発明の一態様は、上記のプログラムであって、前記装飾制御属性削除ステップは、前記装飾指定情報からの未使用装飾制御属性の削除の履歴を示す削除履歴情報に基づいて、前記装飾指定情報から削除された未使用装飾制御属性が前記装飾指定情報において復元されるようにしてもよい。 One aspect of the present invention is the above-described program, wherein the decoration control attribute deletion step is based on deletion history information indicating a history of deletion of unused decoration control attributes from the decoration specification information. The unused decoration control attribute deleted from the above may be restored in the decoration designation information.
本発明の一態様は、構造化文書と前記構造化文書における要素についての装飾を指定する装飾指定情報とを含むコンテンツを対象として、前記コンテンツを構成する静的単位コンテンツと動的単位コンテンツとのそれぞれに対応する前記構造化文書の構造及び前記装飾指定情報の構造を解析する文書解析部と、前記文書解析部により解析された前記構造化文書の構造における要素と前記装飾指定情報の構造における装飾制御属性との対応関係を特定する対応関係特定部と、前記対応関係特定部により前記構造化文書の構造における要素と対応関係のあることが特定された前記装飾指定情報の構造における装飾制御属性と、前記装飾指定情報における装飾制御属性とを比較した結果に基づいて、前記装飾指定情報における装飾制御属性のうちから、静的単位コンテンツと動的単位コンテンツとのいずれにも使用されていない未使用装飾制御属性を検出する未使用装飾制御属性検出部とを備えるコンテンツ分析装置である。 One aspect of the present invention is directed to a content including a structured document and decoration designation information that designates decoration for an element in the structured document, and includes static unit content and dynamic unit content constituting the content. A document analysis unit for analyzing the structure of the structured document and the structure of the decoration designation information corresponding to each, elements in the structure of the structured document analyzed by the document analysis unit, and decoration in the structure of the decoration designation information A correspondence relationship identifying unit that identifies a correspondence relationship with a control attribute, and a decoration control attribute in the structure of the decoration designation information that is identified by the correspondence relationship identifying unit as having a correspondence relationship with an element in the structure of the structured document. Based on the result of comparison with the decoration control attribute in the decoration designation information, the decoration control attribute in the decoration designation information A content analysis apparatus and a unused decorative control attribute detector for detecting an unused decorative control attribute not being used in any of the static unit content and dynamic content unit.
本発明の一態様は、構造化文書と前記構造化文書における要素についての装飾を指定する装飾指定情報とを含むコンテンツを対象として、前記コンテンツを構成する静的単位コンテンツと動的単位コンテンツとのそれぞれに対応する前記構造化文書の構造及び前記装飾指定情報の構造を解析する文書解析ステップと、前記文書解析ステップにより解析された前記構造化文書の構造における要素と前記装飾指定情報の構造における装飾制御属性との対応関係を特定する対応関係特定ステップと、前記対応関係特定ステップにより前記構造化文書の構造における要素と対応関係のあることが特定された前記装飾指定情報の構造における装飾制御属性と、前記装飾指定情報における装飾制御属性とを比較した結果に基づいて、前記装飾指定情報における装飾制御属性のうちから、静的単位コンテンツと動的単位コンテンツとのいずれにも使用されていない未使用装飾制御属性を検出する未使用装飾制御属性検出ステップとを含むコンテンツ分析方法である。 One aspect of the present invention is directed to a content including a structured document and decoration designation information that designates decoration for an element in the structured document, and includes static unit content and dynamic unit content constituting the content. A document analysis step for analyzing the structure of the structured document and the structure of the decoration designation information corresponding to each, elements in the structure of the structured document analyzed by the document analysis step, and decoration in the structure of the decoration designation information A correspondence specifying step for specifying a correspondence relationship with the control attribute, and a decoration control attribute in the structure of the decoration designation information identified by the correspondence specifying step as having a correspondence relationship with an element in the structure of the structured document, , Based on the result of comparison with the decoration control attribute in the decoration designation information, From among the decorative control attribute that is a content analysis method comprising the unused decorative control attribute detection step of detecting an unused decorative control attribute not being used in any of the static unit content and dynamic content unit.
以上説明したように、本発明によれば、静的単位コンテンツと動的単位コンテンツとが混在するコンテンツから、適切に未使用の装飾制御属性を検出できるようになるという効果が得られる。 As described above, according to the present invention, it is possible to appropriately detect unused decoration control attributes from content in which static unit content and dynamic unit content are mixed.
<第1実施形態>
[コンテンツ分析装置の設置環境例]
図1は、本実施形態におけるコンテンツ分析装置100の設置環境例を示している。同図に示すように、本実施形態のコンテンツ分析装置100は、ネットワーク300を介してWebサーバ200と接続されている。ネットワーク300は、例えばインターネット、LAN(Local Area Network)などである。
Webサーバ200は、Webコンテンツ400(コンテンツの一例)を記憶している。Webサーバ200は、Webコンテンツ400により構築されるWebサイトを公開するサーバである。
<First Embodiment>
[Example of installation environment for content analyzer]
FIG. 1 shows an installation environment example of the
The
図2は、Webコンテンツ400の構造例を示している。同図に示すWebコンテンツ400は、HTMLファイル401とCSSファイル402とJavaScriptファイル403とを有する。
HTMLファイル401は、マークアップ言語であるHTML(HyperText Markup Language)により記述された文書のファイルである。HTMLファイル401は、テキストによる文書と、文書構造を定義した情報とで形成されるファイルである。HTMLファイル401における文書構造の定義は、文書を形成する要素(ノード)をタグとして定義することによって行われる。HTMLファイル401のように文書構造が定義された文書は構造化文書とも呼ばれる。
FIG. 2 shows an example of the structure of the
The
なお、Webコンテンツ400が含む構造化文書としては、HTMLファイル401に限定されるものではなく、例えばXML(Extensible Markup Language)、SGML(Standard Generalized Markup Language)などのように、他のマークアップ言語により記述されたファイルなどであってもよい。
Note that the structured document included in the
CSSファイル402は、HTMLファイル401において記述される要素についての装飾(スタイル)を指定する情報(装飾指定情報の一例)である。具体的に、CSSファイル402は、構造化文書などにおける表示形式を制御するスタイルシートの1つであるCSS(Cascading Style Sheets)に従って記述される。
なお、装飾指定情報としては、CSSファイル402に限定されることなく、他のスタイルシートであってもよい。
The
The decoration designation information is not limited to the CSS file 402 but may be other style sheets.
JavaScriptファイル403は、HTMLファイル401の再生に動的機能を与える情報である。JavaScript(登録商標)によって記述されたプログラムのファイルである。
HTMLファイル401によっては静的な状態が表現される。そのうえで、本実施形態のWebコンテンツ400のようにJavaScriptファイル403が含められることで、HTMLファイル401を再生して得られるコンテンツの態様に、動きや対話性などの動的な機能を与えることができる。
The
A static state is expressed by the
即ち、本実施形態におけるWebコンテンツは、Webページ(単位コンテンツ)として、HTMLファイル401とCSSファイル402によって出力される静的Webページ(静的単位コンテンツの一例)と、HTMLファイル401とCSSファイル402とJavaScriptファイル403によって出力される動的Webページ(動的単位コンテンツの一例)とを含む。
ここで、静的Webページは、クライアントからの要求に応答して、Webサーバ200からクライアントに送信される内容が常に同じとなるWebページである。このようなWebページは、HTMLファイル401とCSSファイル402によって再現される。
一方、動的Webページは、クライアントからの要求に応じた内容を有するように動的に生成されるWebページである。本実施形態において、動的Webページの生成は、JavaScriptによって行われる。JavaScriptは、動的Webページを生成するにあたり、生成するWebページに対して指定されたCSSのプロパティ(装飾制御属性の一例)をCSSファイル402から読み出して適用する。なお、動的Webページの生成は、クライアントからのリクエストの内容に応じてWebサーバ200で行われる場合と、Webブラウザ上で動作するJavaScriptなどによりクライアント端末上で行われる場合とがある。
本実施形態において、CSSファイル402におけるプロパティは、装飾(スタイル)についての属性を示す情報である。
In other words, the Web content in the present embodiment is a static Web page (an example of static unit content) output by the
Here, the static Web page is a Web page in which the content transmitted from the
On the other hand, the dynamic web page is a web page that is dynamically generated so as to have contents according to a request from a client. In the present embodiment, the dynamic Web page is generated by JavaScript. When JavaScript generates a dynamic Web page, CSS properties (an example of decoration control attributes) specified for the Web page to be generated are read from the
In the present embodiment, the property in the
図1において、コンテンツ分析装置100は、ネットワーク300経由でWebサーバ200にアクセスし、Webサーバ200が記憶するWebコンテンツ400を分析対象として取得する。
そして、コンテンツ分析装置100は、以下に説明する構成によって、取得した分析対象のWebコンテンツ400について分析を行う。ここでの分析は、Webコンテンツ400のCSSファイル402に含まれるCSSのプロパティのうちで、Webページの生成に使用されていない未使用プロパティを検出することである。また、未使用プロパティを検出するにあたり、コンテンツ分析装置100は、分析として、Webコンテンツ400に含まれるHTMLファイル401の文書解析と、文書解析によって解析されたHTMLファイル401の構造におけるタグとCSSファイルの構造におけるプロパティとの対応関係を特定する処理を行う。
そのうえで、本実施形態のコンテンツ分析装置100は、ユーザの操作によって削除対象として指定された未使用プロパティをCSSファイル402から削除するプロパティ編集機能を備える。
In FIG. 1, a
Then, the
In addition, the
コンテンツ分析装置100は、未使用プロパティが削除された編集後のCSSファイル402を含むWebコンテンツ400をWebサーバ200に送信する。Webサーバ200は、コンテンツ分析装置100から受信したWebコンテンツ400を記憶する。これにより、以降においては、Webサーバ200から不要なプロパティが削除されたCSSファイル402を含むWebコンテンツ400によるWebサイトが公開される。
The
本実施形態におけるCSSファイル402は、例えば予め使用される可能性のある全てのスタイルに対応するプロパティが用意されたテンプレートを有する。このために、CSSファイル402に含まれるプロパティには、静的Webページと動的Webページとのいずれにも使用されないプロパティが含まれている。
即ち、Webコンテンツ400は、未使用のプロパティという無駄なデータが含まれている。このようなWebコンテンツ400がネットワーク300上で伝送されることによっては、無駄なデータも伝送されることになり、例えば無駄なトラフィックの増加を招くことになる。
The
That is, the
また、WebブラウザがWebコンテンツ400を再生する際には、無駄なプロパティを多く含むCSSファイル402からWebページの生成に使用するプロパティを抽出する処理を行うことになるので、Webページ生成処理効率の点で不利である。
また、WebブラウザがWebコンテンツ400を再生する際には、Webコンテンツ400に含まれるCSSファイル402から全てのプロパティを読み出してメモリに読み込んでいる。この場合、WebコンテンツにおけるWebページの出力に使用されない無駄なプロパティまでが読み込まれていることになる。即ち、この場合には、メモリの容量を無駄に使用していることになり、メモリの使用効率は高いとはいえない。
In addition, when the Web browser reproduces the
When the Web browser reproduces the
このように、Webコンテンツ400においてWebページの生成に使用されないCSSファイル402のプロパティが存在することは、データ伝送、Webページ生成処理、メモリの使用などの側面において効率を低下させる要因となる。
Thus, the existence of the CSS file 402 property that is not used for generating a Web page in the
そこで、上記のようにしてコンテンツ分析装置100によりWebコンテンツ400においてCSSファイル402の不要なプロパティが削除されることで、Webコンテンツの利用にあたっての効率化が図られる。
具体的には、Webコンテンツ400をネットワーク300上で伝送する際のトラフィックが軽減される。また、Webコンテンツ400をクライアントで再生するにあたり、処理負荷が軽減される。また、メモリに読み込むべきデータ量が削減され、メモリの使用効率が向上する。
Therefore, by deleting unnecessary properties of the
Specifically, traffic when the
なお、同図においては、ネットワーク300を介した通信によりWebサーバ200から分析対象のWebコンテンツ400を取得するようにされたコンテンツ分析装置100の設置環境が示されている。
しかし、コンテンツ分析装置100の設置環境は上記の例に限定されない。例えば、Webサーバ200に代えて、ネットワーク300経由で接続されたストレージデバイスに記憶されたWebコンテンツ400をコンテンツ分析装置100が取得するようにされた設置環境であってもよい。
また、コンテンツ分析装置100に直接接続可能なストレージデバイスに記憶されたWebコンテンツ400をコンテンツ分析装置100が取得するようにされた設置環境であってもよい。
また、コンテンツ分析装置100内に設けられたストレージ領域に記憶されたWebコンテンツ400をコンテンツ分析装置100が取得するようにされた設置環境であってもよい。
In the figure, an installation environment of the
However, the installation environment of the
Further, it may be an installation environment in which the
Further, the installation environment may be such that the
また、本実施形態におけるコンテンツ分析装置100としての機能は、例えばWebブラウザなどのWebコンテンツを再生可能なアプリケーションにおけるプラグイン機能として実装されればよい。あるいは、コンテンツ分析装置100としての機能は、本実施形態におけるWebコンテンツの分析機能と、プロパティ編集機能とを備える専用のアプリケーションにより実現されてもよい。
In addition, the function as the
[コンテンツ分析装置の構成例]
図3を参照して、本実施形態におけるコンテンツ分析装置100の構成例について説明する。同図に示すコンテンツ分析装置100は、制御部101、表示部102及び操作部103を備える。
[Configuration example of content analysis device]
A configuration example of the
制御部101は、コンテンツ分析装置100における各種の制御を実行する。制御部101としての機能は、コンテンツ分析装置100が備えるCPU(Central Processing Unit)がプログラムを実行することにより実現される。
本実施形態における制御部101は、同図に示されるように、文書解析部111、対応関係特定部112、未使用プロパティ検出部113及びプロパティ削除部114を備える。
The
The
文書解析部111は、HTMLファイル401と、HTMLファイル401における要素についての装飾を指定するCSSファイル402とを含むWebコンテンツ400を対象として、Webコンテンツ400を構成する動的Webページと静的Webページとのそれぞれに対応するHTMLファイル401の構造とCSSファイル402の構造とを解析する。また、動的Webページは、HTMLファイル401にJavaScriptファイル403が作用することにより生成される。そこで、文書解析部111は、動的Webページに対しては、HTMLファイル401にJavaScriptファイル403を作用させることで解析結果(DOMツリー)を得る。
対応関係特定部112は、文書解析部111により解析されたHTMLファイル401の構造におけるタグとCSSファイル402の構造におけるプロパティとの対応関係を特定する。
The
The
未使用プロパティ検出部113は、対応関係特定部112によりHTMLファイル401の構造におけるタグと対応関係のあることが特定されたCSSファイル402の構造におけるプロパティ(以下、「使用プロパティ」とも呼ぶ)と、CSSファイル402におけるプロパティ(以下、「原文対応プロパティ」とを比較する。
未使用プロパティ検出部113は、使用プロパティと原文対応プロパティとを比較した結果に基づいて、CSSファイル402におけるプロパティのうちから、静的Webページと動的Webページとのいずれにも使用されていない未使用プロパティを検出する。
プロパティ削除部114は、未使用プロパティ検出部113により検出された未使用プロパティの全てまたは一部をCSSファイル402から削除する。
The unused
The unused
The
表示部102は、ディスプレイデバイスを備え、制御部101の制御に応じて画像を表示する。
操作部103は、コンテンツ分析装置100が備える操作子や入力デバイスを一括して示す。具体的に、操作部103には、例えばマウス、キーボード、ペンタブレットなどが含まれる。また、表示部102がタッチパネルとして構成されている場合には、タッチパネルも操作部103に含まれる。
The
The
以下に、制御部101における文書解析部111、対応関係特定部112、未使用プロパティ検出部113及びプロパティ削除部114の各構成について説明する。
Below, each structure of the
図4は、文書解析部111の構成例を示している。文書解析部111は、HTMLファイル解析部1111とCSSファイル解析部1112とを備える。
HTMLファイル解析部1111は、Webコンテンツ400が含むHTMLファイル401とJavaScriptファイル403からWebページ単位の記述を入力する。本実施形態において、HTMLファイル解析部1111は、Webコンテンツ400を構成する全てのWebページ(静的Webページ及び全ての動的Webページ)ごとに対応する記述をHTMLファイル401とJavaScriptファイル403から入力する。
FIG. 4 shows a configuration example of the
The HTML
HTMLファイル解析部1111は、入力したWebページ単位の記述について構文解析を行う。具体的に、HTMLファイル解析部1111は、HTMLファイル401におけるWebページ単位の記述におけるタグの階層と出現順を解析し、解析結果としてWebページ単位に対応するDOMツリー501を生成する。DOMツリー501は解析結果に基づいてタグをツリー構造で表した情報である。1つのDOMツリー501は、種別としては、HTMLファイル401から直接的に出力される静的Webページに対応するDOMツリー501と、JavaScriptファイル403がHTMLファイル401に作用することにより生成される動的Webページに対応するDOMツリー501との2種類が存在する。従って、HTMLファイル解析部1111によっては、上記の2つの種類が混在する複数のDOMツリー501が生成される。
本実施形態のHTMLファイル解析部1111は、例えばHTMLパーサ(構文解析器)と呼ばれるプログラムによってDOMツリー501を生成する。DOM(Document Object Model)は、HTMLやXMLなどによる構造化文書をアプリケーションから利用するためのAPI(Application Program Interface)の1つである。
The HTML
The HTML
CSSファイル解析部1112は、Webコンテンツ400が含むCSSファイル402の記述を入力する。本実施形態において、CSSファイル解析部1112は、Webコンテンツ400を構成する全てのCSSファイル402から入力する。即ち、CSSファイル解析部1112は、HTMLファイル401から呼び出される全てのCSSファイル402を入力とする。
CSSファイル解析部1112は、入力した全てのCSSファイル402の記述について構文解析を行う。具体的に、CSSファイル解析部1112は、CSSファイル402の記述におけるプロパティと、プロパティの値と、プロパティに対応するタグとを解析し、解析結果としてCSSスタイルルール502を生成する。CSSスタイルルール502は、解析結果に基づいて、CSSファイルに含まれる全てのプロパティと、プロパティの値と、プロパティに対応するタグとがツリー構造で表された情報である。従って、Webコンテンツ400に対応して生成されるCSSスタイルルール502は1つである。
本実施形態のCSSファイル解析部1112は、例えばCSSパーサ(構文解析器)と呼ばれるプログラムによってCSSスタイルルールを生成する。
The CSS
The CSS
The CSS
上記のようにHTMLファイル解析部1111とCSSファイル解析部1112とが解析を行うことで、Webコンテンツ400に応じて、複数のDOMツリー501と1つのCSSスタイルルール502が生成される。DOMツリー501とCSSスタイルルール502は、例えば制御部101が備えるメモリ上で生成される。
As described above, the HTML
図5は、対応関係特定部112の構成例を示している。同図に示す対応関係特定部112は、レンダーツリー生成部1121と対応関係リスト作成部1122とを備える。
FIG. 5 shows a configuration example of the correspondence
レンダーツリー生成部1121は、DOMツリー501とCSSスタイルルール502とを入力する。レンダーツリー生成部1121は、入力したDOMツリー501ごとに、DOMツリー501におけるタグと、CSSスタイルルール502におけるプロパティとの関連付けを行う。1つのタグに関連付けられるプロパティとは、対応のタグにより定義される要素の装飾を指定するプロパティである。また、タグに関連付けられたプロパティには、プロパティの値が付加されている。
The render
レンダーツリー生成部1121は、DOMツリー501ごとのタグとプロパティとの関連付けの結果を、それぞれレンダーツリー600として生成する。つまり、レンダーツリー600は、入力したDOMツリー501と同じ数が生成される。
レンダーツリー600は、上記のように関連付けられたタグとプロパティの組み合わせのうち、視覚的な要素に対応するタグとプロパティの組み合わせの描画順をツリー構造により表したものである。このようなレンダーツリー600は、視覚的要素としてのタグの集合によるタグ群601と、タグ群601に含まれるタグごとに関連付けられたプロパティ群602とを含む構造を有する。
なお、レンダーツリー600は、Webページ単位で生成されるものであり、Webページには静的Webページと動的Webページとが含まれる。
The render
The render
The render
対応関係リスト作成部1122は、レンダーツリー600を利用して、タグ群601に含まれるタグごとに関連付けられたプロパティ群602との対応関係を示す対応関係リスト700を作成する。本実施形態の対応関係リスト作成部1122は、静的Webページと動的Webページのそれぞれに対応する対応関係リストを作成する。
Using the render
図6は、対応関係リスト作成部1122により作成される対応関係リスト700の内容例を模式的に示している。
同図に示す対応関係リスト700は、静的Webページに対応する静的Webページ対応関係リストと、動的Webページに対応する動的Webページ対応関係リストとを含む。
静的Webページ対応関係リストは、Webコンテンツ400を構成するWebページのうち、静的Webページに対応するタグごとにプロパティを対応付けた構造を有する。なお、プロパティには値も付加されている。また、リストの順番によって表示順が表される。
また、動的Webページ対応関係リストは、Webコンテンツ400を構成するWebページのうち、動的Webページに対応するタグごとにプロパティを対応付けた構造である。なお、動的Webページ対応関係リストにおいても、プロパティに値が付加される。また、動的Webページ対応関係リストにおいても、リストの順番によって表示順が表される。
FIG. 6 schematically shows an example of the contents of the
The
The static web page correspondence list has a structure in which properties are associated with each tag corresponding to a static web page among web pages constituting the
The dynamic web page correspondence list has a structure in which properties are associated with each tag corresponding to the dynamic web page among the web pages constituting the
図7は、未使用プロパティ検出部113の構成例を示している。同図に示す未使用プロパティ検出部113は、リスト作成部1131及び比較処理部1132を備える。
リスト作成部1131は、CSSファイル解析部1112が行ったCSSファイル402についての解析結果であるCSSスタイルルール502を入力する。リスト作成部1131は、入力したCSSスタイルルール502のツリー構造において記述される全てのプロパティを対応の値及びタグとともに抽出する。リスト作成部1131は、上記のように抽出したプロパティと、プロパティの値と、プロパティに対応するタグとの組み合わせによるリストを作成する。作成されたリストは原文対応プロパティリスト800として比較処理部1132に対して入力される。
FIG. 7 shows a configuration example of the unused
The
比較処理部1132は、対応関係リスト700の静的Webページ対応関係リストと動的Webページ対応関係リストとのそれぞれに含まれる全てのプロパティを抽出する。このように抽出されるプロパティにも対応の値及びタグが付加されている。
上記のように対応関係リスト700から取得されたプロパティと、プロパティの値と、プロパティに対応するタグとの組み合わせによるリストが使用プロパティリスト750である。つまり、比較処理部1132は、対応関係リスト700を利用して使用プロパティリスト750を作成する。
The
The
比較処理部1132は、使用プロパティリスト750に含まれるプロパティ及びプロパティに対応するタグと、原文対応プロパティリスト800に含まれるプロパティ及びプロパティに対応するタグとを比較する。比較処理部1132は、比較結果に基づいて、原文対応プロパティリスト800に含まれるプロパティのうちから、未使用プロパティを検出する。また、比較処理部1132は、未使用プロパティの検出とともに、未使用プロパティに対応するタグを検出する。未使用プロパティは、前述のように、Webコンテンツ400を構成する静的Webページと動的Webページとのいずれにも使用されていないプロパティである。
具体的に、比較処理部1132は、比較処理として、使用プロパティリスト750に含まれるプロパティと一致するプロパティを原文対応プロパティリスト800から探索していく。そして、比較処理部1132は、原文対応プロパティリスト800に含まれるプロパティのうちで、使用プロパティリストに含まれるプロパティと一致しなかったプロパティを未使用プロパティとして検出する。
本実施形態の比較処理部1132は、検出した未使用プロパティをリスト化した未使用プロパティリスト900を作成する。
The
Specifically, the
The
図8は、プロパティ削除部114の構成例を示している。同図に示すプロパティ削除部114は、編集画面表示制御部1141及び削除処理部1142を備える。
編集画面表示制御部1141は、未使用プロパティリスト900を入力し、入力した未使用プロパティリスト900の内容が反映されたプロパティ編集画面を表示部102に表示させる制御を行う。
また、編集画面表示制御部1141は、削除処理部1142により未使用プロパティのうちからユーザ(CSSファイル402の編集者)の操作により指定されたプロパティが削除されると、プロパティの削除結果が反映されるようにプロパティ編集画面を変更する。
FIG. 8 shows a configuration example of the
The edit screen
Further, when the property designated by the user (editor of the CSS file 402) is deleted from the unused properties by the
ユーザは、操作部103を用いることで、プロパティ編集画面にて表示されるプロパティのうちから任意のプロパティを削除対象として選択し、選択した削除対象のプロパティの削除を指示する操作を行うことができる。
本実施形態の削除処理部1142は、操作部103に対する操作によってプロパティの削除が指示されると、Webコンテンツ400におけるCSSファイル402から、指定されたプロパティを削除する。
By using the
When a deletion of a property is instructed by an operation on the
図9は、プロパティ編集画面の一態様例を示している。同図に示されるプロパティ編集画面においては、3行のリスト項目領域LN1、LN2、LN3が配置されている。なお、以降においてリスト項目領域LN1、LN2、LN3について特に区別しない場合にはリスト項目領域LNと記載する。 FIG. 9 shows an example of a property editing screen. In the property editing screen shown in the figure, three line list item areas LN1, LN2, and LN3 are arranged. Hereinafter, the list item areas LN1, LN2, and LN3 will be referred to as list item areas LN unless otherwise distinguished.
1つのリスト項目領域LNは、プロパティ領域PARとチェックボックスCHBを含む。プロパティ領域PARには、未使用プロパティリスト900に含まれる未使用プロパティにおける1つの未使用プロパティの記述内容が示される。チェックボックスCHBにおいては、操作に応じてチェックマークの表示、非表示が切り替わる。
One list item area LN includes a property area PAR and a check box CHB. In the property area PAR, description contents of one unused property in the unused properties included in the
同図のプロパティ編集画面においては、3行のリスト項目領域LN1、LN2、LN3が表示された例を示しているが、一度に表示されるリスト項目領域LNの数については特に限定されない。また、プロパティ編集画面において表示されていない残りのプロパティに対応するリスト項目領域LNは、例えばスクロールバーを操作してプロパティ編集画面のウィンドウ内をスクロールさせることによって表示させることができる。 In the property editing screen shown in the figure, an example is shown in which three line list item areas LN1, LN2, and LN3 are displayed. However, the number of list item areas LN displayed at one time is not particularly limited. Also, the list item area LN corresponding to the remaining properties not displayed on the property editing screen can be displayed by, for example, operating the scroll bar to scroll the window of the property editing screen.
ユーザは、プロパティ編集画面においてリスト項目領域LNごとに表示されるプロパティの内容を確認し、CSSファイル402から削除対象プロパティを判断する。例えばユーザは、将来的にも使用する可能性が無く、不要であると判断したプロパティを削除対象のプロパティとして判断すればよい。
ユーザは、削除すべきと判断したプロパティを示すプロパティ領域PARを含むリスト項目領域LNにおけるチェックボックスCHBにチェックマークを付す操作を行う。
同図では、リスト項目領域LN1、LN2、LN3のうち、リスト項目領域LN1、LN3におけるチェックボックスCHBにチェックマークが付された例が示されている。チェックマークが付されたリスト項目領域LNに対応するプロパティは、削除対象のプロパティとして選択されていることを示す。
The user confirms the content of the property displayed for each list item area LN on the property editing screen, and determines the property to be deleted from the
The user performs an operation of adding a check mark to the check box CHB in the list item area LN including the property area PAR indicating the property determined to be deleted.
In the figure, an example is shown in which a check mark is added to the check box CHB in the list item areas LN1, LN3 among the list item areas LN1, LN2, LN3. The property corresponding to the list item area LN to which the check mark is attached indicates that the property to be deleted is selected.
ユーザは、上記のように削除対象のプロパティを選択したうえで、削除ボタンBT1に対する操作によりプロパティの削除を指示する。削除ボタンBT1の操作に応じて、前述のように削除処理部1142は、削除対象として選択されたプロパティをCSSファイル402から削除する処理を実行する。
また、上記のようにプロパティの削除が行われると、プロパティ編集画面は、削除されたプロパティに対応するリスト項目領域LNが消去されるようにして表示が変化する。つまり、プロパティ編集画面においては、消去されることなくCSSファイル402において残存している未使用プロパティだけが示される。
ユーザは、プロパティの編集を終了させる場合には、終了ボタンBT2を操作する。終了ボタンBT2が操作されると、例えば同図に示すプロパティ編集画面のウィンドウが閉じられる。
なお、削除ボタンBT1に対する操作が行われた際に、削除処理部1142が削除対象として選択されたプロパティをCSSファイル402から削除する処理を実行する前に、ユーザに対して、削除を実行してもよいか否かを確認するメッセージを表示してもよい。
The user selects the property to be deleted as described above, and instructs the deletion of the property by operating the delete button BT1. In response to the operation of the delete button BT1, as described above, the
Further, when the property is deleted as described above, the display of the property editing screen changes so that the list item area LN corresponding to the deleted property is deleted. That is, on the property editing screen, only unused properties remaining in the CSS file 402 without being deleted are shown.
The user operates the end button BT2 to end property editing. When the end button BT2 is operated, for example, the window of the property editing screen shown in the figure is closed.
When an operation is performed on the delete button BT1, the
このようにして、本実施形態においては、ユーザが未使用プロパティのうちから削除すべきプロパティを指定して削除を指示する操作を行うことによって、CSSファイル402から不要なプロパティを削除することができる。 In this way, in the present embodiment, unnecessary properties can be deleted from the CSS file 402 by performing an operation in which the user designates a property to be deleted from unused properties and instructs the deletion. .
[処理手順例]
図10のフローチャートを参照して、本実施形態のコンテンツ分析装置100が実行する処理手順例について説明する。
コンテンツ分析装置100において、文書解析部111は、Webコンテンツ400を入力する(ステップS101)。文書解析部111が入力したWebコンテンツ400は、例えばコンテンツ分析装置100が備えるRAM(Random Access Memory、図示せず)に記憶されればよい。
[Example of processing procedure]
With reference to the flowchart of FIG. 10, an example of a processing procedure executed by the
In the
次に、文書解析部111におけるHTMLファイル解析部1111は、入力されたWebコンテンツ400に含まれるHTMLファイル401とJavaScriptファイル403とを解析して、Webページ単位でDOMツリー501を生成する(ステップS102)。
また、文書解析部111におけるCSSファイル解析部1112は、入力されたWebコンテンツ400に含まれるCSSファイル402を解析して、CSSスタイルルール502を生成する(ステップS103)。
Next, the HTML
Further, the CSS
次に、対応関係特定部112におけるレンダーツリー生成部1121は、ステップS102により生成されたDOMツリー501と、ステップS103により生成されたCSSスタイルルール502とを利用して、図5にて説明したように、Webページごとにレンダーツリー600を生成する(ステップS104)。即ち、対応関係特定部112は、ステップS104により、Webページ単位でタグとプロパティとの関連付けを行う。
また、対応関係特定部112における対応関係リスト作成部1122は、ステップS104により生成されたレンダーツリー600に基づいて、図5にて説明したように、Webページごとに対応関係リスト700を作成する(ステップS105)。
Next, the render
In addition, the correspondence
次に、未使用プロパティ検出部113におけるリスト作成部1131は、ステップS103にて生成されたCSSスタイルルール502を利用して、原文対応プロパティリストを作成する(ステップS106)。つまり、リスト作成部1131は、CSSスタイルルール502のツリー構造において記述されたプロパティと、プロパティの値と、プロパティに対応するタグとを抽出し、抽出したプロパティと、プロパティの値と、プロパティに対応するタグとをリスト化して原文対応プロパティリストを作成する。
Next, the
次に、未使用プロパティ検出部113における比較処理部1132は、ステップS105により作成された対応関係リスト700から抽出した全てのWebページにおけるタグと、プロパティと、プロパティの値との組み合わせによる使用プロパティリスト750を作成する。そのうえで、比較処理部1132は、使用プロパティリスト750と、ステップS106により作成された原文対応プロパティリスト800とを利用して、図7にて説明したように未使用プロパティと未使用プロパティに対応するタグとを検出する(ステップS107)。
未使用プロパティ検出部113は、ステップS107により検出された未使用プロパティをリスト化することで未使用プロパティリスト900を作成する(ステップS108)。
Next, the
The unused
次に、プロパティ削除部114における編集画面表示制御部1141は、ステップS108により作成された未使用プロパティリスト900を利用してプロパティ編集画面を表示部102に表示させる制御を行う(ステップS109)。ステップS109によりプロパティ編集画面の初期表示が行われる。
Next, the edit screen
プロパティ編集画面が表示されている状態において、プロパティ削除部114における削除処理部1142は、削除対象として選択されたプロパティの削除を指示する操作(プロパティ削除指示操作)が行われたか否かについて判定する(ステップS110)。
削除対象のプロパティを選択する操作は、図9にて説明したように削除対象とする未使用プロパティに対応するリスト項目領域LNのチェックボックスCHBにチェックマークを付す操作である。
また、削除対象として選択されたプロパティの削除を指示する操作は、削除ボタンBT1に対する操作である。
In the state where the property editing screen is displayed, the
The operation for selecting the property to be deleted is an operation for adding a check mark to the check box CHB of the list item area LN corresponding to the unused property to be deleted as described with reference to FIG.
In addition, an operation for instructing deletion of the property selected as the deletion target is an operation on the deletion button BT1.
プロパティ削除指示操作が行われたことを判定した場合(ステップS110−YES)、削除処理部1142は、プロパティ編集画面上で削除対象として選択されていたプロパティを、Webコンテンツ400に含まれるCSSファイル402から削除する(ステップS111)。
また、編集画面表示制御部1141は、ステップS111による削除結果が反映されるようにプロパティ編集画面を変更する(ステップS112)。つまり、編集画面表示制御部1141は、ステップS111により削除されたプロパティに対応するリスト項目領域LNが表示されないようにプロパティ編集画面を変更する。
If it is determined that the property deletion instruction operation has been performed (step S110—YES), the
Further, the edit screen
ステップS110にてプロパティ削除指示操作が行われていないと判定された場合(ステップS110−NO)、あるいはステップS112の処理を実行した後、編集画面表示制御部1141は、プロパティ編集の終了が指示されたか否かについて判定する(ステップS113)。
プロパティ編集の終了の指示は、図9にて説明したようにプロパティ編集画面における終了ボタンBT2に対する操作によって行われる。
If it is determined in step S110 that the property deletion instruction operation has not been performed (step S110-NO), or after executing the process of step S112, the editing screen
The instruction to end property editing is performed by operating the end button BT2 on the property editing screen as described with reference to FIG.
プロパティ編集終了の指示が行われていないことが判定された場合(ステップS113−NO)、編集画面表示制御部1141は、ステップS110に処理を戻す。これにより、以降においても、ユーザによるプロパティ削除のための操作に応じて、CSSファイル402におけるプロパティの削除の処理が行われる。
When it is determined that the property editing end instruction has not been given (step S113: NO), the edit screen
一方、プロパティ削除の編集終了の指示が行われたことが判定された場合(ステップS113−YES)、削除処理部1142は、編集後のWebコンテンツ400をWebサーバ200に送信することで、Webサーバ200において記憶されるWebコンテンツ400について編集後の内容に更新させる(ステップS114)。
On the other hand, if it is determined that an instruction to end editing for property deletion has been made (step S113—YES), the
このような処理によって、本実施形態においては、Webコンテンツ400を構成する静的Webページ及び動的Webページのいずれにおいても使用されていない未使用プロパティを示すプロパティ編集画面が表示される。そしてプロパティ編集画面に対する操作によって、未使用プロパティのうちから選択されたプロパティをCSSファイル402から削除することができる。
By such processing, in the present embodiment, a property editing screen showing unused properties that are not used in any of the static web page and the dynamic web page configuring the
<第2実施形態>
[概要]
続いて、第2実施形態について説明する。先の第1実施形態においては、CSSファイル402の構造から未使用プロパティを削除するようにされていた。従って、第1実施形態においては、削除された未使用プロパティはCSSファイル402において存在しない。
これに対して第2実施形態では、削除すべきことが指定された未使用プロパティについて、CSSファイル402において無効であることを示す削除指定情報をCSSファイル402の構造に含めることにより未使用プロパティの無効化を行う。即ち、本実施形態においては、CSSファイル402において未使用プロパティを無効化することにより、未使用プロパティの削除が行われるものである。
削除指定情報は、例えばCSSファイル402内の指定されたプロパティについての記述をコメントアウトする記述であってもよい。
Second Embodiment
[Overview]
Next, the second embodiment will be described. In the first embodiment, unused properties are deleted from the structure of the
On the other hand, in the second embodiment, the unused property specified to be deleted is included in the structure of the CSS file 402 by including deletion designation information indicating that it is invalid in the
For example, the deletion designation information may be a description for commenting out a description of a specified property in the
例えばWebブラウザは、Webコンテンツ400を解釈してWebページを生成するにあたり、削除指定情報によりCSSファイル402において無効であることが示されているプロパティについては、CSSファイル402において記述されていないものとして処理を行う。従って、この場合のWebコンテンツ400は、CSSファイル402において削除指定情報により指定された未使用プロパティが実質的に削除されている場合と同等の処理効率によってWebページの生成を行うことが可能である。
For example, when the Web browser generates a Web page by interpreting the
ここで、本実施形態のように削除指定情報をCSSファイル402の構造に含めて未使用プロパティを削除する処理について「間接削除」と呼ぶ。一方、第1実施形態のようにCSSファイル402の構造から未使用プロパティを削除する処理については、「直接削除」と呼ぶ。 Here, the process of deleting the unused property by including the deletion designation information in the structure of the CSS file 402 as in the present embodiment is referred to as “indirect deletion”. On the other hand, processing for deleting unused properties from the structure of the CSS file 402 as in the first embodiment is referred to as “direct deletion”.
また、本実施形態のように間接削除が行われる場合、CSSファイル402においては、削除すべきことが指定された未使用プロパティは無効化された状態で残存している。このために、一旦削除してしまった未使用プロパティであっても、対応の削除指定情報を削除することで、CSSファイル402において記述されているものとして復元(有効化)させることが容易に行える。つまり、本実施形態においては、一旦削除した未使用プロパティについての削除の取り消しを容易に行うことができる。
In addition, when indirect deletion is performed as in the present embodiment, unused properties designated to be deleted remain in the
本実施形態において、上記のような未使用プロパティの削除の取り消しは、プロパティ編集画面に対するユーザの操作に応じて行われる。
図11は、本実施形態におけるプロパティ編集画面の一例を示している。なお、同図において図9と同一部分には同一符号を付して説明を省略する。
同図のプロパティ編集画面において、1つのリスト項目領域LNは、左から右にかけて、チェックボックスCHB、プロパティ領域PAR、削除日時領域TARが配置される。
In the present embodiment, cancellation of unused property deletion as described above is performed in response to a user operation on the property editing screen.
FIG. 11 shows an example of a property editing screen in the present embodiment. In the figure, the same parts as those in FIG.
In the property editing screen shown in FIG. 10, in one list item area LN, a check box CHB, a property area PAR, and a deletion date / time area TAR are arranged from left to right.
チェックボックスCHBは、対応のプロパティ領域PARにて示される未使用プロパティが、無効化の対象として選択されているか否かを示す。チェックボックスCHBにおいては、操作に応じてチェックマークの表示、非表示が切り替わる。チェックボックスCHBにチェックマークが付されて(表示されて)いれば、対応の未使用プロパティが無効化の対象として選択されていることを示す。チェックボックスCHBにチェックマークが付されていなければ、対応の未使用プロパティが無効化の対象として選択されていないことを示す。
また、リスト項目領域LNのうちで、グレーアウトしていない状態のリスト項目領域LNは、対応の未使用プロパティが有効であることを示し、グレーアウトの状態のリスト項目領域LNは、対応の未使用プロパティが無効化されている状態にあることを示す。
削除日時領域TARは、対応のプロパティ領域PARにて示される未使用プロパティが無効化された日時を示す。
The check box CHB indicates whether or not an unused property indicated in the corresponding property area PAR is selected as an invalidation target. In the check box CHB, the check mark is switched between display and non-display according to the operation. If a check mark is added (displayed) to the check box CHB, it indicates that the corresponding unused property is selected as the object to be invalidated. If the check box CHB is not checked, it indicates that the corresponding unused property has not been selected as an invalidation target.
In addition, among the list item areas LN, the list item area LN that is not grayed out indicates that the corresponding unused property is valid, and the list item area LN that is grayed out is the corresponding unused property. Indicates that is in a disabled state.
The deletion date / time area TAR indicates the date / time when the unused property indicated in the corresponding property area PAR is invalidated.
まず、同図に示すプロパティ編集画面上で未使用プロパティを無効化する操作の一例について説明する。
プロパティ編集画面において、無効化されていない未使用プロパティに対応するリスト項目領域LNにおけるチェックボックスCHBにはチェックマークが付されていない。
ユーザは、チェックボックスCHBにはチェックマークが付されていないリスト項目領域LNのうちから、新たに無効化させたい未使用プロパティに対応するリスト項目領域LNを選ぶ。ユーザは、選んだリスト項目領域LNにおけるチェックボックスCHBにチェックマークを付す操作を行う。この際、ユーザは、リスト項目領域LNにおけるチェックボックスCHBにチェックマークを付すことができる。つまり、ユーザは、新たに無効化させたい未使用プロパティとして複数を指定できる。そして、ユーザは、上記のようにチェックボックスCHBにチェックマークを付す操作を行うと、次に削除ボタンBT1に対する操作を行う。
なお、チェックボックスCHBにチェックマークを付す操作や削除ボタンBT1に対する操作などは、表示部102がタッチパネルとして構成されている場合には、チェックボックスCHB、削除ボタンBT1の領域に対するタップ操作などであればよい。
First, an example of an operation for invalidating unused properties on the property editing screen shown in FIG.
In the property editing screen, the check box CHB in the list item area LN corresponding to the unused property that has not been invalidated is not checked.
The user selects a list item area LN corresponding to an unused property to be newly invalidated from among the list item areas LN that are not checked in the check box CHB. The user performs an operation of adding a check mark to the check box CHB in the selected list item area LN. At this time, the user can add a check mark to the check box CHB in the list item area LN. That is, the user can specify a plurality of unused properties that are to be newly invalidated. When the user performs an operation for adding a check mark to the check box CHB as described above, the user then performs an operation on the delete button BT1.
The operation for adding a check mark to the check box CHB and the operation for the delete button BT1 are, for example, a tap operation for the area of the check box CHB and the delete button BT1 when the
削除ボタンBT1に対する操作に応じて、チェックボックスCHBにチェックマークが付されたリスト項目領域LNに対応する未使用プロパティがCSSファイル402において無効化される。つまり、CSSファイル402において、選択されていたリスト項目領域LNに対応する未使用プロパティについての削除指定情報が付加される。
In accordance with the operation on the delete button BT1, unused properties corresponding to the list item area LN in which the check box CHB is checked are invalidated in the
また、上記のように削除ボタンBT1が操作されると、チェックボックスCHBにチェックマークが付されたリスト項目領域LNはグレーアウトした状態に変化し、無効化されたことを示す。 Further, when the delete button BT1 is operated as described above, the list item area LN with the check mark added to the check box CHB changes to a grayed-out state, indicating that it is invalidated.
未使用プロパティ無効化の操作の一具体例として、図11の場合であれば、ユーザは、リスト項目領域LN1、LN2、LN3のうちからチェックボックスCHBにチェックマークが付されていないリスト項目領域LN2を選択することができる。
ユーザは、リスト項目領域LN2のチェックボックスCHBに対してチェックマークを付す操作を行ったうえで、削除ボタンBT1に対する操作を行う。
上記の操作に応じて、リスト項目領域LN2に対応する未使用プロパティはCSSファイル402において無効化される。また、リスト項目領域LN2は、図11におけるリスト項目領域LN1、LN3と同様にグレーアウトの状態に変化する。
As a specific example of the unused property invalidation operation, in the case of FIG. 11, the user can select the list item area LN2 in which the check box CHB is not checked from the list item areas LN1, LN2, and LN3. Can be selected.
The user performs an operation on the delete button BT1 after performing an operation of adding a check mark to the check box CHB of the list item area LN2.
In accordance with the above operation, the unused property corresponding to the list item area LN2 is invalidated in the
次に、同図に示すプロパティ編集画面において、削除された状態にあった未使用プロパティをCSSファイル402に復元(有効化)させるための操作(削除取消操作)の一例について説明する。
この場合、ユーザは、プロパティ編集画面において、グレーアウトによって無効化された状態であることが示されているリスト項目領域LNのうちから、無効化を取り消したい未使用プロパティに対応するリスト項目領域LNを選ぶ。具体例として、ここではユーザが、図11のプロパティ編集画面においてグレーアウトの状態となっているリスト項目領域LN1、LN3のうち、リスト項目領域LN1を選んだ場合を例に挙げる。
ユーザは、選んだリスト項目領域LN1におけるチェックボックスCHBに付されているチェックマークを外す操作を行う。そのうえで、ユーザは、削除取消ボタンBT3に対する操作を行う。
なお、上記の例では1つのリスト項目領域LNにおけるチェックマークを外す操作を行っているが、ユーザは、複数のリスト項目領域LNのそれぞれにおけるチェックボックスCHBに対してチェックマークを外す操作を行うことができる。
Next, an example of an operation (deletion canceling operation) for restoring (validating) an unused property that has been deleted in the CSS file 402 on the property editing screen illustrated in FIG.
In this case, the user selects a list item area LN corresponding to an unused property whose invalidation is to be canceled from among the list item areas LN indicated to be invalidated by grayout on the property editing screen. Choose. As a specific example, here, a case where the user selects the list item area LN1 among the list item areas LN1 and LN3 which are grayed out on the property editing screen of FIG.
The user performs an operation of removing the check mark attached to the check box CHB in the selected list item area LN1. In addition, the user performs an operation on the deletion cancel button BT3.
In the above example, the operation of removing the check mark in one list item area LN is performed, but the user performs the operation of removing the check mark from the check box CHB in each of the plurality of list item areas LN. Can do.
削除取消ボタンBT3に対する操作に応じて、チェックマークが外されたリスト項目領域LN1に対応する未使用プロパティは、CSSファイル402に存在するものとして復元(有効化)される。このとき、CSSファイル402においては、選択されていたリスト項目領域LNに対応するプロパティについて付加されていた削除指定情報が削除される。
In response to an operation on the delete cancel button BT3, the unused property corresponding to the list item area LN1 from which the check mark is removed is restored (validated) as existing in the
また、上記のように未使用プロパティの有効化が行われると、リスト項目領域LN1は、これまでのグレーアウトの状態からグレーアウトしていない状態に変化し、CSSファイル402において有効な状態であることを示す。
In addition, when the unused property is validated as described above, the list item area LN1 changes from the gray out state so far to the non-gray out state, indicating that the
また、本実施形態におけるプロパティ編集画面に対しては、削除ボタンBT1または削除取消ボタンBT3の操作を行う前の段階において、以下のような操作も可能である。
つまり、ユーザは、或るリスト項目領域LNについてはチェックマークを付して無効化対象として指定する操作を行う。その一方で、他の或るリスト項目領域LNについてはチェックマークを外して復元対象として指定する操作を行うことができる。
上記のような操作の具体例として、図11のプロパティ編集画面に対して、リスト項目領域LN1におけるチェックボックスCHBのチェックマークを外し、一方でリスト項目領域LN2におけるチェックボックスCHBにチェックマークを新たに付す操作を行った場合について説明する。
In addition, the following operations can be performed on the property editing screen in the present embodiment before the operation of the delete button BT1 or the delete cancel button BT3.
That is, the user performs an operation of adding a check mark to a certain list item area LN and designating it as an invalidation target. On the other hand, for some other list item area LN, an operation of removing the check mark and designating it as a restoration target can be performed.
As a specific example of the above operation, the check box CHB in the list item area LN1 is unchecked on the property editing screen in FIG. 11, while a check mark is newly added to the check box CHB in the list item area LN2. The case where the operation to attach is performed will be described.
図12は、上記のように図11のプロパティ編集画面に対してリスト項目領域LN1におけるチェックマークを外し、リスト項目領域LN2にチェックマークを新たに付す操作を行った場合のプロパティ編集画面を示している。
同図に示されるプロパティ編集画面の状態のもとで、削除ボタンBT1がユーザによって操作された場合には、新たにチェックマークが付されたリスト項目領域LN2に対応する未使用プロパティがCSSファイル402において無効化される。
また、プロパティ編集画面は、同図の状態から、リスト項目領域LN2が新たにグレーアウトした状態に変化し、対応の未使用プロパティが無効化されていることを示す。
FIG. 12 shows a property editing screen when the check mark in the list item area LN1 is removed from the property editing screen in FIG. 11 and a check mark is newly added to the list item area LN2 as described above. Yes.
When the delete button BT1 is operated by the user under the state of the property editing screen shown in the figure, an unused property corresponding to the list item area LN2 newly added with a check mark is displayed in the
In addition, the property editing screen changes from the state shown in the figure to a state in which the list item area LN2 is newly grayed out, indicating that the corresponding unused property is invalidated.
また、同図に示されるプロパティ編集画面の状態のもとで、削除取消ボタンBT3がユーザによって操作された場合には、チェックマークが外されたリスト項目領域LN1に対応する未使用プロパティがCSSファイル402において復元される。
また、プロパティ編集画面は、同図の状態から、リスト項目領域L1がグレーアウトの状態からグレーアウトしていない状態に変化し、対応の未使用プロパティがCSSファイル402において有効であることが示される。
Also, when the user has operated the delete cancel button BT3 under the state of the property editing screen shown in the figure, the unused property corresponding to the list item area LN1 with the check mark removed is displayed in the CSS file. Restored at 402.
In addition, the property editing screen changes from the state shown in the figure to the state in which the list item area L1 is grayed out to not grayed out, indicating that the corresponding unused property is valid in the
このように、本実施形態においては、CSSファイル402における未使用プロパティの削除について間接削除とすることにより、未使用プロパティの削除の取り消し(有効化)を簡単な操作で行うことが可能になる。また、削除を取り消す処理についても、CSSファイル402における削除取消対象のプロパティに付加された削除指定情報を削除するという簡易なものでよい。
As described above, in the present embodiment, by deleting the unused property in the CSS file 402 as an indirect deletion, it becomes possible to cancel (enable) the deletion of the unused property with a simple operation. Also, the deletion canceling process may be as simple as deleting the deletion designation information added to the deletion target property in the
[処理手順例]
図13のフローチャートを参照して、本実施形態におけるコンテンツ分析装置100が実行する処理手順例について説明する。なお、同図において図10と同様の処理となるステップについては同一符号を付して説明を省略し、主に図10との相違点について説明する。
同図においては、図10のステップS109、S111、S112に代えて、ステップS109A、S111A、S112Aが実行される。また、同図の処理は、ステップS121〜S123の各処理を含む。
[Example of processing procedure]
With reference to the flowchart of FIG. 13, an example of a processing procedure executed by the
In FIG. 10, steps S109A, S111A, and S112A are executed instead of steps S109, S111, and S112 in FIG. Moreover, the process of the same figure includes each process of step S121-S123.
同図において、ステップS101〜S108は図10と同様の処理となる。
そして、ステップS109Aにおいて、編集画面表示制御部1141は、図11にて説明したように、リスト項目領域LNにおけるチェックボックスCHBへのチェックマークの表示及びグレーアウト表示の有無によりプロパティごとに無効化された状態にあるか否かが反映されたプロパティ編集画面を表示部102に表示させる。
このために、編集画面表示制御部1141は、例えば以下の処理を実行する。つまり、編集画面表示制御部1141は、ステップS108にて作成された未使用プロパティリストごとに対応するリスト項目領域LNを表示する。
本実施形態の場合、未使用プロパティリストに含まれる未使用プロパティは、CSSファイル402において削除指定情報が付加されていたか否かを示す削除指定情報フラグが付与されている。
そこで、編集画面表示制御部1141は、削除指定情報が付加されていたことを示す削除指定情報フラグが付与されている未使用プロパティに対応するリスト項目領域LNについては、チェックボックスCHBにチェックマークを表示させる。また、編集画面表示制御部1141は、削除指定情報フラグが付与されている未使用プロパティに対応するリスト項目領域LNについて、上記のチェックボックスCHBへのチェックマークの表示とともに、グレーアウトの状態で表示させる。
また、プロパティ編集画面における削除日時領域TARについては、削除指定情報に削除日時が含められるようにしたうえで、編集画面表示制御部1141が、削除指定情報から取得した削除日時を利用して表示を行えばよい。
In FIG. 10, steps S101 to S108 are the same as those in FIG.
In step S109A, as described with reference to FIG. 11, the edit screen
For this purpose, the edit screen
In this embodiment, the unused property included in the unused property list is given a deletion designation information flag indicating whether or not deletion designation information has been added in the
Therefore, the edit screen
The deletion date / time area TAR on the property editing screen is displayed by using the deletion date / time acquired by the editing screen
また、ステップS110においてプロパティ削除指示操作の行われたことが判定された場合(ステップS110−YES)、プロパティ削除部114における削除処理部1142は、以下の処理を実行する。つまり、削除処理部1142は、プロパティ編集画面上で削除対象として選択されていたプロパティがCSSファイル402において無効であることを示す削除指定情報をCSSファイル402に付加する(ステップS111A)。
If it is determined in step S110 that a property deletion instruction operation has been performed (step S110-YES), the
次に、編集画面表示制御部1141は、ステップS111Aにより削除指定情報が付加されたプロパティについて、無効化された状態であることが示されるようにプロパティ編集画面を変更する(ステップS112A)。
具体的に、編集画面表示制御部1141は、削除指定情報が付加されたプロパティに対応するリスト項目領域LNについて、チェックボックスCHBにチェックマークが表示される状態に変更するとともに、グレーアウトの状態に変更する。
Next, the edit screen
Specifically, the edit screen
ステップS112Aの処理を終了した場合、あるいはステップS110においてプロパティ削除指示操作が行われなかったことが判定された場合(ステップS110−NO)、削除処理部1142は、削除取消指示操作が行われたか否かについて判定する(ステップS121)。
ステップS121において判定対象とされる削除取消指示操作は、プロパティ編集画面上で削除取消対象のプロパティを選択し、選択されたプロパティの削除取消を指示する操作である。
削除取消対象のプロパティを選択する操作は、前述のように、プロパティ編集画面上で、無効化された状態にある未使用プロパティのうちから削除取消対象の未使用プロパティに対応するリスト項目領域LNのチェックボックスCHBに対してチェックマークを外す操作である。
また、削除取消対象として選択されたプロパティの削除取消を指示する操作は、削除取消ボタンBT3をタッチする操作である。
When the process of step S112A is completed, or when it is determined in step S110 that the property deletion instruction operation has not been performed (step S110-NO), the
The deletion cancellation instruction operation to be determined in step S121 is an operation of selecting a deletion cancellation target property on the property editing screen and instructing deletion cancellation of the selected property.
As described above, the operation for selecting the property to be deleted is performed in the list item area LN corresponding to the unused property to be deleted from the unused properties in the invalidated state on the property editing screen. This is an operation to remove the check mark from the check box CHB.
Further, the operation for instructing the deletion cancellation of the property selected as the deletion cancellation target is an operation of touching the deletion cancellation button BT3.
削除取消指示操作が行われたことが判定された場合(ステップS121−YES)、削除処理部1142は、削除取消対象として選択されたプロパティに対応する削除指定情報をCSSファイル402から削除する(ステップS122)。
When it is determined that a deletion cancellation instruction operation has been performed (YES in step S121), the
次に、編集画面表示制御部1141は、ステップS122により削除指定情報が削除されたプロパティについて、無効化されていない状態であることが示されるようにプロパティ編集画面を変更する(ステップS123)。
具体的に、編集画面表示制御部1141は、削除指定情報が削除されたプロパティに対応するリスト項目領域LNについて、チェックボックスCHBに表示されていたチェックマークを非表示とするとともに、グレーアウトしていない状態に変更する。
この場合の編集画面表示制御部1141は、ステップS123の処理を終了した後、あるいは削除取消指示操作が行われなかったことが判定された場合(ステップS121−NO)、ステップS113によりプロパティ削除の編集終了が指示されたか否かについて判定する。
Next, the edit screen
Specifically, the edit screen
In this case, the edit screen
上記のような処理によって、未使用プロパティの削除としてCSSファイル402に削除指定情報を付加する間接削除が実現されるとともに、削除取消指示操作に応じて、一旦無効化された未使用プロパティをCSSファイル402に戻すことができる。 Through the processing described above, indirect deletion that adds deletion designation information to the CSS file 402 as deletion of unused properties is realized, and unused properties that have been invalidated once in response to a deletion cancellation instruction operation are realized. 402 can be returned.
なお、プロパティ削除部114について、第1実施形態に対応する直接削除によるプロパティの削除を行う直接削除モードと、本実施形態に対応する間接削除によるプロパティの削除を行う間接削除モードとで切り替えが行われるように構成してもよい。切り替えは、ユーザの操作によって行えるようにすればよい。
Note that the
<第3実施形態>
先の第1実施形態及び第2実施形態においては、プロパティ編集画面に対する操作によりユーザによって選択された未使用プロパティをCSSファイル402から削除するように構成されている。
これに対して、本実施形態においては、プロパティ削除部114が、未使用プロパティ検出部113による未使用プロパティの検出に応じて、検出された未使用プロパティをCSSファイル402から削除するように構成される。
このような構成であれば、ユーザが特に操作を行わなくとも、静的Webページと動的Webページとのいずれにも使用されない未使用プロパティを自動で削除することができる。
なお、上記の構成の場合には、未使用プロパティ検出部113により検出された未使用プロパティの全てがCSSファイル402から削除される。しかし、未使用プロパティは、静的Webページと動的Webページとのいずれにも使用されておらず、現状では不要なプロパティである。従って、全ての未使用プロパティがCSSファイル402から削除されても、生成に支障が生じるWebページは無く、特に問題にはならない。
<Third Embodiment>
In the first embodiment and the second embodiment, the unused property selected by the user by the operation on the property editing screen is deleted from the
In contrast, in the present embodiment, the
With such a configuration, an unused property that is not used for either a static Web page or a dynamic Web page can be automatically deleted without any user operation.
In the case of the above configuration, all unused properties detected by the unused
本実施形態におけるコンテンツ分析装置100の場合、図8に示したプロパティ削除部114における編集画面表示制御部1141については省略されてよい。
In the case of the
図14のフローチャートを参照して、本実施形態におけるコンテンツ分析装置100が実行する処理手順例について説明する。なお、図10と同様の処理となるステップについては同一符号を付して説明を省略する。
同図において、ステップS101〜S107は、図10と同様の処理となる。
そして、プロパティ削除部114における削除処理部1142は、ステップS107による未使用プロパティの検出に応じて、検出された未使用プロパティをWebコンテンツ400のCSSファイル402から削除する(ステップS111B)。
With reference to the flowchart of FIG. 14, an example of a processing procedure executed by the
In FIG. 10, steps S101 to S107 are the same processing as in FIG.
Then, the
そして、この場合の削除処理部1142は、ステップS111Bにより未使用プロパティの削除が行われると、以下のようにステップS114の処理を実行する。
つまり、削除処理部1142は、ステップS114による編集後のWebコンテンツ400をWebサーバ200に送信することで、Webサーバ200において記憶されるWebコンテンツ400を編集後の内容に更新させる。
If the unused property is deleted in step S111B, the
That is, the
このような処理によって、ユーザがプロパティを削除する操作を行うことなく、未使用プロパティが削除されたCSSファイル402を有するWebコンテンツ400を得ることができる。
By such processing, the
なお、上記の構成では、削除処理部1142は、ステップS107により検出された全ての未使用プロパティをCSSファイル402から削除している。しかし、例えば削除処理部1142は、ステップS107により検出された未使用プロパティのうちから所定の条件を満たす未使用プロパティを削除対象として選択したうえで、選択した削除対象の未使用プロパティをCSSファイル402から削除してもよい。つまり、未使用プロパティのうちの一部がCSSファイル402から削除されるようにしてもよい。
In the above configuration, the
また、図14の処理は、第1実施形態と同様に直接削除により削除対象のプロパティをCSSファイル402から削除する場合に対応する。しかし、本実施形態においても間接削除によるプロパティの無効化が行われてもよい。この場合、図14におけるステップS111Bの処理に代えて、削除処理部1142が、未使用プロパティに対応する削除指定情報をCSSファイル402に付加する処理を行うように構成すればよい。
14 corresponds to a case where the property to be deleted is deleted from the CSS file 402 by direct deletion, as in the first embodiment. However, in this embodiment, the property may be invalidated by indirect deletion. In this case, instead of the processing of step S111B in FIG. 14, the
<第4実施形態>
続いて、第4実施形態について説明する。第1実施形態のように直接削除によりCSSファイル402から未使用プロパティを削除した場合、例えばWebコンテンツ400において削除済みのプロパティに関する情報は存在していない。この場合、どのプロパティが削除されたのかを特定することが困難であることから、削除済みのプロパティを復元することは容易ではない。
しかし、コンテンツ分析装置100がプロパティの削除に関する履歴を示す削除履歴情報を管理するようにすれば、直接削除により未使用プロパティが削除されたCSSファイル402であっても、削除履歴情報を利用して一旦削除されたプロパティを復元することが容易に可能となる。
<Fourth embodiment>
Subsequently, a fourth embodiment will be described. When unused properties are deleted from the CSS file 402 by direct deletion as in the first embodiment, for example, there is no information regarding deleted properties in the
However, if the
図15は、本実施形態におけるコンテンツ分析装置100の構成例を示している。なお、図3と同一部分については同一符号を付して説明を省略する。
同図に示すように、本実施形態におけるコンテンツ分析装置100は、削除履歴情報記憶部104をさらに備える。削除履歴情報記憶部104は、削除履歴情報を記憶する。
削除履歴情報は、例えば、これまでに削除されたプロパティの記述ごとに、CSSファイル402における記述位置、削除日時などを対応付けた構造を有する。
FIG. 15 shows a configuration example of the
As shown in the figure, the
The deletion history information has, for example, a structure in which a description position in the
本実施形態におけるプロパティの削除の取り消しは、第2実施形態と同様にプロパティ編集画面に対する操作によって行われればよい。また、プロパティ編集画面の態様及びプロパティ編集画面に対するプロパティの削除及び削除取消指示操作も、図11及び図12による説明と同様でよい。 Cancellation of property deletion in the present embodiment may be performed by an operation on the property editing screen as in the second embodiment. Further, the mode of the property editing screen and the property deletion / deletion canceling operation for the property editing screen may be the same as described with reference to FIGS.
図16のフローチャートを参照して、本実施形態におけるコンテンツ分析装置100が実行する処理手順例について説明する。なお、同図において図10と同様の処理となるステップについては同一符号を付して説明を省略する。同図においては、ステップS131〜S135の各処理を含む。
An example of a processing procedure executed by the
同図において、ステップS101〜S111の処理は、図10と同様となる。
ステップS111により削除対象として選択されたプロパティがCSSファイル402から削除される。
次に、編集画面表示制御部1141は、ステップS111により削除されたプロパティについて、削除された状態であることが示されるようにプロパティ編集画面を変更する(ステップS112C)。
具体的に、編集画面表示制御部1141は、削除されたプロパティに対応するリスト項目領域LNについて、グレーアウトの状態に変更する。
ステップS112Cによる削除結果に応じたプロパティ編集画面の変更とともに以下の処理が実行される。
つまり、削除処理部1142は、ステップS111による未使用プロパティの削除結果が反映されるように、プロパティ削除履歴情報を更新する(ステップS131)。つまり、削除処理部1142は、今回削除された未使用プロパティに関する情報をプロパティ削除履歴情報に登録する。
In the same figure, the process of step S101-S111 becomes the same as that of FIG.
The property selected as the deletion target in step S111 is deleted from the
Next, the edit screen
Specifically, the edit screen
The following processing is executed along with the change of the property editing screen according to the deletion result in step S112C.
That is, the
ステップS131の処理を終了した場合、あるいはステップS110においてプロパティ削除指示操作が行われなかったことが判定された場合(ステップS110−NO)、削除処理部1142は、削除取消指示操作が行われたか否かについて判定する(ステップS132)。
When the process of step S131 is completed, or when it is determined in step S110 that the property deletion instruction operation has not been performed (NO in step S110), the
削除取消指示操作が行われたことが判定された場合(ステップS132−YES)、削除処理部1142は、削除取消対象として選択された未使用プロパティの情報(プロパティの記述、記述位置)を削除履歴情報から取得する。そして、取得した未使用プロパティの情報を利用して、未使用プロパティをCSSファイル402に復元する(ステップS133)。
When it is determined that a deletion cancellation instruction operation has been performed (YES in step S132), the
次に、削除処理部1142は、ステップS133による未使用プロパティの復元結果が反映されるように、プロパティ削除履歴情報を更新する(ステップS134)。このために、削除処理部1142は、例えば復元された未使用プロパティに関する情報を削除履歴情報から削除する。あるいは、削除処理部1142は、削除履歴情報における復元された未使用プロパティに関する情報に、復元された状態にあることを示す状態フラグを格納してもよい。このように状態フラグを用いる場合、例えば一旦復元された未使用プロパティを再度削除する場合には、削除処理部1142は、削除された状態にあることを示す状態フラグを格納すればよい。
Next, the
また、編集画面表示制御部1141は、ステップS133による復元結果が反映されるようにプロパティ編集画面を変更する(ステップS135)。つまり、編集画面表示制御部1141は、ステップS133により復元されたプロパティに対応するリスト項目領域LNがグレーアウトしていない状態に変化するようにプロパティ編集画面を変更する。
Also, the edit screen
ステップS135の処理を終了した後、あるいは削除取消指示操作が行われなかったことが判定された場合(ステップS132−NO)、編集画面表示制御部1141は、ステップS113によりプロパティ削除の編集終了が指示されたか否かについて判定する。
After the process of step S135 is completed or when it is determined that the deletion cancel instruction operation has not been performed (NO in step S132), the edit screen
このような処理によって、直接削除により未使用プロパティをCSSファイル402から削除する場合においても、未使用プロパティの削除の取り消しを容易に実現することが可能になる。
なお、本実施形態のように削除履歴情報を利用する構成は、第3実施形態のようにユーザが未使用プロパティを削除するための操作を行うことなくCSSファイル402から未使用プロパティが削除される場合にも適用できる。
By such processing, even when an unused property is deleted from the CSS file 402 by direct deletion, it is possible to easily cancel the deletion of the unused property.
In the configuration using deletion history information as in the present embodiment, unused properties are deleted from the CSS file 402 without the user performing an operation for deleting the unused properties as in the third embodiment. It can also be applied to cases.
また、本実施形態のように削除履歴情報を利用する構成は、第2実施形態のように間接削除によって未使用プロパティを無効化する構成のもとでも適用できる。
この場合、例えば未使用プロパティの無効化の状態が反映されたプロパティ編集画面の表示にあたっては削除履歴情報を利用することができる。そのうえで、CSSファイル402において削除指定情報を付加あるいは削除することで未使用プロパティを削除、復元を行うように構成することができる。また、CSSファイル402における未使用プロパティの復元については、削除指定情報の削除によって簡単な処理で行うことができる。
Further, the configuration using the deletion history information as in the present embodiment can be applied even under a configuration in which unused properties are invalidated by indirect deletion as in the second embodiment.
In this case, for example, the deletion history information can be used to display the property editing screen in which the invalid property invalidation state is reflected. In addition, an unused property can be deleted and restored by adding or deleting deletion designation information in the
なお、上述のコンテンツ分析装置100としての機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより上述のコンテンツ分析装置100としての処理を行ってもよい。ここで、「記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行する」とは、コンピュータシステムにプログラムをインストールすることを含む。ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、インターネットやWAN、LAN、専用回線等の通信回線を含むネットワークを介して接続された複数のコンピュータ装置を含んでもよい。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。このように、プログラムを記憶した記録媒体は、CD−ROM等の非一過性の記録媒体であってもよい。また、記録媒体には、当該プログラムを配信するために配信サーバからアクセス可能な内部または外部に設けられた記録媒体も含まれる。配信サーバの記録媒体に記憶されるプログラムのコードは、端末装置で実行可能な形式のプログラムのコードと異なるものでもよい。すなわち、配信サーバからダウンロードされて端末装置で実行可能な形でインストールができるものであれば、配信サーバで記憶される形式は問わない。なお、プログラムを複数に分割し、それぞれ異なるタイミングでダウンロードした後に端末装置で合体される構成や、分割されたプログラムのそれぞれを配信する配信サーバが異なっていてもよい。さらに「コンピュータ読み取り可能な記録媒体」とは、ネットワークを介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。また、上記プログラムは、上述した機能の一部を実現するためのものであってもよい。さらに、上述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。
Note that a program for realizing the functions as the above-described
100 コンテンツ分析装置、101 制御部、102 表示部、103 操作部、104 削除履歴情報記憶部、111 文書解析部、112 対応関係特定部、113 未使用プロパティ検出部、114 プロパティ削除部、200 Webサーバ、300 ネットワーク、400 Webコンテンツ、401 HTMLファイル、402 CSSファイル、403 JavaScriptファイル、501 DOMツリー、502 CSSスタイルルール、600 レンダーツリー、601 タグ群、602 プロパティ群、700 対応関係リスト、800 原文対応プロパティリスト、900 未使用プロパティリスト、1111 HTMLファイル解析部、1112 CSSファイル解析部、1121 レンダーツリー生成部、1122 対応関係リスト作成部、1131 リスト作成部、1132 比較処理部、1141 編集画面表示制御部、1142 削除処理部、LN リスト項目領域、PAR プロパティ領域、CHB チェックボックス、BT ボタン、TAR 削除日時領域
DESCRIPTION OF
Claims (10)
構造化文書と前記構造化文書における要素についての装飾を指定する装飾指定情報とを含むコンテンツを対象として、前記コンテンツを構成する静的単位コンテンツと動的単位コンテンツとのそれぞれに対応する前記構造化文書の構造及び前記装飾指定情報の構造を解析する文書解析ステップと、
前記文書解析ステップにより解析された前記構造化文書の構造における要素と前記装飾指定情報の構造における装飾制御属性との対応関係を特定する対応関係特定ステップと、
前記対応関係特定ステップにより前記構造化文書の構造における要素と対応関係のあることが特定された前記装飾指定情報の構造における装飾制御属性と、前記装飾指定情報における装飾制御属性とを比較した結果に基づいて、前記装飾指定情報における装飾制御属性のうちから、静的単位コンテンツと動的単位コンテンツとのいずれにも使用されていない未使用装飾制御属性を検出する未使用装飾制御属性検出ステップと
を実行させるためのプログラム。 On the computer,
The structured data corresponding to each of the static unit content and the dynamic unit content constituting the content, for a content including the structured document and decoration designating information for designating decoration for an element in the structured document. A document analysis step for analyzing the structure of the document and the structure of the decoration designation information;
A correspondence specifying step for specifying a correspondence between an element in the structure of the structured document analyzed by the document analysis step and a decoration control attribute in the structure of the decoration designation information;
As a result of comparing the decoration control attribute in the structure of the decoration designation information identified as having a correspondence with the element in the structure of the structured document by the correspondence identification step and the decoration control attribute in the decoration designation information Based on the decoration control attribute in the decoration designation information, an unused decoration control attribute detection step for detecting an unused decoration control attribute that is not used for either static unit content or dynamic unit content. A program to be executed.
をさらに実行させるための請求項1に記載のプログラム。 The said computer is further made to perform the decoration control attribute deletion step which deletes all or one part of the unused decoration control attributes detected by the said unused decoration control attribute detection step from the said decoration designation | designated information. Program.
請求項2に記載のプログラム。 The program according to claim 2, wherein the decoration control attribute deletion step deletes a description corresponding to an unused decoration control attribute to be deleted in the decoration designation information.
請求項2に記載のプログラム。 The program according to claim 2, wherein the decoration control attribute deletion step adds deletion designation information indicating that an unused decoration control attribute to be deleted is invalid in the decoration designation information to the structure of the decoration designation information.
請求項4に記載のプログラム。 The decoration control attribute deletion step deletes the deletion designation information added to the structure of the decoration designation information so that the unused decoration control attribute deleted from the decoration designation information is restored in the decoration designation information. The program according to claim 4.
請求項2から5のいずれか一項に記載のプログラム。 The decoration control attribute deletion step is performed according to an operation of designating an unused decoration control attribute to be deleted from the unused decoration control attributes detected by the unused decoration control attribute detection step. The program according to any one of claims 2 to 5, wherein an unused decoration control attribute is deleted from the decoration designation information.
請求項2から5のいずれか一項に記載のプログラム。 The decoration control attribute deletion step deletes all or part of the detected unused decoration control attribute from the decoration designation information in response to detection of the unused decoration control attribute by the unused decoration control attribute detection step. Item 6. The program according to any one of Items 2 to 5.
請求項2から7のいずれか一項に記載のプログラム。 In the decoration control attribute deletion step, the unused decoration control attribute deleted from the decoration designation information is replaced with the decoration designation information based on deletion history information indicating a history of deletion of unused decoration control attributes from the decoration designation information. The program according to any one of claims 2 to 7, wherein the program is restored in step (a).
前記文書解析部により解析された前記構造化文書の構造における要素と前記装飾指定情報の構造における装飾制御属性との対応関係を特定する対応関係特定部と、
前記対応関係特定部により前記構造化文書の構造における要素と対応関係のあることが特定された前記装飾指定情報の構造における装飾制御属性と、前記装飾指定情報における装飾制御属性とを比較した結果に基づいて、前記装飾指定情報における装飾制御属性のうちから、静的単位コンテンツと動的単位コンテンツとのいずれにも使用されていない未使用装飾制御属性を検出する未使用装飾制御属性検出部と
を備えるコンテンツ分析装置。 The structured data corresponding to each of the static unit content and the dynamic unit content constituting the content, for a content including the structured document and decoration designating information for designating decoration for an element in the structured document. A document analysis unit for analyzing the structure of the document and the structure of the decoration designation information;
A correspondence specifying unit that specifies a correspondence between an element in the structure of the structured document analyzed by the document analysis unit and a decoration control attribute in the structure of the decoration designation information;
As a result of comparing the decoration control attribute in the structure of the decoration designation information identified as having a correspondence with the element in the structure of the structured document by the correspondence relation identification unit and the decoration control attribute in the decoration designation information Based on the decoration control attribute in the decoration designation information, an unused decoration control attribute detection unit that detects an unused decoration control attribute that is not used for either static unit content or dynamic unit content. A content analysis apparatus provided.
前記文書解析ステップにより解析された前記構造化文書の構造における要素と前記装飾指定情報の構造における装飾制御属性との対応関係を特定する対応関係特定ステップと、
前記対応関係特定ステップにより前記構造化文書の構造における要素と対応関係のあることが特定された前記装飾指定情報の構造における装飾制御属性と、前記装飾指定情報における装飾制御属性とを比較した結果に基づいて、前記装飾指定情報における装飾制御属性のうちから、静的単位コンテンツと動的単位コンテンツとのいずれにも使用されていない未使用装飾制御属性を検出する未使用装飾制御属性検出ステップと
を含むコンテンツ分析方法。 The structured data corresponding to each of the static unit content and the dynamic unit content constituting the content, for a content including the structured document and decoration designating information for designating decoration for an element in the structured document. A document analysis step for analyzing the structure of the document and the structure of the decoration designation information;
A correspondence specifying step for specifying a correspondence between an element in the structure of the structured document analyzed by the document analysis step and a decoration control attribute in the structure of the decoration designation information;
As a result of comparing the decoration control attribute in the structure of the decoration designation information identified as having a correspondence with the element in the structure of the structured document by the correspondence identification step and the decoration control attribute in the decoration designation information Based on the decoration control attribute in the decoration designation information, an unused decoration control attribute detection step for detecting an unused decoration control attribute that is not used for either static unit content or dynamic unit content. Including content analysis methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015049449A JP2016170592A (en) | 2015-03-12 | 2015-03-12 | Program, content analyzer, and content analyzing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015049449A JP2016170592A (en) | 2015-03-12 | 2015-03-12 | Program, content analyzer, and content analyzing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2016170592A true JP2016170592A (en) | 2016-09-23 |
Family
ID=56983882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015049449A Pending JP2016170592A (en) | 2015-03-12 | 2015-03-12 | Program, content analyzer, and content analyzing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2016170592A (en) |
-
2015
- 2015-03-12 JP JP2015049449A patent/JP2016170592A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11023834B2 (en) | Collaborative design systems, apparatuses, and methods | |
JP3857663B2 (en) | Structured document editing apparatus, structured document editing method and program | |
US20180293307A1 (en) | User driven computerized selection, categorization, and layout of live content components | |
US9047261B2 (en) | Document editing method | |
JP2020530610A (en) | Editing the database while previewing a virtual web page | |
US20130019189A1 (en) | Augmented editing of an online document | |
US10657323B2 (en) | Method of preparing documents in markup languages | |
US20020124115A1 (en) | Filter based authoring tool | |
US20150309993A1 (en) | Agile Enterprise Globalization | |
US20040268231A1 (en) | Content template system | |
JP2003345717A (en) | Method and device for reediting and redistributing web document | |
JP2004005568A (en) | Updating of high-speed gui style of legacy application | |
JP6390793B2 (en) | Information processing apparatus, information processing method, information processing program, information processing system, and non-transitory computer-readable information recording medium | |
CN103631877A (en) | Webpage table processing method | |
CN106663083A (en) | Web browser policy for HTTP-based application | |
US6775805B1 (en) | Method, apparatus and program product for specifying an area of a web page for audible reading | |
JPWO2005098660A1 (en) | Document processing apparatus and document processing method | |
JPH1040236A (en) | Hypertext document processor with comments | |
US10114617B2 (en) | Rapid visualization rendering package for statistical programming language | |
JP5858479B2 (en) | Terminal device and program | |
JP5393242B2 (en) | Data providing method and intermediate server device | |
JP2005011055A (en) | Electronic form designing and managing method and device, processing program and recording medium | |
JP2008203965A (en) | Method and program for creating web page | |
JP2016170592A (en) | Program, content analyzer, and content analyzing method | |
JP2006107079A (en) | Information processor, web page browsing method and web page browsing program |