<!--
	Peko Scenario Markup Language 1.0 Scene DTD

	All Rights Reserved.
	Copyright (C) 1999-2004 Tsukuba Bunko.

	This DTD module is identified by the follwing PUBLIC and SYSTEM identifiers:

	PUBLIC "-//Tsukuba Bunko//DTD PSML 1.0 Scene//EN"
	SYSTEM "http://softlab.tsukuba-bunko.org/dtd/psml10-scene.dtd"

	$Id: psml10-scene.dtd,v 1.1.2.7 2004/08/22 09:30:32 ppoi Exp $
-->

<!--==================== Common Attributes =================================-->
<!ENTITY % attr.test "test CDATA #IMPLIED">


<!--==================== Utility Elements ==================================-->
<!ELEMENT wait EMPTY>
<!ATTLIST wait
	%attr.test;
	dur			CDATA	#IMPLIED
>

<!ELEMENT flag EMPTY>
<!ATTLIST flag
	%attr.test;
	id			CDATA	#REQUIRED
	scope		(scene|session|system)	#REQUIRED
	action		(declare|undeclare)	"declare"
>

<!ELEMENT scene-flow EMPTY>
<!ATTLIST scene-flow
	%attr.test;
	next-scene	CDATA	#IMPLIED
>


<!--==================== Text Section Contents =============================-->
<!ENTITY % elements.text "p | np">

<!ELEMENT text (%elements.text; | wait | flag)+>
<!ATTLIST text
	%attr.test;
>

<!ELEMENT p (#PCDATA | wait)*>
<!ATTLIST p
	%attr.test;
	flag	CDATA	#IMPLIED
>

<!ELEMENT np EMPTY>
<!ATTLIST np
	%attr.test;
>

<!--==================== Stage Section Contents ============================-->
<!ENTITY % actor.elements "enter | action | exit">
<!ENTITY % background.elements "background | show-slide | hide-slide">
<!ENTITY % sound.elements "play-bgm | play-se | stop-bgm | stop-se">

<!ELEMENT stage (%actor.elements; | %background.elements; | %sound.elements; | at-once | wait | flag)+>
<!ATTLIST stage
	%attr.test;
>

<!ELEMENT enter EMPTY>
<!ATTLIST enter
	%attr.test;
	name		CDATA	#REQUIRED
	looks		CDATA	#REQUIRED
	position	CDATA	"center"
	effect		CDATA	#IMPLIED
>

<!ELEMENT action EMPTY>
<!ATTLIST action
	%attr.test;
	name		CDATA	#REQUIRED
	looks		CDATA	#IMPLIED
	position	CDATA	#IMPLIED
	effect		CDATA	#IMPLIED
>

<!ELEMENT exit EMPTY>
<!ATTLIST exit
	%attr.test;
	name		CDATA	#REQUIRED
	effect		CDATA	#IMPLIED
>

<!ELEMENT background EMPTY>
<!ATTLIST background
	%attr.test;
	image		CDATA	#IMPLIED
	color		CDATA	#IMPLIED
	effect		CDATA	#IMPLIED
>

<!ELEMENT show-slide EMPTY>
<!ATTLIST show-slide
	%attr.test;
	image		CDATA	#REQUIRED
	effect		CDATA	#IMPLIED
>

<!ELEMENT hide-slide EMPTY>
<!ATTLIST hide-slide
	%attr.test;
	effect		CDATA	#IMPLIED
>

<!ELEMENT at-once (%actor.elements; | %background.elements;)+>
<!ATTLIST at-once
	%attr.test;
	effect		CDATA	#IMPLIED
>

<!ELEMENT play-bgm EMPTY>
<!ATTLIST play-bgm
	%attr.test;
	id			CDATA	#REQUIRED
	clip		CDATA	#REQUIRED
	loop		(true|false)	"true"
>

<!ELEMENT play-se EMPTY>
<!ATTLIST play-se
	%attr.test;
	id			CDATA	#REQUIRED
	clip		CDATA	#REQUIRED
	loop		(true|false)	"false"
>

<!ELEMENT stop-bgm EMPTY>
<!ATTLIST stop-bgm
	%attr.test;
	id			CDATA	#REQUIRED
>

<!ELEMENT stop-se EMPTY>
<!ATTLIST stop-se
	%attr.test;
	id			CDATA	#REQUIRED
>

<!--==================== Select Section Contents ===========================-->
<!ELEMENT select (item)+>
<!ATTLIST select
	%attr.test;
	name		CDATA	#REQUIRED
	scope		(scene|session|system)	"session"
	description	CDATA	#IMPLIED
>

<!ELEMENT item (#PCDATA)>
<!ATTLIST item
	%attr.test;
	id			CDATA	#REQUIRED
>

<!--==================== Document Structure ================================-->
<!ELEMENT scene (head, body)>
<!ATTLIST scene
	xmlns		CDATA	#IMPLIED
	xml:lang	CDATA	#IMPLIED
>

<!ELEMENT head (title, flow-mapping?, property*)>

<!ELEMENT body (text | select | stage | flag | scene-flow)+>

<!ELEMENT title (#PCDATA)>

<!ELEMENT flow-mapping (scene-ref)+>
<!ELEMENT scene-ref (#PCDATA)>
<!ATTLIST scene-ref
	if		CDATA	#IMPLIED
>

<!ELEMENT property EMPTY>
<!ATTLIST property
	name	CDATA	#IMPLIED
	value	CDATA	#IMPLIED
	file	CDATA	#IMPLIED
>
