This is for LOR2, only. This is a great way to modify your channel configuration file. As we learn more about LOR2, expect to see more and more items like this coming out. (Note: The XML files are in blue.)
I added some display elements (a neighbor) to the left of our current display, so I needed to shift the Animation display to the right. There is currently no way to do this using the LOR II sequence editor, so I needed to edit the animation in the LCC file directly.
I could have manually modified all the "<column>" tags, but I have hundreds, so I found an easier way to do it. - First, I made a copy of my LCC file, but renamed it ".XML" instead of ".LCC".
- Then I created the following file, called "move30.xsl":
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> Â Â Â Â Â Â Â <xsl:template match="channelConfig"> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <HTML> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <xsl:apply-templates/> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </HTML> Â Â Â Â Â Â Â </xsl:template>
       <xsl:template match="animation">                <xsl:apply-templates/>        </xsl:template>
       <xsl:template match="row">                <xsl:text><row index="</xsl:text>                <xsl:value-of select="@index + 0"/>                <xsl:text>"></xsl:text>                <br />                <xsl:apply-templates/>                <xsl:text></row></xsl:text>                <br />        </xsl:template>
       <xsl:template match="column">                <xsl:text><column index="</xsl:text>                <xsl:value-of select="@index + 30"/>                <xsl:text>" channel="</xsl:text>                <xsl:value-of select="@channel"/>                <xsl:text>"/></xsl:text>                <br />        </xsl:template>
</xsl:stylesheet> |
- Next, I added this second line to my ".XML" file, after the first (existing) line:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml-stylesheet type="text/xsl" href="/move30.xsl"? |
- Now, I used Firefox (IE would probably work too) and loaded the ".XML" file. This produced a screen with the new animation XML code.
- I copied what was on the screen of my browser, and replaced the stuff in the existing ".LCC" file between the <animation> and </animation> tags, using Notepad.
- Finally, I imported the newly modified LCC file using the sequence editor. Magic! My animation had moved 30 columns to the right, making room for the new elements on the left.
- Just to make sure the LCC file was good, I re-exported it.
I learned this technique from the book XPath Kick Start: Navigating XML with XPath 1.0 and 2.0 that was lying around the office, but you could probably find this information online.
|
Last Updated ( Thursday, 11 September 2008 20:00 )
|