3 Replies Latest reply on Sep 23, 2009 3:29 PM by 575992

    How to declare xsl:attribute-set in a RTF template

    723291
      Hi,
      I would like to know if there is a way to declare xsl:attribute-set in a RTF template.
      If I create a new RTF template and I insert a field with the following code:

      <xsl:attribute-set name="target_attributes">
      <xsl:attribute name="lineStyle">LS_DASH</xsl:attribute>
      <xsl:attribute name="markerShape">MS_CIRCLE</xsl:attribute>
      <xsl:attribute name="color">#FF0000</xsl:attribute>
      <xsl:attribute name="borderColor">#FF0000</xsl:attribute>
      </xsl:attribute-set>

      then, I'll obtain an "InvocationTargetException..Caused by: oracle.xdo.parser.v2.XSLException:
      XML-22047: (Error) Invalid instantiation of 'xsl:attribute-set' in '_3' context":
        • 1. Re: How to declare xsl:attribute-set in a RTF template
          Tim Dexter-Oracle
          Hi

          Just checking, you wanting to use the attribute set with the chart definition? If so, its not going to work, sorry. The chart definition XML is handed off to a Publisher extension to get the chart processed and brought back. That extension does not support attr sets.

          Attribute sets can be turned on in the rest of the RTF template through a property setting.

          regards

          Tim
          • 2. Re: How to declare xsl:attribute-set in a RTF template
            723291
            Hi,

            I found a solution to my problem: I specified the context for the insertion of the attribute-set tag by adding the xdofo:ctx="begin":

            <xsl:attribute-set name="target_attributes" xdofo:ctx="begin" >
                 <xsl:attribute name="lineStyle">LS_DASH</xsl:attribute>
                 <xsl:attribute name="markerShape">MS_CIRCLE</xsl:attribute>
                 <xsl:attribute name="color">#FF0000</xsl:attribute>
                 <xsl:attribute name="borderColor">#FF0000</xsl:attribute>
            </xsl:attribute-set>

            then, in the chart (Format Picture --> Alternative text) I put the following tags:

            <SeriesItems>
                 <xsl:element name="Series" use-attribute-sets="target_attributes">
                      <xsl:attribute name="id">0</xsl:attribute>
                 </xsl:element>
            </SeriesItems>

            it works fine (pdf result seems like I want) but when I validate the template I obtain the following exception:
            [092309_043319134][][ERROR] java.lang.ClassCastException: oracle.xml.parser.v2.XMLComment cannot be cast to org.w3c.dom.Element

            What's wrong??
            • 3. Re: How to declare xsl:attribute-set in a RTF template
              575992
              That can happen with the validation. If you got it to work, I would just go with it.