Files
go-astisub/testdata/example-in-merging-style.ttml
Nhan Trong NguyenandGitHub 90801f85db Support body div level style and region (#131)
* [ttml] Support style and region inheritance body>div>p

* [ttml/test] Test case for style and region inheritance

* Add more case

* Rename function and correct code
2025-10-14 11:05:44 +02:00

39 lines
2.1 KiB
Plaintext

<tt xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2006/10/ttaf1" xmlns:tt="http://www.w3.org/2006/10/ttaf1" xmlns:tts="http://www.w3.org/2006/10/ttaf1#styling" xmlns:ttp="http://www.w3.org/2006/10/ttaf1#parameter" xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata" xml:lang="fr-FR" ttp:timeBase="smpte" ttp:frameRate="25" ttp:frameRateMultiplier="1:1" ttp:markerMode="discontinuous">
<head>
<metadata>
<ttm:title>Title test</ttm:title>
<ttm:copyright>Copyright test</ttm:copyright>
</metadata>
<styling>
<style xml:id="style_0" tts:style="style_2" tts:fontFamily="sansSerif" tts:color="white" tts:fontStyle="normal" tts:textAlign="center" tts:origin="0% 90%" tts:extent="100% 10%"/>
<style xml:id="style_1" tts:fontFamily="sansSerif" tts:color="white" tts:fontStyle="normal" tts:textAlign="center" tts:origin="0% 87%" tts:extent="100% 13%"/>
<style xml:id="style_2" tts:fontFamily="sansSerif" tts:color="white" tts:fontStyle="normal" tts:textAlign="center" tts:origin="0% 80%" tts:extent="100% 20%"/>
</styling>
<layout>
<region xml:id="region_0" tt:style="style_0" tt:color="blue"/>
<region xml:id="region_1" tt:style="style_1"/>
<region xml:id="region_2" tt:style="style_2"/>
</layout>
</head>
<body region="region_0" style="style_0">
<div style="style_1" tts:color="yellow">
<p xml:id="sub_1" begin="00:00:00.000" end="00:01:00.000" color="red">
text1.0
<span style="style_1" color="black">text1.1</span>
</p>
</div>
<div region="region_1">
<p xml:id="sub_2" begin="00:01:00.000" end="00:02:00.000">
<span style="style_1">text2</span>
</p>
<p xml:id="sub_3" begin="00:01:00.000" end="00:02:00.000" region="region_2">
text2.1
</p>
</div>
<div tts:color="blue">
<p xml:id="sub_2" begin="00:02:00.000" end="00:03:00.000">
<span style="style_1">text3</span>
</p>
</div>
</body>
</tt>