portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sg...@apache.org
Subject cvs commit: jakarta-jetspeed/webapp/WEB-INF/xsl ocs.xsl
Date Mon, 18 Feb 2002 19:11:40 GMT
sgala       02/02/18 11:11:40

  Modified:    webapp/WEB-INF/xsl ocs.xsl
  Log:
  Less hackish way to match different namespaces, but still a hack
  
  Revision  Changes    Path
  1.7       +13 -17    jakarta-jetspeed/webapp/WEB-INF/xsl/ocs.xsl
  
  Index: ocs.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/xsl/ocs.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ocs.xsl	29 Jul 2001 13:42:52 -0000	1.6
  +++ ocs.xsl	18 Feb 2002 19:11:40 -0000	1.7
  @@ -1,8 +1,7 @@
   <?xml version="1.0"?> 
   <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
                   xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  -                xmlns:aocs= "http://alchemy.openjava.org/ocs/ocs-syntax#"
  -                xmlns:ocs = "http://alchemy.openjava.org/ocs/directory#"
  +                xmlns:ocs = "http://alchemy.openjava.org/ocs/ocs-syntax#"
                   xmlns:dc  = "http://purl.org/dc/elements/1.0/"
                   exclude-result-prefixes="rdf ocs aocs dc"
                   version   = "1.0">
  @@ -19,33 +18,31 @@
   
       </xsl:template>
       
  -    <xsl:template match="/rdf:RDF/rdf:description/rdf:description">
  +    <xsl:template match="rdf:RDF/rdf:description/rdf:description">
   
           <!--
           Only known formats are RSS 0.90 and RSS 0.91
           -->
   
  -        <xsl:variable name="format" select="./rdf:description/aocs:format"/>
  -        <xsl:variable name="format2" select="./rdf:description/ocs:format"/>
  +        <xsl:variable name="url" select="./rdf:description/@about"/>        
  +        <xsl:variable name="tit" select="./*[local-name()='title']"/>        
  +        <xsl:variable name="desc" select="./*[local-name()='description' and name()
!= 'rdf:description']"/>
   
  +        <xsl:variable name="format" select="./rdf:description/*[local-name()='format']"/>
   
  -        <xsl:variable name="url" select="./rdf:description/@about"/>        
  -        <xsl:variable name="tit" select="./dc:title"/>        
  -        <xsl:variable name="desc" select="./dc:description"/>
   
           
       <!-- Uncomment to get the vars for debug
           <xsl:comment>
           Format: <xsl:value-of select="$format"/>:
  -        Format2: <xsl:value-of select="$format2"/>:
  +        url: <xsl:value-of select="$url"/>:
  +        Title: <xsl:value-of select="$tit"/>:
  +        Desc: <xsl:value-of select="$desc"/>:
           </xsl:comment>
  -     -->
  +    -->
   
           <xsl:if test="$format = 'http://my.netscape.com/rdf/simple/0.9/' or
  -                      $format = 'http://my.netscape.com/publish/formats/rss-0.9.dtd' or
  -                      $format2 = 'http://my.netscape.com/rdf/simple/0.9/' or
  -                      $format2 = 'http://my.netscape.com/publish/formats/rss-0.9.dtd'
  -                ">
  +                      $format = 'http://my.netscape.com/publish/formats/rss-0.9.dtd' ">
               <portlet-entry type="ref" parent="RSS" name="{$url}">
                   <url><xsl:value-of select="$url"/></url>
               <meta-info>
  @@ -65,9 +62,8 @@
           </xsl:if>
   
           
  -        <xsl:if test="$format = 'http://my.netscape.com/publish/formats/rss-0.91.dtd'
or
  -                      $format2 = 'http://my.netscape.com/publish/formats/rss-0.91.dtd'
  -">
  +        <xsl:if test="$format = 'http://my.netscape.com/publish/formats/rss-0.91.dtd'
  +           ">
               <portlet-entry type="ref" parent="RSS" name="{$url}">
                   <url><xsl:value-of select="$url"/></url>
               <meta-info>
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message