4 Replies Latest reply: Jul 2, 2013 10:05 AM by FernandoS RSS

    Add short name field for Associated Specs in the XSL file

    FernandoS

      Hi,

       

      I am looking for help to see if is it possible to add the Short Name field for the Inputs and Alternate Inputs in a Formulation Specification in the XSL file. If it is possible, how can I do this?.

       

      Thanks in advance.

        • 1. Re: Add short name field for Associated Specs in the XSL file
          Ron M-Oracle

          The Formulation printout has several different sections that list inputs (the Material Inputs grid, the Expanded Bill Of Materials, the Step based listing, the Material Summary).

          Each location has different xsl requirements. Some are easier than others.

           

           

          If your user has the [PRINT_DEBUG] role, then you can choose XML as your print template. Looking at that, you can see that the XML under MaterialInputs/Input has Identity/SpecName, but no short name. Further down in the XML, however, you can see that there is a Specification/SpecSummary node that has a SpecShortName. You should be able to pull that in.

           

          For the formulation steps listing for inputs, the xsl is something like this:

           

             <fo:table-cell xsl:use-attribute-sets="bordered">

                 <xsl:apply-templates select="Identity"/>

                 <fo:block><xsl:value-of select="ExtensibleIdentity"/></fo:block>

             </fo:table-cell>

           

          it would be something like

           

             <fo:table-cell xsl:use-attribute-sets="bordered">

                <xsl:apply-templates select="Identity"/>

                         <xsl:if test="$StepView = 'true'">
                    <fo:block>Here is the short name:<xsl:value-of select="Specification/SpecSummary/SpecShortName"/></fo:block>

                </xsl:if>

                 <fo:block><xsl:value-of select="ExtensibleIdentity"/></fo:block>

             </fo:table-cell>

           

          See if that gets you started. It is (mostly) all about looking at the XML output available from the XML print template, and finding if your data is available already. Otherwise, there may be other options.

          • 2. Re: Add short name field for Associated Specs in the XSL file
            FernandoS

            Hi Ron,

             

            Thanks for the reply. I apologize, I didn't give you the correct information.

             

            I am trying to add the short name for the Inputs and Alternate Inputs in the Standard.xsl, because this is going to be used with CSS. Is there a way to get this done?.

             

            Thank you, I apologize.

            • 3. Re: Add short name field for Associated Specs in the XSL file
              Ron M-Oracle

              Well, CSS is a lot more locked down, by design. So this is a little (or maybe a lot) trickier.

               

              Remember, too, that if you are modifying the CSS schema, and you are using the web service contract we provide to receive the CSS message, then the approach will likely differ. Meaning that the web service contract wouldn't support additional XML nodes, unless it expects them.

              If you are not using our provided web service contract, then you could make changes in the XML in a different way. Can you elaborate on how you are receiving the CSS message?

               

              Basically, if you are using the web service approach, then you will probably need to use the ExportExtensions approach, which is documented in the CSS guide. ExportExtensions allows you to add xml into a specific extensibility node through handlers, which are classes you configure in the config\extensions\exportExtensions.xml config file. That is currently how custom sections are included in a syndication. So you can add your own XML nodes, and call you custom class to provide the additional data you need.

              • 4. Re: Add short name field for Associated Specs in the XSL file
                FernandoS

                Hi Ron,

                 

                Thanks. I will do it with a custom handler.

                 

                Thanks.