XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 10th, 2003, 10:35 AM
srivalli9 srivalli9 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 48 srivalli9 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 4 sec
Reputation Power: 6
XSLT output(SMIL document) ... Unknown format

I used XSl stylesheet to transform a XML document into a SMIL document.
I used msxsl program to make this conversion this way...
C:\>msxsl exm.xml exs.xsl -o exl.smil

When I tried to play the resulting SMIL document(exl.smil) using RealOne player, it said....

Unknown Data Fromat.
XML: No close near line 1:<

When I tried copying the SMIL document contents word-for-word in a new notepad, saving it as a .smil document(op.smil) and then trying to play this newly created op.smil document, it WORKS fine.

Now my question is .. why isn't the real player playing the smil output(exl.smil) as is. Do I have to retype the entire document into a fresh document(op.smil) to make it play?

Here are the codes for my documents....
--------------------------------------------------------
exm.xml

<?xml version="1.0" standalone="no"?>

<!DOCTYPE MULTITAO [
<!--This is the modified Document Type Definition for the TAO_XML to SMIL.-->

<!ELEMENT MULTITAO (TAO)+ >
<!ATTLIST MULTITAO
xmlns:xlink CDATA #IMPLIED
>
<!ELEMENT TAO (NODEC*, LINK*, TAO_IC?, TAO_SENSI?, TAO_DATA?) >
<!ATTLIST TAO
name ID #REQUIRED >

<!ELEMENT NODEC (NODE*, LINK*) >
<!ATTLIST NODEC
name ID #REQUIRED >

<!ELEMENT NODE (NODE_TEMPLATE,LINK*) >
<!ATTLIST NODE
name ID #REQUIRED >

<!ELEMENT NODE_TEMPLATE EMPTY>
<!ATTLIST NODE_TEMPLATE
xlink:type CDATA #FIXED "simple"
xlink:role (img|text|audio|motion_graph|video) #REQUIRED
xlink:href CDATA #REQUIRED
xlink:title CDATA #IMPLIED
xlink:show (embed|replace|new|undef) #FIXED "embed"
xlink:actuate (onLoad|onRequest|undefined) #FIXED "onLoad"
>

<!ELEMENT LINK (#PCDATA) >
<!ATTLIST LINK
start IDREF #REQUIRED
name CDATA #REQUIRED
type (spatial|temporal|structural) #REQUIRED
diffS CDATA #REQUIRED
diffE CDATA #REQUIRED
obj IDREF #REQUIRED
>

<!ELEMENT TAO_IC EMPTY >
<!ATTLIST TAO_IC
flag (old|new) #REQUIRED
ic_type CDATA #REQUIRED
ic_id_list CDATA #REQUIRED
message_type CDATA #REQUIRED
message_content CDATA #REQUIRED
cgi_pgm CDATA #REQUIRED
>

<!ELEMENT TAO_SENSI EMPTY >
<!ATTLIST TAO_SENSI
type (location|content|time) #REQUIRED >

<!ELEMENT TAO_DATA (#PCDATA) >

]>


<!--This is the TAOML document.-->
<MULTITAO xmlns:xlink="http://www.w3.org/1999/xlink">
<TAO name="T1">
<NODEC name="T2">
<NODE name="A">
<NODE_TEMPLATE role="img"
href="flag.gif"/>
</NODE>
<NODE name="B">
<NODE_TEMPLATE role="img"
href="birlatemple.jpg"/>
</NODE>
<LINK start="A" obj="B" diffS="4s" diffE="3s"/>
</NODEC>
</TAO>
</MULTITAO>

-----------------------------------------------------------------------------------

exs.xsl

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="LINK">
<smil>
<body>
<par>

<xsl:variable name="difS" select="number(substring-before(@diffS, 's'))"/>
<xsl:variable name="difE" select="number(substring-before(@diffE, 's'))"/>

<xsl:variable name="attS" select="@start"/>

<xsl:variable name="attSN" select="//NODE[$attS=@name]/NODE_TEMPLATE/@role"/>
<xsl:variable name="hrSN" select="//NODE[$attS=@name]/NODE_TEMPLATE/@href"/>

<xsl:element name="{$attSN}">

<xsl:attribute name="id"><xsl:value-of select="./@start"/>
</xsl:attribute>

<xsl:if test="$difS < 0">
<xsl:attribute name="begin">
<xsl:value-of select="concat(concat(concat(concat(concat('id(', @obj),')'),'('), @diffS),')')"/>
</xsl:attribute>
</xsl:if>

<xsl:if test="$difE < 0">
<xsl:attribute name="end">
<xsl:value-of select="concat(concat(concat(concat(concat('id(', @obj),')'),'('), @diffE),')')"/>
</xsl:attribute>
</xsl:if>

<xsl:attribute name="src"><xsl:value-of select="$hrSN"/>
</xsl:attribute>

</xsl:element>

<xsl:variable name="attO" select="@obj"/>

<xsl:variable name="attON" select="//NODE[$attO=@name]/NODE_TEMPLATE/@role"/>
<xsl:variable name="hrON" select="//NODE[$attO=@name]/NODE_TEMPLATE/@href"/>

<xsl:element name="{$attON}">

<xsl:attribute name="id"><xsl:value-of select="./@obj"/>
</xsl:attribute>

<xsl:if test="$difS > 0">
<xsl:attribute name="begin">
<xsl:value-of select="concat(concat(concat(concat(concat('id(', @start),')'),'('), @diffS),')')"/>
</xsl:attribute>
</xsl:if>

<xsl:if test="$difE > 0">
<xsl:attribute name="end">
<xsl:value-of select="concat(concat(concat(concat(concat('id(', @start),')'),'('), @diffE),')')"/>
</xsl:attribute>
</xsl:if>

<xsl:attribute name="src"><xsl:value-of select="$hrON"/>
</xsl:attribute>

</xsl:element>

</par>
</body>
</smil>
</xsl:template>

</xsl:stylesheet>

-----------------------------------------------------------------------------------

exl.smil

<smil>
<body>
<par>
<img id="A" src="flag.gif" />
<img id="B" begin="id(A)(4s)" end="id(A)(3s)" src="birlatemple.jpg" />
</par>
</body>
</smil>

--------------------------

Thanks a lot in advance

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSLT output(SMIL document) ... Unknown format


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway