JP2003330915A - Stylesheet processing device - Google Patents

Stylesheet processing device

Info

Publication number
JP2003330915A
JP2003330915A JP2002138174A JP2002138174A JP2003330915A JP 2003330915 A JP2003330915 A JP 2003330915A JP 2002138174 A JP2002138174 A JP 2002138174A JP 2002138174 A JP2002138174 A JP 2002138174A JP 2003330915 A JP2003330915 A JP 2003330915A
Authority
JP
Japan
Prior art keywords
style
rule set
style sheet
information
degree
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
Application number
JP2002138174A
Other languages
Japanese (ja)
Inventor
Daisaku Suzuki
大作 鈴木
Yoshikazu Kobayashi
義和 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002138174A priority Critical patent/JP2003330915A/en
Publication of JP2003330915A publication Critical patent/JP2003330915A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To solve problems that complicated determination of an order of priority is required depending on a description pattern, and a problem such as decrease of a processing speed in obtaining style information in carrying out display or print is apprehended, in processing a style sheet described in a stylesheet language for expressing a presentation style of contents of a document. <P>SOLUTION: Style information of the analysis result of the style sheet is controlled with a single table instead of tables for respective authors. A priority order level by including respective pieces of information such as the level of importance, a sheet value, limitation and an import order level in each style piece of information is calculated and kept. When the style information is acquired in executing display or print, the process can be simplified and accelerated by comparison of the priority order levels. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、ドキュメントのプ
レゼンテーションスタイルを定義したスタイルシートの
処理および検索を行うスタイルシート処理装置に関する
ものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a style sheet processing device for processing and searching a style sheet defining a presentation style of a document.

【0002】[0002]

【従来の技術】近年、Web技術の発展に伴い、インタ
ーネットを利用したサービスは急速に普及しつつある。
現在、インターネット上のWebで管理するドキュメン
トのデータはHTML(Hyper Text Mar
kup Language)で記述したコンテンツがほ
とんどである。このコンテンツを表示や印刷などを行う
装置において処理する場合、各装置が、コンテンツに記
述されたタグや文字列などのプレゼンテーションスタイ
ルを決定し表示や印刷を行っていた。しかし、同じコン
テンツを異なる装置で処理したときにその表現が異なる
などの弊害が生じる。そこで、ドキュメントのコンテン
ツ記述言語であるHTMLとは別に、ドキュメントのプ
レゼンテーションスタイルを記述するためのスタイルシ
ート言語としてCSS(Cascading STYL
E Sheets)が考え出された。CSSは、199
6年W3C(World Wide Web Cons
ortium)勧告として制定され、その後XMLドキ
ュメントに対するスタイル指定機能を含んだCSS2
(Cascading STYLE Sheets、L
evel 2)が制定されている。また、CSSやCS
S2以外にも、W3C勧告として制定されたXSLT
(Extensible Style Languag
e Transformations)があり、XSL
Tでは、HTMLドキュメント以外の、ユーザ定義の要
素で記述されたドキュメントに対するプレゼンテーショ
ンスタイルの定義が可能となっている。
2. Description of the Related Art In recent years, along with the development of Web technology, services using the Internet are rapidly spreading.
Currently, the data of documents managed on the Web on the Internet is HTML (Hyper Text Mar).
Most of the contents are described in kup Language). When this content is processed by a device that displays or prints, each device determines a presentation style such as a tag or a character string described in the content and displays or prints it. However, when the same content is processed by different devices, there arises an adverse effect such as different expression. Therefore, apart from HTML which is the content description language of the document, CSS (Cascading STYL) is used as a style sheet language for describing the presentation style of the document.
E Sheets) was devised. CSS is 199
6 years W3C (World Wide Web Cons)
ortium) CSS2 that was established as a recommendation and then included a style specification function for XML documents.
(Cascading STYLE Sheets, L
level 2) has been established. In addition, CSS and CS
In addition to S2, XSLT established as a W3C recommendation
(Extensible Style Language
e Transformations), XSL
In T, it is possible to define a presentation style for documents described by user-defined elements other than HTML documents.

【0003】CSS2はドキュメントのプレゼンテーシ
ョンスタイル(例えば、フォント、文字のサイズ・カラ
ーなど)を構造化されたドキュメントとして記述するこ
とを可能とするスタイルシート言語である。ドキュメン
トのプレゼンテーションスタイルをドキュメントのコン
テンツから分離することによって、Webオーサリング
とサイト維持管理を単純化することが可能となる。
CSS2 is a style sheet language that makes it possible to describe the presentation style (for example, font, character size / color, etc.) of a document as a structured document. By separating the presentation style of the document from the content of the document, it is possible to simplify web authoring and site maintenance.

【0004】CSS2では、予め規約化された文法に基
づき記述したスタイルシートによりドキュメントのプレ
ゼンテーションスタイルを指定する。このスタイルシー
トの記述では、スタイルの具体的な情報を記述するルー
ルセットの記述や、重要度の指定を行う!import
antの記述、外部スタイルシートのインポート指定を
行う@importの記述などが可能であり、更にこれ
らのスタイルシートをUser/Author/Def
aultなどの著者ごとに指定を行うカスケードが可能
である。以下にこれらの記述方法について具体的に説明
する。
In CSS2, a presentation style of a document is designated by a style sheet described based on a grammar standardized in advance. In this style sheet description, a rule set describing specific style information is specified and the importance is specified! import
It is possible to describe ant, description of @import that specifies import of external style sheet, etc. Furthermore, these style sheets can be described in User / Author / Def.
It is possible to make a cascade for each author such as “ault”. These description methods will be specifically described below.

【0005】まず、ルールセットの記述について説明す
る。CSS2では、プレゼンテーションスタイルの定義
をセレクタと宣言部の組み合わせによるルールセットに
より記述する。セレクタは、プレゼンテーションスタイ
ルを適用するコンテンツ中の対象となる要素を指定する
もので、その記述は図1に示すような様々なパターン
(ユニバーサルセレクタ[*]、タイプセレクタ
[E]、IDセレクタ[E#myid]など)が用意さ
れ、複雑な木構造となるドキュメントへの対応も可能と
している。宣言部は、前記セレクタにより指定された要
素に適用するスタイルを指定するもので、その記述は図
2に示すようなプロパティ名とプロパティ値の組み合わ
せによる。
First, the description of the rule set will be described. In CSS2, the definition of the presentation style is described by a rule set that is a combination of a selector and a declaration part. The selector designates a target element in the content to which the presentation style is applied, and its description is described in various patterns (universal selector [*], type selector [E], ID selector [E]. #Myid] etc. are prepared, and it is possible to deal with documents having a complicated tree structure. The declaration part specifies a style to be applied to the element specified by the selector, and its description is based on the combination of the property name and the property value as shown in FIG.

【0006】例えば、フォントファミリーの名称208
の指定において、ドキュメントのコンテンツの全ての要
素にsans−serifという共通のフォントファミ
リーを適用したい場合と、H1要素のフォントファミリ
ーにfantasyを適用したい場合、次のような指定
を行う。
For example, the name 208 of the font family
In the designation of, when it is desired to apply a common font family called sans-serif to all elements of the content of the document, and when want to apply fantasy to the font family of the H1 element, the following designation is performed.

【0007】* {font−family: san
s−serif;} H1 {font−family: fantas
y;} 前記の例のうち第1のルールセットでは、セレクタのパ
ターンとして全ての要素を表すユニバーサルセレクタ1
01を使用し、宣言部としてフォントファミリーのプロ
パティ名であるfont−family208とそのプ
ロパティ値であるsans−serifを指定してい
る。第2のルールセットでは、セレクタのパターンとし
てH1要素を表すタイプセレクタ102を使用し、宣言
部としてフォントファミリーのプロパティ名であるfo
nt−family208とそのプロパティ値であるf
antasyを指定している。
* {Font-family: san
s-serif;} H1 {font-family: fantas
y;} In the first rule set of the above examples, the universal selector 1 representing all elements as the selector pattern
01 is used to specify font-family property name font-family208 and its property value sans-serif as the declaration part. In the second rule set, the type selector 102 representing the H1 element is used as the selector pattern, and the declaration part fo, which is the property name of the font family, is used.
nt-family 208 and its property value f
"antassy" is specified.

【0008】第1のルールセットでは、セレクタのパタ
ーンとして全ての要素を表すユニバーサルセレクタ10
1を使用しているためH1要素を含んだ全ての要素のフ
ォントファミリーは指定されたsans−serifが
適用されることを意味する。第2のルールセットでは、
セレクタのパターンとしてH1の要素を表すタイプセレ
クタ102を使用しているためH1要素のフォントファ
ミリーは指定されたfantasyが適用されることを
意味する。
In the first rule set, the universal selector 10 that represents all elements as a selector pattern.
Since 1 is used, the font family of all elements including the H1 element means that the specified sans-serif is applied. In the second rule set,
Since the type selector 102 representing the H1 element is used as the selector pattern, the font family of the H1 element means that the specified fantasy is applied.

【0009】第1のルールセットと第2のルールセット
の両方を含むスタイルシートを同一のドキュメントのコ
ンテンツへのプレゼンテーションスタイルとして指定し
た場合、H1のフォントファミリーの指定が重複するこ
とになる。
When a style sheet including both the first rule set and the second rule set is designated as the presentation style for the content of the same document, the font families of H1 are duplicated.

【0010】このように、セレクタのパターンの指定方
法によってはプレゼンテーションスタイルを適用する対
象となる要素の指定が重複することになるため、CSS
2では各パターン間の優先順位を取り決めている。その
結果前記の例では、ユニバーサルセレクタ101よりも
タイプセレクタ102が優先順位が高いため、最終的に
決定されるH1要素のフォントファミリーはfanta
syとなる。
As described above, depending on the method of designating the selector pattern, the designation of the element to which the presentation style is applied may be duplicated.
In 2, the priorities among the patterns are arranged. As a result, in the above example, since the type selector 102 has a higher priority than the universal selector 101, the font family of the H1 element finally determined is fanta.
It becomes sy.

【0011】次に、スタイルシートのカスケードについ
て説明する。ドキュメントのプレゼンテーションスタイ
ルの指定は、ドキュメントのコンテンツを作成した著作
者(以降Authorと記載)の指定と、ドキュメント
のコンテンツを表示するユーザ(以降Userと記載)
の指定(例えばブラウザなどの表示ツールの設定を変更
することにより指定)と、表示ツールのデフォルト(以
降Defaultと記載)として指定する3つの形態が
考えられる。これらの指定は、Authorだけのよう
な1つの形態での指定や、AuthorとUserのよ
うな複数の形態の組み合わせによる指定が想定され、ま
たドキュメントの表示形態によっては前記3つ以外の形
態が存在しそれらを含めた組み合わせによる指定も想定
される。
Next, the style sheet cascade will be described. The presentation style of a document is specified by the author who created the content of the document (hereinafter referred to as Author) and the user who displays the content of the document (hereinafter described as User).
(For example, by changing the setting of the display tool such as a browser) and as the default of the display tool (hereinafter, referred to as Default) can be considered. These designations are assumed to be designations in one form such as Author only, or designations in combination of a plurality of forms such as Author and User, and there are forms other than the above three depending on the display form of the document. However, specification by a combination including them is also assumed.

【0012】例えば、Authorの指定とUserの
指定にそれぞれ以下のようなルールセットの指定が含ま
れていた場合について説明する。
For example, a case will be described in which the designation of the Author and the designation of the User include the following rule set designations, respectively.

【0013】H1 {font−family: fa
ntasy;} H1 {font−family: cursiv
e;} 前記の例のうち第1のルールセットでは、セレクタのパ
ターンとしてH1の要素を表すタイプセレクタ102を
使用し、宣言部としてフォントファミリーのプロパティ
名であるfont−family207とそのプロパテ
ィ値であるfantasyを指定している。第2のルー
ルセットでは、セレクタのパターンとしてH1要素を表
すタイプセレクタ102を使用し、宣言部としてフォン
トファミリーのプロパティ名であるfont−fami
ly207とそのプロパティ値であるcursiveを
指定している。
H1 {font-family: fa
ntasy;} H1 {font-family: cursiv
e;} In the first rule set of the above examples, the type selector 102 representing the element of H1 is used as the selector pattern, and the font family property name font-family207 and its property value are used as the declaration part. "Fantasy" is specified. In the second rule set, the type selector 102 representing the H1 element is used as the selector pattern, and the font-family property name, font-fami, is used as the declaration part.
ly207 and its property value, cursive, are specified.

【0014】第1のルールセットでは、セレクタのパタ
ーンとしてHI要素を表すタイプセレクタ102を使用
しているためH1要素のフォントファミリーは指定され
たfantasyが適用されることを意味する。第2の
ルールセットでは、セレクタのパターンとしてH1の要
素を表すタイプセレクタ102を使用しているためH1
要素のフォントファミリーは指定されたcursive
が適用されることを意味する。
In the first rule set, since the type selector 102 representing the HI element is used as the selector pattern, it means that the specified fantasy is applied to the font family of the H1 element. In the second rule set, since the type selector 102 representing the element of H1 is used as the selector pattern, H1
The font family of the element is the specified cursive
Means that applies.

【0015】第1のルールセットを含むAuthorの
スタイルシートと第2のルールセットを含むUserの
スタイルシートの両方を同一のドキュメントのコンテン
ツへのプレゼンテーションスタイルとして指定した場
合、H1のフォントファミリーの指定が重複することに
なる。
When both the author style sheet including the first rule set and the User style sheet including the second rule set are designated as the presentation style for the content of the same document, the designation of the font family of H1 is made. It will overlap.

【0016】このように、複数の形態のスタイルシート
の組み合わせによってはプレゼンテーションスタイルを
適用する対象となる要素の指定が重複することになるた
め、CSS2では各形態によるスタイルシート間の優先
順位を取り決めている。その結果前記の例では、Use
rよりもAuthorが優先順位が高いため、最終的に
決定されるH1要素のフォントファミリーはfanta
syとなる。
As described above, depending on the combination of style sheets of a plurality of forms, the designation of the element to which the presentation style is applied overlaps. Therefore, in CSS2, the priority order among the style sheets of each form is determined. There is. As a result, in the above example, Use
Since Author has a higher priority than r, the font family of the H1 element that is finally determined is fanta.
It becomes sy.

【0017】次に、重要度の指定を行う!import
antについて説明する。AuthorとUserのス
タイルシート間の優先順位は、前述したようにUser
よりもAuthorが優先順位が高い。しかし、次に示
すような!importantのルールを適用すること
によりこのカスケードのルールを逆転することが可能で
ある。
Next, the degree of importance is designated! import
The ant will be described. As mentioned above, the priority order between the Author and User style sheets is User.
Auth has a higher priority than Auth. But like this! It is possible to reverse the rules of this cascade by applying the rules of important.

【0018】例えば、AuthorとUserのそれぞ
れのスタイルシートに以下のような記述があった場合に
ついて説明する。
For example, a case will be described in which the following description is made in each style sheet of Author and User.

【0019】H1 {font−family: fa
ntasy;} H1 {font−family: cursive
!important;} 前記の例のうち第1のルールセットでは、セレクタのパ
ターンとしてH1の要素を表すタイプセレクタ102を
使用し、宣言部としてフォントファミリーのプロパティ
名であるfont−family207とそのプロパテ
ィ値であるfantasyを指定している。第2のルー
ルセットでは、セレクタのパターンとしてH1要素を表
すタイプセレクタ102を使用し、宣言部としてフォン
トファミリーのプロパティ名であるfont−fami
ly207とそのプロパティ値であるcursiveを
指定している。
H1 {font-family: fa
ntasy;} H1 {font-family: cursive
!! important;} In the first rule set of the above examples, the type selector 102 that represents the element of H1 is used as the selector pattern, and the font family property name “font-family” 207 and its property value are used as the declaration part. "Fantasy" is specified. In the second rule set, the type selector 102 representing the H1 element is used as the selector pattern, and the font-family property name, font-fami, is used as the declaration part.
ly207 and its property value, cursive, are specified.

【0020】第1のルールセットでは、セレクタのパタ
ーンとしてHI要素を表すタイプセレクタ102を使用
しているためH1要素のフォントファミリーは指定され
たfantasyが適用されることを意味する。第2の
ルールセットでは、セレクタのパターンとしてH1の要
素を表すタイプセレクタ102を使用しているためH1
要素のフォントファミリーは指定されたcursive
が適用されることを意味する。
In the first rule set, since the type selector 102 representing the HI element is used as the selector pattern, the font family of the H1 element means that the specified fantasy is applied. In the second rule set, since the type selector 102 representing the element of H1 is used as the selector pattern, H1
The font family of the element is the specified cursive
Means that applies.

【0021】第1のルールセットを含むAuthorの
スタイルシートと第2のルールセットを含むUserの
スタイルシートの両方を同一のドキュメントのコンテン
ツへのプレゼンテーションスタイルとして指定した場
合、H1のフォントファミリーの指定が重複することに
なるが、AuthorのスタイルシートのほうがUse
rのスタイルシートよりも優先順位が高いため、H1要
素のフォントファミリーは指定されたfantasyが
適用される。しかし、第2のルールセットの記述にある
ように!important指定を行った場合、スタイ
ルシート間の優先順位が逆転しH1要素のフォントファ
ミリーは指定されたcursiveが適用されることに
なる。
When both the Author style sheet including the first rule set and the User style sheet including the second rule set are designated as the presentation style for the content of the same document, the designation of the font family of H1 is made. Although it will be duplicated, Author's style sheet is Use
Since the priority is higher than that of the r style sheet, the specified fantasy is applied to the font family of the H1 element. But as described in the second ruleset! When the important is designated, the priority order between the style sheets is reversed, and the designated cursive is applied to the font family of the H1 element.

【0022】次に、スタイルシート中で外部のスタイル
シートをインポートするための指定である@impor
tについて説明する。Author/User/Def
aultの各スタイルシートでは、ルールセットの記述
を複数のスタイルシートに分割して記述し、あるスタイ
ルシートでは他のスタイルシートをインポートして参照
するといった方法が可能である。
Next, @impor which is a specification for importing an external style sheet in the style sheet
t will be described. Author / User / Def
In each of the default style sheets, the description of the rule set may be divided into a plurality of style sheets and described, and in one style sheet, another style sheet may be imported and referred to.

【0023】例えばAuthorのスタイルシート中に
以下の記述があった場合について説明する。
For example, a case where the following description is included in the author style sheet will be described.

【0024】@import “mystyle.cs
s” @import url{“mystyle.cs
s”} 前記の例のうち第1の記述では、Authorのスタイ
ルシートとして外部ファイルmystyle.cssを
インポートしてルールセットとして適用するよう指定す
るものである。第2の記述は外部ファイルをURL指定
で記述できる点以外は第1の記述と同様である。このよ
うに、@import指定で外部のファイルをインポー
トした場合、インポートする側のルールセットの記述と
インポートされる側のルールセットの記述が重複する可
能性があり、そのような場合はインポートする側の記述
が優先されることが取り決めてある。
@Import "mystyle.cs"
s "@import url {" mystyle. cs
s ″} In the first description of the above example, the external file mystyle.css is imported as the author's style sheet and is designated to be applied as a rule set. The second description is the URL designation of the external file. It is the same as the first description, except that it can be described in step 1. In this way, when an external file is imported by specifying @import, the description of the rule set on the importing side and the description of the rule set on the importing side are There is a possibility of duplication, and in such cases, it is agreed that the description on the importing side will take precedence.

【0025】表示や印刷などを行う装置では、上述した
ような記述方法により記述されたスタイルシートを解析
し、記述された情報をルールセット情報として保存し、
このルールセット情報を検索して表示や印刷などを行う
ことになる。
In the device for displaying and printing, the style sheet described by the above-described description method is analyzed and the described information is saved as rule set information.
This ruleset information is searched and displayed or printed.

【0026】図3は従来のスタイルシート処理装置例の
構造を示しており、ドキュメントのコンテンツに適用す
るプレゼンテーションスタイルとしてCSS2で記述し
たスタイルシートの処理を行う。従来のスタイルシート
処理装置は、Author/User/Default
のいずれかのスタイルシートの形態を表すスタイルシー
ト識別子を入力するためのスタイルシート入力手段30
1、前記スタイルシート入力手段301により入力され
たスタイルシートを解析するスタイルシート解析手段3
02、前記スタイルシート入力手段301により入力さ
れたスタイルシート識別子からスタイルシートの種別を
判定するスタイルシート種別判定手段303、前記スタ
イルシート解析手段302でスタイルシートを解析し、
ルールセット情報を作成し、前記スタイルシート種別判
定手段303による判定に基づきAuthorルールセ
ットテーブル305/Userルールセットテーブル3
06/Defaultルールセットテーブル307のい
ずれかのルールセットテーブルにルールセット情報を登
録するルールセット情報作成手段304、ドキュメント
のコンテンツを表示あるいは印刷する処理において、コ
ンテンツのプレゼンテーションスタイルを適用する対象
となる要素のスタイル情報を取得するために、その要素
情報とスタイル情報格納先アドレスを指定するスタイル
情報取得手段311、Authorルールセットテーブ
ル305/Userルールセットテーブル306/De
faultルールセットテーブル307の全てのルール
セットテーブルを検索するルールセット検索手段30
8、前記ルールセット検索手段308で検索されたスタ
イル情報の重複をチェックする重複チェック手段30
9、重複していた場合にはどのスタイル情報を適用する
かを決定する優先順位判定手段310により構成され
る。
FIG. 3 shows the structure of an example of a conventional style sheet processing apparatus, which processes a style sheet described in CSS2 as a presentation style applied to the contents of a document. A conventional style sheet processing device is an Author / User / Default.
Style sheet input means 30 for inputting a style sheet identifier representing one of the style sheet forms
1. Style sheet analysis means 3 for analyzing the style sheet input by the style sheet input means 301
02, a style sheet type determination unit 303 that determines the style sheet type from the style sheet identifier input by the style sheet input unit 301, and a style sheet analysis unit 302 that analyzes the style sheet,
Rule set information is created, and based on the judgment by the style sheet type judging means 303, the Author rule set table 305 / User rule set table 3
Rule set information creating means 304 for registering rule set information in any of the rule set tables of the 06 / Default rule set table 307, an element to which the presentation style of the content is applied in the process of displaying or printing the content of the document Information acquisition means 311 for designating the element information and the style information storage destination address for acquiring the style information of the user, the Author rule set table 305 / User rule set table 306 / De
Rule set search means 30 for searching all the rule set tables of the fault rule set table 307
8. Duplication check means 30 for checking duplication of style information retrieved by the rule set retrieval means 308
9. If there is an overlap, the priority determination means 310 determines which style information to apply.

【0027】[0027]

【発明が解決しようとする課題】上述したように、ドキ
ュメントのプレゼンテーションスタイルを記述したスタ
イルシートを処理する場合、図3に示すような従来のス
タイルシート処理において、ルールセット情報作成手段
304で作成するルールセット情報は、著者ごとに異な
るルールセットテーブルに格納していたため、表示や印
刷などの際にドキュメントのコンテンツに適用するプレ
ゼンテーションスタイルを取得する際、ルールセット検
索手段308においてルールセットテーブルを切り替え
て検索しなければならないため、処理速度の低下を招く
ことが懸念されていた。
As described above, when processing a style sheet describing the presentation style of a document, the rule set information creating means 304 creates the style sheet in the conventional style sheet processing as shown in FIG. Since the rule set information is stored in the rule set table that is different for each author, the rule set search means 308 switches the rule set table when acquiring the presentation style applied to the content of the document at the time of displaying or printing. Since it has to be searched, there was a concern that the processing speed would be reduced.

【0028】また、ルールセット情報作成手段304で
作成するルールセット情報は、Authorルールセッ
トテーブル305/Userルールセットテーブル30
6/Defaultルールセットテーブル307のどの
形態として入力されたスタイルシートに記述されていた
ものかを表す情報を含んでいないため、重複チェック手
段309において重複しているスタイル情報があるかを
チェックし、重複している場合は優先順位判定手段31
0でそれぞれの形態の優先順位を判定し、スタイル情報
を決定しなければならないため、処理速度の低下を招く
ことが懸念されていた。
The rule set information created by the rule set information creating means 304 is the author rule set table 305 / User rule set table 30.
6 / Default rule set table 307 does not include information indicating which form was described in the style sheet input, so the duplication checking unit 309 checks whether there is duplicate style information, If they overlap, priority determination means 31
Since the priority of each form must be determined with 0 to determine the style information, there was a concern that the processing speed would be reduced.

【0029】また、ルールセット情報作成手段304で
作成するルールセット情報は、!importantで
指定された場合のAuthorとUserの優先順位の
逆転を表す情報を含んでいないため、表示や印刷などの
際にドキュメントのコンテンツに適用するプレゼンテー
ションスタイルを取得する際、AuthorとUser
の優先順位の逆転による判定ができないという問題があ
った。
The rule set information created by the rule set information creating means 304 is! Since it does not include the information indicating the inversion of the priority of Author and User when specified by important, when acquiring the presentation style to be applied to the content of the document at the time of display or printing, Author and User are used.
There was a problem that it was not possible to make a judgment by reversing the priority order of.

【0030】また、ルールセット情報作成手段304で
作成するルールセット情報は、@importを使用し
た場合のインポートする側とインポートされる側の相関
関係を表す情報を含んでいないため、表示や印刷などの
際にドキュメントのコンテンツに適用するプレゼンテー
ションスタイルを取得する際、インポートする側とイン
ポートされる側の相関関係に基づく優先順位の判定がで
きないという問題があった。
Further, since the rule set information created by the rule set information creating means 304 does not include the information indicating the correlation between the importing side and the importing side when @import is used, display or printing is performed. In this case, when acquiring the presentation style applied to the content of the document, there is a problem that the priority order cannot be determined based on the correlation between the importing side and the importing side.

【0031】また、ルールセット情報作成手段304で
作成したルールセット情報を登録したAuthorルー
ルセットテーブル305/Userルールセットテーブ
ル306/Defaultルールセットテーブル307
の各ルールセットテーブルは、ルールセット情報が登録
された順番あるいは不定な順番で登録されているため、
ルールセット検索手段308で検索する際には全てのル
ールセット情報を検索しスタイル情報を決定しなければ
ならないため、処理速度の低下を招くことが懸念されて
いた。
An Author rule set table 305 / User rule set table 306 / Default rule set table 307 in which the rule set information created by the rule set information creating means 304 is registered.
Since each rule set table of is registered in the order in which the rule set information is registered or in an indeterminate order,
When searching by the rule set search means 308, it is necessary to search all the rule set information and determine the style information, which has been a concern that the processing speed may be reduced.

【0032】以上、スタイルシートの記述方法について
個々に説明してきたが、これらの記述方法では相互に更
に優先順位が設けられており、それらの相関関係は、イ
ンポート順位度<限定度<シート値<重要度の順で優先
順位が高くなる。従って、優先順位判定手段310では
これらの相関関係に基づき判定を行わなければならない
ため、複雑な処理による処理速度の低下が懸念されてい
た。
Although the style sheet description methods have been described above individually, these description methods have mutual priorities, and the correlation between them is the import order degree <limitation degree <sheet value < The priority increases in the order of importance. Therefore, since the priority determination means 310 has to make a determination based on these correlations, there is a concern that the processing speed may decrease due to complicated processing.

【0033】本発明は、上記の事情を鑑みて提案された
ものであって、クライアントでスタイルシートの処理を
行う場合、複雑な優先順位の判定を行う必要があり、表
示や印刷などの際にドキュメントのコンテンツに適用す
るプレゼンテーションスタイルを取得する処理におけ
る、処理速度の低下の問題を解決するための必要な情報
の保持・管理方法に関するものである。
The present invention has been proposed in view of the above circumstances, and when the style sheet processing is performed by the client, it is necessary to determine a complicated priority order, and it is necessary to perform a display or a printing. The present invention relates to a method for holding and managing necessary information for solving the problem of a reduction in processing speed in the process of acquiring a presentation style applied to the content of a document.

【0034】[0034]

【課題を解決するための手段】第1の発明は、構造化さ
れた文書の表示や印刷を行う際のプレゼンテーションス
タイルを定義する言語で記述されたスタイルシートを処
理するスタイルシート処理装置において、スタイルシー
トを入力するスタイルシート入力手段と、上記スタイル
シート入力手段により入力されたスタイルシートを解析
するスタイルシート解析手段と、上記スタイルシート解
析手段によりセレクタを検出した場合にセレクタの種別
に対応した限定度を決定する限定度決定手段と、上記ス
タイルシート解析手段により宣言部を検出した場合にプ
ロパティ名とプロパティ値を抽出する宣言部抽出手段
と、上記宣言部抽出手段で抽出したプロパティ名とプロ
パティ値をもとにプロパティ情報を生成し、上記限定度
決定手段により決定した限定度を優先順位度として対応
付けてルールセット情報を生成し、ルールセットテーブ
ルに登録するルールセット情報作成手段と、上記ルール
セットテーブルのルールセット情報を検索し、スタイル
情報を取得するスタイル情報取得手段とを備えることを
特徴とする。
A first aspect of the present invention is a style sheet processing apparatus that processes a style sheet described in a language that defines a presentation style when displaying or printing a structured document. A style sheet input means for inputting a sheet, a style sheet analysis means for analyzing the style sheet input by the style sheet input means, and a limit degree corresponding to the type of selector when the selector is detected by the style sheet analysis means. A delimiter determining unit that determines a property name and a property value when the declarative unit is detected by the style sheet analyzing unit, and a property name and a property value that are extracted by the declarative unit extracting unit. Property information is generated based on the above, and determined by the above-mentioned limit determination means. The rule set information is generated by associating the limited degree with the priority degree as the priority degree, and the rule set information creating means for registering in the rule set table, and the style information for retrieving the style information by searching the rule set information in the rule set table And an acquisition unit.

【0035】第2の発明は、第1の発明において、解析
を行うスタイルシートに著者ごとに割り振ったシート値
を決定するシート値決定手段を備え、上記優先順位度に
上記シート値を含むことを特徴とする。
According to a second aspect of the present invention, in the first aspect, a sheet value determining means for determining a sheet value assigned to each author in a style sheet to be analyzed is provided, and the sheet value is included in the priority level. Characterize.

【0036】第3の発明は、第1の発明において、上記
宣言部抽出手段により宣言部に重要指定を検出した場合
に重要度の決定を行う重要度決定手段を備え、上記優先
順位度に上記重要度を含むことを特徴とする。
A third aspect of the present invention is the first aspect of the present invention, further comprising an importance degree determining means for determining an importance degree when the declaration portion extracting means detects an important designation in the declaration portion, and the priority degree is set to the above. It is characterized by including importance.

【0037】第4の発明は、第1の発明において、上記
スタイルシート解析手段によりインポート指定を検出し
た場合にインポート順位度を決定するインポート順位度
決定手段を備え、上記優先順位度にインポート順位度を
含むことを特徴とする。
In a fourth aspect based on the first aspect, there is provided an import ranking degree determining means for determining an import ranking degree when the style sheet analyzing means detects an import designation, and the priority ranking degree has an import ranking degree. It is characterized by including.

【0038】第5の発明は、第1の発明において、上記
ルールセット情報作成手段で作成したルールセットテー
ブルを、上記ルールセット情報の優先順位度を基準に降
順にソートするルールセットテーブルソート手段を備え
ることを特徴とする。
A fifth aspect of the present invention is the rule set table sorting means according to the first aspect, which sorts the rule set table created by the rule set information creating means in descending order based on the priority of the rule set information. It is characterized by being provided.

【0039】[0039]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面に基づいて説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.

【0040】図4は本発明の一実施の形態のスタイルシ
ート処理装置の構成図である。
FIG. 4 is a block diagram of a style sheet processing apparatus according to an embodiment of the present invention.

【0041】図4に示すように、スタイルシート処理装
置は、スタイルシートをその形態を表す識別子と共に入
力するためのスタイルシート入力手段401、前記スタ
イルシート入力手段401で入力されたスタイルシート
を解析するためのスタイルシート解析手段402、前記
スタイルシート解析手段402でスタイルシートを解析
する際に、入力されたスタイルシートの形態よりシート
値を決定するシート値決定手段410、前記スタイルシ
ート解析手段402でスタイルシートを解析する際に、
ルールセットのセレクタを抽出するセレクタ抽出手段4
03とセレクタ抽出手段403で抽出したセレクタの記
述パターンにより限定度を決定する限定度決定手段40
4、前記スタイルシート解析手段403でスタイルシー
トを解析する際に、ルールセットの宣言部を抽出する宣
言部抽出手段405、前記スタイルシート解析手段40
2でスタイルシートを解析する際に、重要指定(!im
portant)があった場合に重要指定を抽出する重
要指定抽出手段406と重要指定抽出手段406で抽出
した重要度指定に基づき重要度を決定する重要度決定手
段407、前記スタイルシート解析手段402でスタイ
ルシートを解析する際に、インポート指定(@impo
rt)があった場合にインポート指定を抽出するインポ
ート指定抽出手段408とインポート指定抽出手段40
8で抽出したインポート指定に基づきインポート順位度
を決定するインポート順位度決定手段409、前記スタ
イルシート解析手段402で解析した情報を元にルール
セット情報を作成するルールセット情報作成手段411
とルールセット情報に付加する優先順位度を決定する優
先順位度決定手段412、前記ルールセット情報作成手
段411で作成したルールセット情報を保存するための
ルールセットテーブル413、前記ルールセットテーブ
ル413を降順にソートするためのルールセットテーブ
ルソート手段414、表示や印刷などの際にドキュメン
トのコンテンツに適用するプレゼンテーションスタイル
を取得するためのスタイル情報取得手段416、前記ス
タイル情報取得手段416で指定された条件に基づき前
記ルールセットテーブル413を検索するルールセット
検索手段415、前記ルールセット検索手段415で取
得したプロパティ情報をもとにスタイル情報を作成する
スタイル情報作成手段417より構成される。
As shown in FIG. 4, the style sheet processing apparatus analyzes the style sheet input means 401 for inputting the style sheet together with the identifier indicating the form, and the style sheet input by the style sheet input means 401. For analyzing the style sheet by the style sheet analyzing means 402, a sheet value determining means 410 for determining a sheet value from the style of the input style sheet, and a style by the style sheet analyzing means 402. When analyzing the sheet,
Selector extraction means 4 for extracting the selector of the rule set
03 and the degree-of-limitation determining unit 40 that determines the degree of restriction based on the description pattern of the selector extracted by the selector extracting unit 403.
4. Declaration part extraction means 405 for extracting the declaration part of the rule set when the style sheet analysis means 403 analyzes the style sheet, and the style sheet analysis means 40
When you analyze the style sheet in 2, specify important (! Im
If there is a "portant", an important designation extraction unit 406 that extracts the important designation, an importance determination unit 407 that determines the importance based on the importance designation extracted by the important designation extraction unit 406, and a style by the style sheet analysis unit 402 When you analyze a sheet, specify import (@impo
rt), the import designation extracting unit 408 and the import designation extracting unit 40 that extract the import designation
Import rank degree determining means 409 for determining the import rank degree based on the import designation extracted in 8, and rule set information creating means 411 for generating rule set information based on the information analyzed by the style sheet analyzing means 402.
And the rule set table 413 for storing the rule set information created by the rule set information creating unit 411, and the rule set table 413 in descending order. Rule set table sorting means 414 for sorting into, the style information acquisition means 416 for acquiring the presentation style applied to the content of the document at the time of display or printing, and the conditions specified by the style information acquisition means 416. A rule set search means 415 for searching the rule set table 413 based on the rule set table 413, and a style information creation means 417 for creating style information based on the property information acquired by the rule set search means 415.

【0042】まず、スタイルシートを解析しルールセッ
ト情報を作成するまでの手順について説明する。
First, the procedure for analyzing the style sheet and creating the rule set information will be described.

【0043】まず、スタイルシートをAuthor/U
ser/Defaultのスタイル種別と共にスタイル
シート入力手段401により入力する。上記スタイルシ
ート入力手段401では、図11に示すように入力され
たスタイルシートの処理を行うための装置内データの初
期化処理(S101〜S102)を行う。
First, the style sheet is Author / U
It is input by the style sheet input unit 401 together with the style type of ser / Default. The style sheet input means 401 performs initialization processing (S101 to S102) of in-apparatus data for processing the style sheet input as shown in FIG.

【0044】入力されたスタイルシートはスタイルシー
ト解析手段402により解析され、記述内容に応じた処
理の振り分けが成される。上記スタイルシート解析手段
402の処理内容を図13の手順S301〜S312に
示す。S301では、シート値決定手段410にAut
hor/User/Defaultのスタイルシート種
別を通知し、対応したシート値(図5)を決定する(図
14の手順S401〜S409)。本実施の形態では、
この場合に使用するスタイルシート種別の値を図5の5
01〜503に示すようなシート値と同じ値を使用して
いるが、種別を識別できればどのような値でも構わな
い。
The input style sheet is analyzed by the style sheet analysis means 402, and the processing is sorted according to the description content. The processing contents of the style sheet analysis unit 402 are shown in steps S301 to S312 of FIG. In S301, the sheet value determination means 410 is set to Auto.
The style sheet type of hor / User / Default is notified, and the corresponding sheet value (FIG. 5) is determined (steps S401 to S409 in FIG. 14). In this embodiment,
The value of the style sheet type used in this case is 5 in FIG.
Although the same value as the sheet value shown in 01 to 503 is used, any value may be used as long as the type can be identified.

【0045】S302では文字列トークンの切り出しを
行い、トークンがセレクタと判断された場合(S30
3)、セレクタ抽出手段403に文字列を通知し、限定
度決定手段404により限定度の算出(図16の手順S
601〜S602)を行う。この時、上記限定度決定手
段404で算出する限定度は図1の101〜106に示
すような値である。
In S302, the character string token is cut out, and when it is determined that the token is the selector (S30
3), the selector extraction means 403 is notified of the character string, and the limitation degree determining means 404 calculates the limitation degree (step S in FIG. 16).
601 to S602) are performed. At this time, the degree of limitation calculated by the degree-of-limitation determining means 404 is a value as indicated by 101 to 106 in FIG.

【0046】トークンが宣言部と判断された場合(S3
04)、宣言部抽出手段405により図17のS701
〜S709の手順でプロパティ名とプロパティ値の抽出
と保存を行う。また、宣言部に!importantの
重要指定が含まれていた場合、重要指定抽出手段406
に処理を依頼し、重要度決定手段407により図19の
S901〜S907の手順により図7の701〜703
に示すような重要度の算出を行う。
When the token is judged to be the declaration section (S3
04), S701 of FIG. 17 by the declarative part extraction means 405.
The property name and the property value are extracted and stored in the procedure of steps S709 to S709. Also, in the declaration section! When the important designation of important is included, the important designation extraction means 406
Request processing, and the importance determining means 407 executes the steps S901 to S907 of FIG. 19 to the steps 701 to 703 of FIG.
The importance is calculated as shown in.

【0047】トークンが@importのインポート指
定と判断された場合、インポート指定抽出手段408に
より図20のS1001〜S1003の手順でインポー
ト順位度の決定を行う。その際の処理はインポート順位
度決定手段409にて図21の手順S1101〜S11
02に従い行われる。この時に算出されるインポート順
位度について図6を用い説明する。図6(a)のスタイ
ルシートのインポート例に示すように、ドキュメントの
コンテンツ601でスタイルシート1(602)とスタ
イルシート3(604)を順にリンクし、スタイルシー
ト1(602)でスタイルシート2(603)をインポ
ートしている場合、スタイルシート1〜スタイルシート
3の各インポート順位度は図6(b)に示すような値に
なる。
When it is determined that the token is the import designation of @import, the import designation extraction unit 408 determines the import ranking degree by the procedure of S1001 to S1003 of FIG. The processing at that time is performed by the import ranking degree determining unit 409 in steps S1101 to S11 of FIG.
02. The import rank calculated at this time will be described with reference to FIG. As shown in the style sheet import example of FIG. 6A, the style sheet 1 (602) and the style sheet 3 (604) are linked in order in the document content 601 and the style sheet 1 (602) is used in the style sheet 2 ( 603) is imported, the respective import rank degrees of style sheet 1 to style sheet 3 have values as shown in FIG. 6B.

【0048】上記に示すようなセレクタと宣言部、イン
ポート指定の処理が終了した時点で、ルールセット情報
作成手段411により図22のS1201〜S1205
の手順でルールセットテーブル413へのルールセット
情報の登録を行う。この時に作成するルールセット情報
について図8を用い説明する。
When the selector, declaration section, and import designation processing as described above are completed, the rule set information creating means 411 causes S1201 to S1205 in FIG.
The rule set information is registered in the rule set table 413 according to the procedure. The rule set information created at this time will be described with reference to FIG.

【0049】図8に示すように、ルールセットテーブル
801は、複数のルールセット情報802で構成され、
それぞれのルールセット情報802はリンク情報804
の前のルールセット情報へのポインタ810と後のルー
ルセット情報へのポインタ811により相互にリンクし
ており、それぞれのルールセット情報の相対位置は変更
可能である。上記ルールセット情報802は、宣言部に
記述されたプロパティ情報を保存するためのプロパティ
情報803と、優先順位度805により構成される。上
記プロパティ情報803はプロパティ名文字列のオフセ
ット位置806とプロパティ値文字列のオフセット位置
807、次のプロパティ情報へのポインタ808より構
成される。この場合のプロパティ名文字列のオフセット
位置806には、前記宣言部抽出手段405で手順S7
06により保存されたプロパティ名文字列を文字列バッ
ファ809に保存した後、そのオフセット位置が設定さ
れる。同様に、プロパティ値文字列のオフセット位置8
07には、手順S708により保存されたプロパティ値
文字列を文字列バッファ809に保存した後、そのオフ
セット位置が設定される。上記優先順位度805は、図
23のS1301〜S1305に示す手順により、前述
した重要度(図7の701〜703)を2ビットで表現
した値と、シート値(図5の501〜503)を2ビッ
トで表現した値と、限定度(図1の101〜106)を
10ビットで表現した値と、インポート順位度(図6
(a)の605〜607)を2ビットで表現した値によ
り構成される、合計16ビットで表現された値である。
16ビット中の各値の構成位置は、MSBより重要度8
12、シート値813、限定度814、インポート順位
度815の順に配置することにより、優先順位度805
の値が重要度>シート値>限定度>インポート順位度の
優先順位を表すことになる。本実施の形態では、優先順
位度805を16ビットで構成したが、ビット数を増や
すことも可能である。その場合、シート値813、限定
度814、インポート順位度815のそれぞれのビット
数も増やすことが可能であり、シート値813を増やし
た場合はスタイルシート処理装置で処理できるスタイル
シートの形態、限定度814を増やした場合は同装置で
処理できるセレクタのパターン、インポート順位度81
5を増やした場合はドキュメントのコンテンツからリン
クできるスタイルシート数を増やすことが可能である。
As shown in FIG. 8, the rule set table 801 is composed of a plurality of rule set information 802,
Each rule set information 802 is link information 804
Are linked to each other by a pointer 810 to the previous rule set information and a pointer 811 to the subsequent rule set information, and the relative position of each rule set information can be changed. The rule set information 802 is composed of property information 803 for storing the property information described in the declaration part and a priority level 805. The property information 803 includes an offset position 806 of the property name character string, an offset position 807 of the property value character string, and a pointer 808 to the next property information. At the offset position 806 of the property name character string in this case, the declarative part extraction means 405 performs the procedure S7.
After saving the property name character string saved by 06 in the character string buffer 809, its offset position is set. Similarly, the offset value of the property value string is 8
In 07, the offset value is set after the property value character string stored in step S708 is stored in the character string buffer 809. The priority level 805 is a value represented by 2 bits of the above-described importance level (701 to 703 in FIG. 7) and a sheet value (501 to 503 in FIG. 5) according to the procedure shown in S1301 to S1305 in FIG. A value represented by 2 bits, a limit degree (101 to 106 in FIG. 1) represented by 10 bits, and an import rank degree (see FIG. 6).
It is a value expressed by 16 bits in total, which is composed of a value expressed by 2 bits of (605) to (607) of (a).
The configuration position of each value in 16 bits is of importance 8 from the MSB.
12, the sheet value 813, the limit degree 814, and the import order degree 815 are arranged in this order to obtain the priority order 805.
Value represents the priority order of importance> sheet value>limitation> import rank. In the present embodiment, the priority level 805 is composed of 16 bits, but the number of bits can be increased. In that case, the number of bits of each of the sheet value 813, the limit degree 814, and the import rank degree 815 can be increased. When the sheet value 813 is increased, the style sheet form and the limit degree that can be processed by the style sheet processing apparatus can be increased. When the number of 814 is increased, the pattern of the selector that can be processed by the same device, the import rank degree 81
When the number is increased to 5, the number of style sheets that can be linked from the content of the document can be increased.

【0050】スタイルシート内に記述された全てのルー
ルセットについて、上記に示すような解析とルールセッ
トテーブル413へのルールセット情報802の登録を
繰り返し行った後、ルールセットテーブルソート手段4
14によりルールセット情報802のソートを行う。ソ
ートは、ルールセット情報802内の優先順位度805
を基準として降順にソートを行う。本実施例では、ソー
トのアルゴリズムとして一般的に使用されるクイックソ
ートを採用しているが、この他のアルゴリズムでも実現
可能である。ソートの結果、ルールセット情報802
は、最も優先順位が高いルールセットが先頭に位置し、
以降、優先順位が高い順に並ぶことになる。
After all the rule sets described in the style sheet are repeatedly analyzed and registered with the rule set information 802 in the rule set table 413, the rule set table sorting means 4 is executed.
The rule set information 802 is sorted according to 14. The sorting is performed by the priority level 805 in the rule set information 802.
Based on, sort in descending order. In this embodiment, quick sort which is generally used as a sorting algorithm is adopted, but other sorts of algorithms can be used. As a result of sorting, rule set information 802
Has the highest priority ruleset at the top,
After that, they are arranged in descending order of priority.

【0051】次に、表示や印刷を行う際に、ドキュメン
トのプレゼンテーションスタイルを取得する手順につい
て説明する。
Next, a procedure for acquiring the presentation style of a document when displaying or printing will be described.

【0052】スタイル情報取得手段416では、図9に
示すような要素情報と図10に示すようなスタイル情報
の格納先アドレスを指定し、図24のS1401〜S1
411に示す手順によりスタイル情報の取得を行う。
In the style information acquisition means 416, the element information as shown in FIG. 9 and the storage destination address of the style information as shown in FIG. 10 are designated, and S1401 to S1 in FIG.
The style information is acquired by the procedure shown in 411.

【0053】要素情報とスタイル情報の内容について図
9と図10を用い説明する。
The contents of the element information and style information will be described with reference to FIGS. 9 and 10.

【0054】図9(a)に示す要素情報901は、要素
名902と要素の属性情報903と擬似セレクタ情報9
04で構成される。要素名902は、ドキュメントのコ
ンテンツに記述される要素の名前を表し、要素の属性情
報903は要素に付随する属性の名前を表す属性名90
5と属性の値を表す属性値906、次の属性情報へのポ
インタ907より構成される。擬似セレクタ情報904
は、図9(b)の908〜910に示すような値を持つ
擬似セレクタのタイプを表す情報である。
The element information 901 shown in FIG. 9A is the element name 902, the element attribute information 903, and the pseudo selector information 9.
It is composed of 04. The element name 902 represents the name of the element described in the content of the document, and the element attribute information 903 represents the attribute name 90 representing the name of the attribute associated with the element.
5, an attribute value 906 representing the value of the attribute, and a pointer 907 to the next attribute information. Pseudo selector information 904
Is information indicating the type of the pseudo selector having values such as 908 to 910 in FIG. 9B.

【0055】図10に示すスタイル情報1001は、図
2に示した各プロパティ名のプロパティ値を取得し格納
するためのそれぞれの領域1002〜1016で構成さ
れる。なお、取得するプロパティ値の種別を増やす場合
は、上記スタイル情報1001の領域を増やすことによ
り対応可能である。
The style information 1001 shown in FIG. 10 is composed of respective areas 1002 to 1016 for acquiring and storing the property value of each property name shown in FIG. Note that the number of types of property values to be acquired can be increased by increasing the area of the style information 1001.

【0056】上記スタイル情報取得手段416では、上
記スタイル情報1001の先頭から取得するプロパティ
名を選択し、選択したプロパティ名と要素情報901を
指定しルールセット検索処理(手順S1406)を行
う。検索の結果、プロパティ名に該当するプロパティ値
が取得できた場合、該プロパティ値を上記スタイル情報
として保存するためにスタイル情報作成処理を行う(手
順S1410)。上記スタイル情報取得手段416で
は、上記スタイル情報1001の全てのプロパティにつ
いてこれらの処理を繰り返し行うことにより、スタイル
情報の取得を行うことが可能となる。
The style information acquisition means 416 selects a property name to be acquired from the beginning of the style information 1001 and specifies the selected property name and element information 901 to perform a rule set search process (step S1406). When the property value corresponding to the property name can be acquired as a result of the search, style information creation processing is performed to save the property value as the style information (step S1410). The style information acquisition unit 416 can acquire style information by repeating these processes for all properties of the style information 1001.

【0057】上記ルールセット検索処理(手順S140
6)の内容について更に詳しく説明する。ルールセット
検索処理(手順S1406)の内容を図25の手順S1
501〜S1511に示す。まず、ルールセットテーブ
ル413に登録された先頭のルールセット情報802を
取得し、ルールセット情報802の優先順位度805中
の限定度814と、指定された要素情報901を比較す
る。一致する場合、指定されたプロパティ名が該ルール
セット情報に含まれるかをチェックし、含まれている場
合はプロパティ名に該当するプロパティ値のアドレスを
取得し保存する。一致しない場合は、ルールセットテー
ブル413より次のルールセット情報802を取得し、
上記同様の比較を行い、ルールセットテーブル413の
ルールセット情報802を全て検索し終わるまで繰り返
し処理を行う。上記、限定度814と要素情報901の
比較では、例えば、限定度が1の場合はタイプセレクタ
を表すため、要素情報901の要素名902との比較を
行い、限定度が5の場合は:link擬似セレクタ、あ
るいは:visited擬似セレクタを表すため、要素
情報901の擬似セレクタ情報904との比較を行う、
といった処理を行う。
Rule set search processing (step S140)
The content of 6) will be described in more detail. The contents of the rule set search process (step S1406) are described in step S1 of FIG.
501 to S1511. First, the leading rule set information 802 registered in the rule set table 413 is acquired, and the limit level 814 in the priority level 805 of the rule set information 802 is compared with the designated element information 901. If they match, it is checked whether the specified property name is included in the rule set information. If it is included, the address of the property value corresponding to the property name is acquired and saved. If they do not match, the next rule set information 802 is acquired from the rule set table 413,
The same comparison as above is performed, and the processing is repeated until all the rule set information 802 in the rule set table 413 has been searched. In the above comparison of the degree of limitation 814 and the element information 901, for example, when the degree of limitation is 1, it represents a type selector. Therefore, it is compared with the element name 902 of the element information 901, and when the degree of limitation is 5, link: In order to represent a pseudo selector or: visited pseudo selector, the element information 901 is compared with the pseudo selector information 904.
Such processing is performed.

【0058】本ルールセット検索処理で重要な点は、上
記優先順位度805中の限定度814と要素情報901
の比較で最初に一致したルールセット情報が取得すべき
最も高い優先順位のルールセット情報である点である。
すなわち、ルールセットテーブル413は前述のルール
セットテーブルソート手段414により優先順位度の順
に並んでいるため、一致した場合は該当するルールセッ
ト情報以降は検索する必要がないため、従来のように全
てのルールセット情報を検索する方法に比べ、処理の簡
略化と高速化が可能である。また、本発明のルールセッ
トテーブルソート手段414が無い場合においても、ル
ールセットテーブル413内のルールセット情報間の優
先順位は、同ルールセット情報に含まれる優先順位度の
単純比較により決定できるため、従来のような複雑な優
先順位判定を行う必要が無く、処理の簡略化と高速化が
可能である。
The important points in this rule set search processing are the limit 814 and the element information 901 in the priority 805.
That is, the rule set information that matches first in the comparison is the highest priority rule set information to be acquired.
That is, since the rule set table 413 is arranged in the order of priority by the rule set table sorting means 414 described above, if there is a match, there is no need to search the corresponding rule set information and thereafter, so that all rules set table 413 can be used. Compared with the method of searching the rule set information, the processing can be simplified and speeded up. Even when the rule set table sorting means 414 of the present invention is not provided, the priority order between the rule set information in the rule set table 413 can be determined by a simple comparison of the priority levels included in the rule set information. There is no need to perform a complicated priority order determination as in the past, and the processing can be simplified and speeded up.

【0059】[0059]

【発明の効果】以上のように本発明によれば、ルールセ
ット情報作成手段411で作成するルールセット情報を
著者ごとに異なるルールセットテーブルに格納するので
はなく、1つのルールセットテーブル413にまとめる
ことにより、表示や印刷などの際にドキュメントのコン
テンツに適用するプレゼンテーションスタイルを取得す
る際、ルールセット検索手段415において1つのルー
ルセットテーブル413を検索すればよいため、処理の
簡略化と高速化が可能となるという効果が得られる。
As described above, according to the present invention, the rule set information created by the rule set information creating means 411 is stored in one rule set table 413 instead of being stored in a different rule set table for each author. As a result, when acquiring the presentation style applied to the content of the document at the time of displaying or printing, the rule set searching unit 415 only needs to search one rule set table 413, which simplifies and speeds up the process. The effect that it becomes possible is obtained.

【0060】また、ルールセット情報作成手段411で
作成するルールセット情報は、シート値決定手段410
で決定された、Author/User/Defaul
tのどの形態として入力されたスタイルシートに記述さ
れていたものかを表すシート値(図5)を含んだ優先順
位度805をもつため、表示や印刷などの際にドキュメ
ントのコンテンツに適用するプレゼンテーションスタイ
ルを取得する際、優先順位度805の比較によりスタイ
ル情報を決定することが可能となるため、処理の簡略化
と高速化が可能となるという効果が得られる。
The rule set information created by the rule set information creating means 411 is the sheet value determining means 410.
Author / User / Default determined by
A presentation that is applied to the content of a document when it is displayed or printed because it has a priority 805 that includes a sheet value (Fig. 5) that indicates which form of t was described in the input style sheet. When the style is acquired, the style information can be determined by comparing the priority levels 805, so that the processing can be simplified and speeded up.

【0061】また、前記優先順位度805には、重要指
定で指定された場合に重要度決定手段407で決定した
重要度(図7)を含んでいるため、表示や印刷などの際
にドキュメントのコンテンツに適用するプレゼンテーシ
ョンスタイルを取得する際、優先順位度805の比較に
よりスタイル情報を決定することが可能となるため、処
理の簡略化と高速化が可能となるという効果が得られ
る。
Further, since the priority level 805 includes the importance level (FIG. 7) determined by the importance level determining means 407 when the priority level is specified by the importance level specification, the priority level of the document is displayed or printed. When the presentation style to be applied to the content is acquired, the style information can be determined by comparing the priority levels 805, so that the processing can be simplified and speeded up.

【0062】また、前記優先順位度805には、インポ
ート指定で指定された場合にインポート順位度決定手段
409で決定したインポート順位度(図6(b))を含
んでいるため、表示や印刷などの際にドキュメントのコ
ンテンツに適用するプレゼンテーションスタイルを取得
する際、優先順位度805の比較によりスタイル情報を
決定することが可能となるため、処理の簡略化と高速化
が可能となるという効果が得られる。
Further, since the priority level 805 includes the import level (FIG. 6B) determined by the import level determining means 409 when it is designated by the import specification, it is displayed or printed. When acquiring the presentation style to be applied to the content of the document, it is possible to determine the style information by comparing the priority levels 805, so that the processing can be simplified and speeded up. To be

【0063】また、ルールセット情報作成手段411で
作成したルールセット情報を登録するルールセットテー
ブル413は、ルールセットテーブルソート手段414
で優先順位度805を降順にソートすることにより、表
示や印刷などの際にドキュメントのコンテンツに適用す
るプレゼンテーションスタイルを取得する際、処理の簡
略化と高速化が可能となるという効果が得られる。
The rule set table 413 for registering the rule set information created by the rule set information creating means 411 is the rule set table sorting means 414.
By sorting the priority order 805 in descending order, it is possible to simplify and speed up the process when acquiring the presentation style applied to the content of the document at the time of displaying or printing.

【図面の簡単な説明】[Brief description of drawings]

【図1】セレクタのパターン例を示す図FIG. 1 is a diagram showing a pattern example of a selector.

【図2】プロパティ名とプロパティ値の例を示す図FIG. 2 is a diagram showing an example of property names and property values.

【図3】従来のスタイルシート処理例を示す構成図FIG. 3 is a configuration diagram showing a conventional style sheet processing example.

【図4】本発明のスタイルシート処理装置を示す構成図FIG. 4 is a configuration diagram showing a style sheet processing apparatus of the present invention.

【図5】本発明のスタイルシートの種類とそのシート値
を示す図
FIG. 5 is a diagram showing types of style sheets of the present invention and sheet values thereof.

【図6】スタイルシートのインポートの一例とインポー
ト順位度の例を示す図
FIG. 6 is a diagram showing an example of importing a style sheet and an example of an import ranking degree.

【図7】本発明の重要度の一覧を示す図FIG. 7 is a diagram showing a list of the degrees of importance of the present invention.

【図8】本発明のルールセットテーブルのデータ構造を
示す図
FIG. 8 is a diagram showing a data structure of a ruleset table of the present invention.

【図9】本発明の要素情報のデータ構造と擬似セレクタ
情報の値を示す図
FIG. 9 is a diagram showing a data structure of element information and values of pseudo selector information according to the present invention.

【図10】本発明のスタイル情報のデータ構造を示す図FIG. 10 is a diagram showing a data structure of style information of the present invention.

【図11】本発明の初期化処理を示すフローチャートFIG. 11 is a flowchart showing an initialization process of the present invention.

【図12】本発明のスタイルシート入力処理を示すフロ
ーチャート
FIG. 12 is a flowchart showing a style sheet input process of the present invention.

【図13】本発明のスタイルシート解析処理を示すフロ
ーチャート
FIG. 13 is a flowchart showing a style sheet analysis process of the present invention.

【図14】本発明のシート値決定処理を示すフローチャ
ート
FIG. 14 is a flowchart showing sheet value determination processing of the present invention.

【図15】本発明のセレクタ抽出処理を示すフローチャ
ート
FIG. 15 is a flowchart showing selector extraction processing of the present invention.

【図16】本発明の限定度決定処理を示すフローチャー
FIG. 16 is a flowchart showing a limitation degree determining process of the present invention.

【図17】本発明の宣言部抽出処理を示すフローチャー
FIG. 17 is a flowchart showing a declaration part extraction process of the present invention.

【図18】本発明の重要指定抽出処理を示すフローチャ
ート
FIG. 18 is a flowchart showing an important designation extraction process of the present invention.

【図19】本発明の重要度決定処理を示すフローチャー
FIG. 19 is a flowchart showing an importance degree determination process of the present invention.

【図20】本発明のインポート指定抽出処理を示すフロ
ーチャート
FIG. 20 is a flowchart showing an import designation extraction process of the present invention.

【図21】本発明のインポート順位度決定処理を示すフ
ローチャート
FIG. 21 is a flowchart showing an import ranking degree determination process of the present invention.

【図22】本発明のルールセット情報作成処理を示すフ
ローチャート
FIG. 22 is a flowchart showing a rule set information creation process of the present invention.

【図23】本発明の優先順位度決定処理を示すフローチ
ャート
FIG. 23 is a flowchart showing a priority level determination process of the present invention.

【図24】本発明のスタイル情報取得処理を示すフロー
チャート
FIG. 24 is a flowchart showing a style information acquisition process of the present invention.

【図25】本発明のルールセット検索処理を示すフロー
チャート
FIG. 25 is a flowchart showing a rule set search process of the present invention.

【図26】本発明のスタイル情報作成処理を示すフロー
チャート
FIG. 26 is a flowchart showing a style information creation process of the present invention.

【符号の説明】[Explanation of symbols]

401 スタイルシート入力手段 402 スタイルシート解析手段 403 セレクタ抽出手段 404 限定度決定手段 405 宣言部抽出手段 406 重要指定抽出手段 407 重要度決定手段 408 インポート指定抽出手段 409 インポート順位度決定手段 410 シート値決定手段 411 ルールセット情報作成手段 412 優先順位度決定手段 413 ルールセットテーブル 414 ルールセットテーブルソート手段 415 ルールセット検索手段 416 スタイル情報取得手段 417 スタイル情報作成手段 801 ルールセットテーブル 802 ルールセット情報 803 プロパティ情報 804 リンク情報 805 優先順位度 806 プロパティ名文字列のオフセット位置 807 プロパティ値文字列のオフセット位置 808 次のプロパティ情報へのポインタ 809 文字列バッファ 810 前のルールセット情報へのポインタ 811 後のルールセット情報へのポインタ 812 重要度 813 シート値 814 限定度 815 インポート順位度 401 Style sheet input method 402 style sheet analysis means 403 selector extraction means 404 Limitation determination means 405 Declaration section extraction means 406 important designation extraction means 407 Importance determination means 408 Import designation extraction means 409 Import ranking degree determining means 410 sheet value determining means 411 Rule set information creation means 412 priority level determination means 413 rule set table 414 Rule Set Table Sorting Means 415 Rule set search means 416 Style information acquisition means 417 Style information creation means 801 rule set table 802 Rule set information 803 Property information 804 Link information 805 Priority 806 Offset position of property name character string 807 Offset position of property value character string 808 Pointer to the next property information 809 string buffer 810 Pointer to the previous ruleset information Pointer to the rule set information after 811 812 Importance 813 sheet value 814 Limited 815 Import rank degree

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】構造化された文書の表示や印刷を行う際の
プレゼンテーションスタイルを定義する言語で記述され
たスタイルシートを処理するスタイルシート処理装置に
おいて、 スタイルシートを入力するスタイルシート入力手段と、 上記スタイルシート入力手段により入力されたスタイル
シートを解析するスタイルシート解析手段と、 上記スタイルシート解析手段によりセレクタを検出した
場合にセレクタの種別に対応した限定度を決定する限定
度決定手段と、 上記スタイルシート解析手段により宣言部を検出した場
合にプロパティ名とプロパティ値を抽出する宣言部抽出
手段と、 上記宣言部抽出手段で抽出したプロパティ名とプロパテ
ィ値をもとにプロパティ情報を生成し、上記限定度決定
手段により決定した限定度を優先順位度として対応付け
てルールセット情報を生成し、ルールセットテーブルに
登録するルールセット情報作成手段と、 上記ルールセットテーブルのルールセット情報を検索
し、スタイル情報を取得するスタイル情報取得手段とを
備えることを特徴とするスタイルシート処理装置。
1. A style sheet processing device for processing a style sheet described in a language that defines a presentation style when displaying or printing a structured document, and a style sheet input means for inputting a style sheet, A style sheet analysis means for analyzing the style sheet input by the style sheet input means; and a limitation degree determination means for determining a limitation degree corresponding to the type of the selector when the style sheet analysis means detects a selector, The declarative part extracting means for extracting the property name and the property value when the declarative part is detected by the style sheet analyzing means, and the property information is generated based on the property name and the property value extracted by the declarative part extracting means. The degree of limitation determined by the degree-of-limitation determination means is taken as the priority degree. It is characterized by comprising rule set information creating means for associating rule set information and registering it in the rule set table, and style information acquiring means for searching the rule set information in the rule set table and acquiring style information. Style sheet processing equipment.
【請求項2】上記スタイルシート処理装置において、解
析を行うスタイルシートに著者ごとに割り振ったシート
値を決定するシート値決定手段を備え、上記優先順位度
に上記シート値を含むことを特徴とする請求項1に記載
のスタイルシート処理装置。
2. The style sheet processing apparatus, further comprising a sheet value determining means for determining a sheet value assigned to each author in a style sheet to be analyzed, and the priority level includes the sheet value. The style sheet processing apparatus according to claim 1.
【請求項3】上記スタイルシート処理装置において、上
記宣言部抽出手段により宣言部に重要指定を検出した場
合に重要度の決定を行う重要度決定手段を備え、上記優
先順位度に上記重要度を含むことを特徴とする請求項1
または請求項2に記載のスタイルシート処理装置。
3. The style sheet processing apparatus further comprises importance determining means for determining importance when the declaration part extracting means detects an importance designation in the declaration part, and the priority is assigned to the importance. Claim 1 characterized by including.
Alternatively, the style sheet processing apparatus according to claim 2.
【請求項4】上記スタイルシート処理装置において、上
記スタイルシート解析手段によりインポート指定を検出
した場合にインポート順位度を決定するインポート順位
度決定手段を備え、上記優先順位度にインポート順位度
を含むことを特徴とする請求項1から請求項3のいずれ
かに記載のスタイルシート処理装置。
4. The style sheet processing apparatus further comprises an import ranking degree determining means for determining an import ranking degree when the style sheet analyzing means detects an import designation, and the priority ranking includes the import ranking degree. The style sheet processing apparatus according to any one of claims 1 to 3, wherein
【請求項5】上記スタイルシート処理装置において、上
記ルールセット情報作成手段で作成したルールセットテ
ーブルを、上記ルールセット情報の優先順位度を基準に
降順にソートするルールセットテーブルソート手段を備
えることを特徴とする請求項1から請求項4のいずれか
に記載のスタイルシート処理装置。
5. The style sheet processing apparatus further comprises rule set table sorting means for sorting the rule set table created by the rule set information creating means in descending order based on the priority of the rule set information. The style sheet processing apparatus according to any one of claims 1 to 4, which is characterized.
JP2002138174A 2002-05-14 2002-05-14 Stylesheet processing device Pending JP2003330915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002138174A JP2003330915A (en) 2002-05-14 2002-05-14 Stylesheet processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002138174A JP2003330915A (en) 2002-05-14 2002-05-14 Stylesheet processing device

Publications (1)

Publication Number Publication Date
JP2003330915A true JP2003330915A (en) 2003-11-21

Family

ID=29699687

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002138174A Pending JP2003330915A (en) 2002-05-14 2002-05-14 Stylesheet processing device

Country Status (1)

Country Link
JP (1) JP2003330915A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122724A (en) * 2005-10-27 2007-05-17 Hewlett-Packard Development Co Lp Device for storing vector image together with embedded image style identifier, and method and utility for formatting device image by using image style attribute
JP2010044626A (en) * 2008-08-13 2010-02-25 Internatl Business Mach Corp <Ibm> Information processor, information processing method, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122724A (en) * 2005-10-27 2007-05-17 Hewlett-Packard Development Co Lp Device for storing vector image together with embedded image style identifier, and method and utility for formatting device image by using image style attribute
US7724985B2 (en) 2005-10-27 2010-05-25 Hewlett-Packard Development Company, L.P. Device storing vector image with embedded image style identifier, and methods and utilities for formatting a device image with image style attributes
JP2010044626A (en) * 2008-08-13 2010-02-25 Internatl Business Mach Corp <Ibm> Information processor, information processing method, and program

Similar Documents

Publication Publication Date Title
JP3860347B2 (en) Link processing device
US7920894B2 (en) Methods and apparatus for analyzing, processing and formatting network information such as web-pages
US9436419B2 (en) Selectively printing portions of a web page based on user selection
US7562085B2 (en) Systems and methods for displaying linked information in a sorted context
US7730104B2 (en) Extraction of information from structured documents
JP2002334034A (en) Method, device, and computer program for providing contents for client
JP2007509385A (en) Web content adaptation process and system
JP2004021763A (en) Text mining program, method, and device
US20080104040A1 (en) Visually intuitive search method
JP2003308327A (en) System and method for determining classification of structured document
JP2008226235A (en) Information feedback system, information feedback method, information control server, information control method, and program
JP3832693B2 (en) Structured document search and display method and apparatus
JP2002215519A (en) Method and system for web page generation, web page generating program, and recording medium
WO2002021331A1 (en) Analysing hypertext documents
JP2003281149A (en) Method of setting access right and system of structured document management
JP2003330915A (en) Stylesheet processing device
JP2005128872A (en) Document retrieving system and document retrieving program
JP2004157668A (en) Retrieval system, retrieval method and retrieval program
JP2004341942A (en) Content classification method, content classification device, content classification program, and storage medium storing content classification program
JP2010049598A (en) Web-site creation support device and program
JP2017220179A (en) Content processing device, content processing method and program
JP2004192276A (en) Information retrieval system, information retrieval device and computer program
JP2002342342A (en) Document managing method, execution system therefor, processing program and recording medium therefor
JP2000322167A (en) Data management system and method for displaying data attribute
JP2003196194A (en) Link processing method and device