Publishing Pipelines

Web-Based Publishing (INFO 290-19)

Erik Wilde, UC Berkeley School of Information
2007-04-26
Creative Commons License

This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 License.

Abstract

While CMS publishing is bound to the features and limitations of a specific CMS, Web publishing often involves the integration of multiple information sources. Using Web technologies, Web publishing tasks can be solved efficiently and in a way which naturally leads to a publishing pipeline producing good Web content. Based on the context theme of the course, this lecture looks at various ways how context can be leveraged for Web-based publishing.

Linkbase Processing and Publishing

Outline (Linkbase Processing)

  1. Linkbase Processing [10]
    1. ProtoLSL [9]
  2. Linkbase Merging [5]
    1. ProtoLML [4]
  3. Link Creation [1]
  4. Conclusions [1]

Classified Context

Outline (ProtoLSL)

  1. Linkbase Processing [10]
    1. ProtoLSL [9]
  2. Linkbase Merging [5]
    1. ProtoLML [4]
  3. Link Creation [1]
  4. Conclusions [1]

ProtoLSL Schema

ProtoLSL Schema

ProtoLSL Blink Example

<?xml version="1.0" encoding="UTF-8"?>
<lsl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="protolsl.xsd">
 <resource type="post" title="Post" minOccurs="1" maxOccurs="1"/>
 <resource type="timestamp" title="Post Time" minOccurs="1" maxOccurs="1"/>
 <resource type="permalink" title="Post Permalink" minOccurs="1" maxOccurs="1"/>
 <resource type="relpost" title="Related Post"/>
 <resource type="site" title="Referenced Site"/>
 <resource type="blog" title="Blog Home" minOccurs="1" maxOccurs="1"/>
 <resource type="author" title="Blog Author" maxOccurs="1"/>
 <arc from="post" to="timestamp" title="Post Time"/>
 <arc from="permalink" to="timestamp" title="Post Time"/>
 <arc from="post" to="relpost" title="Related Post"/>
 <arc from="relpost" to="permalink" title="Related Post"/>
 <arc from="site" to="post" title="Blog Post"/>
 <arc from="post" to="permalink" title="Post Permalink"/>
 <arc from="post" to="author" title="Post Author"/>
 <arc from="permalink" to="author" title="Post Author"/>
 <arc from="post" to="blog" title="Blog Home"/>
 <arc from="permalink" to="blog" title="Blog Home"/>
 <arc from="blog" to="author" title="Blog Author"/>
 <arc from="author" to="blog" title="Authored Blogs"/>
</lsl>

Blink Schema

Blink Schema

Blink Instance

Blink Instance

ProtoLSL Address Example

<?xml version="1.0" encoding="UTF-8"?>
<lsl xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="protolsl.xsd">
 <resource type="name" title="Name" minOccurs="1" maxOccurs="1"/>
 <resource type="homepage" title="Home Page"/>
 <resource type="email" title="E-Mail" minOccurs="1"/>
 <resource type="phone" title="Phone"/>
 <resource type="fax" title="Fax"/>
 <resource type="affiliation" title="Affiliation" maxOccurs="1"/>
 <arc from="homepage" to="email" title="E-Mail"/>
 <arc from="homepage" to="phone" title="Phone"/>
 <arc from="homepage" to="fax" title="Fax"/>
 <arc from="hompage" to="name" title="Name"/>
 <arc from="affiliation" to="homepage" title="Staff"/>
</lsl>

ProtoLSL Validator

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:protolsl="http://dret.net/xmlns/protolsl/">
 <xsl:output method="text"/>
 <xsl:param name="lsl" select="'blinks+addresses.lsl'"/>
 <xsl:template match="/">
  <xsl:for-each select="descendant::*[@xlink:type eq 'extended']">
   <xsl:variable name="resources" select="./*[@xlink:type = ('resource', 'locator')]"/>
   <xsl:variable name="link-count" select="position()"/>
   <xsl:for-each select="document($lsl)//resource">
    <xsl:if test="count($resources[current()/@type = tokenize(@protolsl:type, '\s+')]) &lt; ( if ( exists(@minOccurs) ) then @minOccurs else 0 ) or count($resources[current()/@type = tokenize(@protolsl:type, '\s+')]) > ( if ( exists(@maxOccurs) ) then @maxOccurs else 999 )">
     <xsl:message>
      <xsl:value-of select="concat('Wrong number of &quot;', @type, '&quot; resources in link #', $link-count)"/>
     </xsl:message>
    </xsl:if>
   </xsl:for-each>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

Linkbase Views

Blink Schema & Arcs

Blink Schema & Arcs

ProtoLAL

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:protolsl="http://dret.net/xmlns/protolsl/">
 <xsl:param name="lsl" select="'blinks+addresses.lsl'"/>
 <xsl:template match="/">
  <view>
   <xsl:for-each select="descendant::*[@xlink:type eq 'extended']">
    <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:for-each select="*[@xlink:type = ('resource', 'locator')]">
     <xsl:copy>
      <xsl:attribute name="label" namespace="http://www.w3.org/1999/xlink" select="@protolsl:type"/>
      <xsl:copy-of select="@*[name() ne 'protolsl:type'] | node()"/>
     </xsl:copy>
    </xsl:for-each>
    <xsl:variable name="current-link" select="."/>
    <xsl:for-each select="document($lsl)//arc">
     <xsl:if test="exists($current-link/*[@xlink:type = ('resource', 'locator')][current()/@from eq @protolsl:type])">
      <arc xlink:type="arc" xlink:from="{@from}" xlink:to="{@to}" xlink:title="{@title}"/>
     </xsl:if>
    </xsl:for-each>
    </xsl:copy>
   </xsl:for-each>
  </view>
 </xsl:template>
</xsl:stylesheet>

Outline (Linkbase Merging)

  1. Linkbase Processing [10]
    1. ProtoLSL [9]
  2. Linkbase Merging [5]
    1. ProtoLML [4]
  3. Link Creation [1]
  4. Conclusions [1]

Combining Schemas

Outline (ProtoLML)

  1. Linkbase Processing [10]
    1. ProtoLSL [9]
  2. Linkbase Merging [5]
    1. ProtoLML [4]
  3. Link Creation [1]
  4. Conclusions [1]

ProtoLML Example

ProtoLML Schema
<?xml version="1.0" encoding="UTF-8"?>
<lml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="protolml.xsd">
 <merge>
  <resource type="author"/>
  <resource type="homepage"/>
 </merge>
</lml>

Merged Link Example

Merged Blink and Address

The Full Pipeline

  1. Individual linkbases (blinks/addresses) and schemas (blinks/addresses)
  2. protolsl.xsl can be used to validate the linkbases
  3. protolml.xsl merges them according to the merging rules
  4. The merged linkbase can be checked with a merged schema
  5. protolal.xsl the view based on the merged schema
  6. xlink-analyzer.xsl visualizes all navigable structures
  7. xlink2lil.xsl creates the interaction description based on the context
  8. lil2html.xsl creates the YUI HTML code

Link Processing and Publishing

Link Publishing Pipeline

Outline (Link Creation)

  1. Linkbase Processing [10]
    1. ProtoLSL [9]
  2. Linkbase Merging [5]
    1. ProtoLML [4]
  3. Link Creation [1]
  4. Conclusions [1]

Interfaces from Schemas

Outline (Conclusions)

  1. Linkbase Processing [10]
    1. ProtoLSL [9]
  2. Linkbase Merging [5]
    1. ProtoLML [4]
  3. Link Creation [1]
  4. Conclusions [1]

Publishing in Pipelines