This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 113532 - Support for xsl:template in the XSLT editor
Summary: Support for xsl:template in the XSLT editor
Status: RESOLVED INCOMPLETE
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Sergey Lunegov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-22 16:45 UTC by pvarghese
Modified: 2011-09-19 21:33 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pvarghese 2007-08-22 16:45:16 UTC
XSLT editor should support the creation of templates for the xsl file.
It should have support for both matched and named templates as shown

1. Matched template:

<xsl:template match="ns1:Order">
   <ns:CustomerHistoryEntry>
      <ns:OrderLookupInfo>
         <xsl:apply-templates select="ns1:OrderItems/ns1:item/ns1:ITM_NUMBER"/>
      </ns:OrderLookupInfo>
   </ns:CustomerHistoryEntry>
</xsl:template>

with the template for the “ITM_NUMBER” element in the source tree as follows

<xsl:template match="ns1:ITM_NUMBER">
   <ns:ITM_NUMBER>
      <xsl:value-of select="."/>
   </ns:ITM_NUMBER>
</xsl:template>

3. Named template: with the ability to pass parameters

<xsl:template name=”CreateCustomerEntry”>
   <xsl:param name=”OrderParam”>
   <ns:CustomerHistoryEntry>
      <ns:OrderLookupInfo>
         <xsl:apply-templates 		     select="$OrderParam/ns1:OrderItems/ns1:item/ns1:ITM_NUMBER"/>
      </ns:OrderLookupInfo>
 </ns:CustomerHistoryEntry>

where when calling this template the 'Order' parameter is passed in as shown.

<xsl:template match=”ns1:Orders”>
   <ns:CustomerHistoryEntries>	
      <xsl:call-template name=”CreateCustomerEntry”>
         <xsl:with-param name=”OrderParam” select=”ns1:Order”>
      </xsl:call-template>
   </ns:CustomerHistoryEntries>
</xsl:template>
Comment 1 ceklock 2011-09-19 21:33:45 UTC
Maybe you can provide some more information about this enhancement.