Search is not available for this dataset
content
stringlengths
0
376M
<reponame>npocmaka/Windows-Server-2003 Option Explicit Const ForReading= 1 Const TextualCompare= 1 Function ManDskSpc( ByVal SrcFileName, ByVal DstFileName, ByVal Factor ) Dim fs, SrcFile, DstFile, LineRead, NewLine Set fs= CreateObject( "Scripting.FileSystemObject" ) If Not fs.FileExists( SrcFileName )Then ' Fail if source file not present ManDskSpace= False Exit Function End If Set SrcFile= fs.OpenTextFile( SrcFileName, ForReading ) ' open source Set DstFile= fs.CreateTextFile( DstFileName, True ) ' overwrite destination Do While Not SrcFile.AtEndOfStream ' till the source file ends LineRead= LTrim( SrcFile.ReadLine() ) ' Read line removing leading spaces NewLine = ProcessLine(LineRead) DstFile.WriteLine NewLine ' write the untouched or modified line Loop ManDskSpc= True ' everything is okay, NO ERRORS End Function Function ProcessLine(ByVal LineRead) Dim Pos, Pos2, Pos3 Dim TempStr, Val1, Val2, NewLine ProcessLine = LineRead Pos= InStr( 1, LineRead, ":TempDirSpace", TextualCompare ) If Pos = 0 Then ' doesn't have TempDirSpace, but may have WinDirSpace Pos= InStr( 1, LineRead, ":WinDirSpace", TextualCompare ) End If If Pos <> 0 Then ' If there is a "TempDirSpace" or "WinDirSpace" in line it MAY be interesting ' Pos2= InStr( Pos + Len( "TempDirSpace" ), LineRead, "=", TextualCompare ) Pos2 = InStr( Pos, LineRead, "=", TextualCompare ) If Pos2 <> 0 Then ' the line is interesting if it also has an equal Pos3= InStr( Pos2, LineRead, ",", TextualCompare ) TempStr= Right( LineRead, Len( LineRead ) - Pos2 ) ' the first value is right after the '=' sign If Pos3 <> 0 Then ' If this is a double entry trim the next value for now TempStr= Left( TempStr, Len( TempStr) - ( Len( LineRead ) - Pos3 + 1 ) ) End If Val1= Round(CDbl(TempStr)*Factor) ' get value multiply by factor If Pos3 <> 0 Then ' if this is a double entry get the next value as well TempStr= Right( LineRead, Len( LineRead ) - Pos3 ) Val2= Round(CDbl(TempStr)*Factor) ' multiply by the factor End If NewLine= Left( LineRead, Pos2 ) & " " & Val1 ' reconstruct first part of entry If Pos3 <> 0 Then ' if this is a dual entry, append the second part NewLine= NewLine & "," & Val2 End If ProcessLine = NewLine ' the new line is the line to write back End If End If End Function Function Launch ' extracts args and calls ManDskSpc() Dim SrcFileName, DstFileName If WScript.Arguments.Count() <> 3 Or Not IsNumeric( WScript.Arguments(2) ) Then ' bad args Wscript.Echo "Bad args" Wscript.Echo "ManDskSpc <src file> <dst file> <factor>" Launch = 1 Exit Function End If SrcFileName= WScript.Arguments(0) DstFileName= WScript.Arguments(1) Factor= CDbl( WScript.Arguments(2) ) Wscript.Echo SrcFileName & " * " & Factor & " ==> " & DstFileName ' show file names If Not ManDskSpc( SrcFileName , DstFileName, Factor ) Then ' call function and check return WScript.Echo "Failed to ManDskSpace!" Launch = 1 Exit Function End If WScript.Echo "Done" Launch = 0 End Function ' MAIN ' global vars Dim iRet, Factor iRet = Launch WScript.Quit(iRet)
<filename>admin/wmi/wbem/scripting/test/whistler/directory/rasclient.frm VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 6180 ClientLeft = 60 ClientTop = 345 ClientWidth = 5160 LinkTopic = "Form1" ScaleHeight = 6180 ScaleWidth = 5160 StartUpPosition = 3 'Windows Default Begin VB.Frame Frame3 Caption = "API" Height = 735 Left = 240 TabIndex = 13 Top = 240 Width = 4335 Begin VB.OptionButton UseADSI Caption = "ADSI" Height = 255 Left = 2640 TabIndex = 15 Top = 360 Width = 1455 End Begin VB.OptionButton UseWMI Caption = "WMI" Height = 255 Left = 240 TabIndex = 14 Top = 360 Value = -1 'True Width = 1335 End End Begin VB.Frame Frame2 Caption = "Binding" Height = 855 Left = 240 TabIndex = 10 Top = 1080 Width = 4335 Begin VB.OptionButton LateBound Caption = "Late-Bound" Height = 195 Left = 2640 TabIndex = 12 Top = 360 Value = -1 'True Width = 1455 End Begin VB.OptionButton EarlyBound Caption = "Early-Bound" Height = 195 Left = 240 TabIndex = 11 Top = 360 Width = 1335 End End Begin VB.CommandButton cmdSet Caption = "Set" Enabled = 0 'False Height = 375 Left = 1560 TabIndex = 9 Top = 5640 Width = 1455 End Begin VB.CommandButton cmdGet Caption = "Get" Height = 375 Left = 3720 TabIndex = 2 Top = 2520 Width = 1335 End Begin VB.Frame Frame1 Caption = "CallBack" Height = 1695 Left = 120 TabIndex = 4 Top = 3600 Width = 4935 Begin VB.TextBox phoneNumber Height = 375 Left = 1800 TabIndex = 8 Top = 1080 Width = 1935 End Begin VB.OptionButton setByAdmin Caption = "Preset To:" Height = 255 Left = 240 TabIndex = 7 Top = 1080 Width = 1095 End Begin VB.OptionButton setByTheCaller Caption = "Set By The Caller" Height = 255 Left = 240 TabIndex = 6 Top = 720 Width = 2655 End Begin VB.OptionButton noCallBack Caption = "NoCallBack" Height = 255 Left = 240 TabIndex = 5 Top = 360 Width = 1935 End End Begin VB.CheckBox chkDialin Caption = "Dial-in Permission" Height = 255 Left = 240 TabIndex = 3 Top = 3120 Width = 2175 End Begin VB.TextBox adsPath Height = 375 Left = 240 TabIndex = 1 Text = "umi:///winnt/computer=alanbos4" Top = 2520 Width = 3375 End Begin VB.Label Label1 Caption = "User Path" Height = 255 Left = 240 TabIndex = 0 Top = 2160 Width = 1215 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Public wbemObject As SWbemObjectEx Public lateboundObject Public ras As ADsRas Public adsiObject As IADs Private Sub cmdGet_Click() origMousePointer = Form1.MousePointer Form1.MousePointer = vbHourglass Dim conn As SWbemServicesEx If UseWMI.Value Then Set conn = GetObject("umi:///winnt/computer=alanbos4") If EarlyBound.Value Then If UseWMI.Value Then Set wbemObject = conn.Get("User=guest") Set ras = wbemObject Else Set adsiObject = GetObject("WinNT://REDMOND/ALANBOS4/Guest") Set ras = adsiObject End If Else If UseWMI.Value Then Set lateboundObject = conn.Get("User=guest") Else Set lateboundObject = GetObject("WinNT://REDMOND/ALANBOS4/Guest") End If End If If EarlyBound.Value Then If (ras.DialinPrivilege = True) Then chkDialin.Value = 1 Else chkDialin.Value = 0 End If l = ras.GetRasCallBack If (l And ADS_RAS_NOCALLBACK) Then noCallBack = True ElseIf (l And ADS_RAS_CALLER_SETCALLBACK) Then setByTheCaller = True ElseIf (l And ADS_RAS_ADMIN_SETCALLBACK) Then setByAdmin = True phoneNumber = ras.GetRasPhoneNumber End If Else If (lateboundObject.DialinPrivilege = True) Then chkDialin.Value = 1 Else chkDialin.Value = 0 End If l = lateboundObject.GetRasCallBack If (l And ADS_RAS_NOCALLBACK) Then noCallBack = True ElseIf (l And ADS_RAS_CALLER_SETCALLBACK) Then setByTheCaller = True ElseIf (l And ADS_RAS_ADMIN_SETCALLBACK) Then setByAdmin = True phoneNumber = lateboundObject.GetRasPhoneNumber End If End If ' Once we have retrieved we can set cmdSet.Enabled = True Form1.MousePointer = origMousePointer End Sub Private Sub cmdSet_Click() If EarlyBound.Value Then If (chkDialin.Value = 0) Then ras.DialinPrivilege = False Else ras.DialinPrivilege = True End If If (noCallBack) Then ras.SetRasCallBack ADS_RAS_NOCALLBACK ElseIf (setByTheCaller) Then ras.SetRasCallBack ADS_RAS_CALLER_SETCALLBACK ElseIf (setByAdmin) Then ras.SetRasCallBack ADS_RAS_ADMIN_SETCALLBACK, phoneNumber End If Else If (chkDialin.Value = 0) Then lateboundObject.DialinPrivilege = False Else lateboundObject.DialinPrivilege = True End If If (noCallBack) Then lateboundObject.SetRasCallBack ADS_RAS_NOCALLBACK ElseIf (setByTheCaller) Then lateboundObject.SetRasCallBack ADS_RAS_CALLER_SETCALLBACK ElseIf (setByAdmin) Then lateboundObject.SetRasCallBack ADS_RAS_ADMIN_SETCALLBACK, phoneNumber End If End If End Sub
Function GCD(a,b) Do If a Mod b > 0 Then c = a Mod b a = b b = c Else GCD = b Exit Do End If Loop End Function WScript.Echo "The GCD of 48 and 18 is " & GCD(48,18) & "." WScript.Echo "The GCD of 1280 and 240 is " & GCD(1280,240) & "." WScript.Echo "The GCD of 1280 and 240 is " & GCD(3475689,23566319) & "." WScript.Echo "The GCD of 1280 and 240 is " & GCD(123456789,234736437) & "."
' Read the number of rows to use.. intRows = WScript.StdIn.ReadLine ' Get the first number of the final row so we can calculate widths... intLastRowStart = (intRows ^ 2 - intRows) \ 2 + 1 For i = 1 To intRows intLastRow = intLastRowStart For j = 1 To i k = k + 1 WScript.StdOut.Write Space(Len(intLastRow) - Len(k)) & k & " " intLastRow = intLastRow + 1 Next WScript.StdOut.WriteLine "" Next
<reponame>LaudateCorpus1/RosettaCodeData Sub GuessNumberPlayer() Dim iGuess As Integer, iLow As Integer, iHigh As Integer, iCount As Integer Dim vSolved As Variant On Error GoTo ErrHandler MsgBox "Pick a number between 1 and 100. I will guess it!", vbInformation + vbOKOnly, "Rosetta Code | Guess the Number Player" iCount = 0 iLow = 1 iHigh = 100 Do While Not vSolved = "Y" iGuess = Application.WorksheetFunction.RandBetween(iLow, iHigh) iCount = iCount + 1 CheckGuess: vSolved = InputBox("My guess: " & iGuess & vbCr & vbCr & "Y = Yes, correct guess" & vbCr & _ "H = your number is higher" & vbCr & "L = your number is lower" & vbCr & "X = exit game", "Rosetta Code | Guess the Number Player | Guess " & iCount) Select Case vSolved Case "Y", "y": GoTo CorrectGuess Case "X", "x": Exit Sub Case "H", "h": iLow = iGuess + 1 Case "L", "l": iHigh = iGuess - 1 Case Else: GoTo CheckGuess End Select Loop CorrectGuess: MsgBox "I guessed number " & iGuess & " in just " & iCount & " attempts!", vbExclamation + vbOKOnly, "Rosetta Code | Guess the Number Player" Exit Sub ErrHandler: MsgBox "Not possible. Were you cheating?!", vbCritical + vbOKOnly, "Rosetta Code | Guess the Number Player | ERROR!" End Sub
Option Explicit Sub Main() Dim i As Integer For i = 1 To 17 Debug.Print "Factorial " & i & " , recursive : " & FactRec(i) & ", iterative : " & FactIter(i) Next Debug.Print "Factorial 120, recursive : " & FactRec(120) & ", iterative : " & FactIter(120) End Sub Private Function FactRec(Nb As Integer) As String If Nb > 170 Or Nb < 0 Then FactRec = 0: Exit Function If Nb = 1 Or Nb = 0 Then FactRec = 1 Else FactRec = Nb * FactRec(Nb - 1) End If End Function Private Function FactIter(Nb As Integer) If Nb > 170 Or Nb < 0 Then FactIter = 0: Exit Function Dim i As Integer, F F = 1 For i = 1 To Nb F = F * i Next i FactIter = F End Function
<filename>admin/wmi/wbem/scripting/test/vbscript/privilege2.vbs<gh_stars>10-100 on error resume next set locator = CreateObject("WbemScripting.SWbemLocator") set p = locator.security_.privileges p.addasstring "SeSecurityPrivilege" p.addasstring "Seassignprimarytokenprivilege" p.addasstring "Seauditprivilege" p.addasstring "SeBackupPrivilege" p.addasstring "Sechangenotifyprivilege" p.addasstring "Secreatepagefileprivilege" p.addasstring "Secreatetokenprivilege" p.addasstring "SeLockMemoryPrivilege" p.addasstring "SeIncreaseQuotaPrivilege" p.addasstring "SeMachineAccountPrivilege" p.addasstring "SeTcbPrivilege" p.addasstring "SeTakeOwnershipPrivilege" p.addasstring "SeLoadDriverPrivilege" p.addasstring "SeSystemProfilePrivilege" p.addasstring "SeSystemtimePrivilege" p.addasstring "SeProfileSingleProcessPrivilege" p.addasstring "SeIncreaseBasePriorityPrivilege" p.addasstring "SeCreatePermanentPrivilege" p.addasstring "SeRestorePrivilege" p.addasstring "SeShutdownPrivilege" p.addasstring "SeDebugPrivilege" p.addasstring "SeSystemEnvironmentPrivilege" p.addasstring "SeRemoteShutdownPrivilege" p.addasstring "SeRemoteShutdownPrivilege",false p.addasstring "SeUndockPrivilege" p.addasstring "SeSyncAgentPrivilege" p.addasstring "SeEnableDelegationPrivilege" wscript.echo p.count for each pr in p WScript.Echo pr.Identifier & " [" & pr.Name & "] [" & pr.DisplayName & "]" & ": " & pr.IsEnabled next if err <> 0 then WScript.Echo Hex(Err.Number), Err.Description, Err.Source end if
<gh_stars>1-10 Private Sub Knuth(Optional ByRef a As Variant) Dim t As Variant, i As Integer If Not IsMissing(a) Then For i = UBound(a) To LBound(a) + 1 Step -1 j = Int((UBound(a) - LBound(a) + 1) * Rnd + LBound(a)) t = a(i) a(i) = a(j) a(j) = t Next i End If End Sub Public Sub program() Dim b As Variant, c As Variant, d As Variant, e As Variant Randomize 'imagine an empty array on this line b = [{10}] c = [{10, 20}] d = [{10, 20, 30}] e = [{11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}] f = [{"This ", "is ", "a ", "test"}] Debug.Print "Before:" Knuth 'feeding an empty array ;) Debug.Print "After: " Debug.Print "Before:"; For Each i In b: Debug.Print i;: Next i: Debug.Print Knuth b Debug.Print "After: "; For Each i In b: Debug.Print i;: Next i: Debug.Print Debug.Print "Before:"; For Each i In c: Debug.Print i;: Next i: Debug.Print Knuth c Debug.Print "After: "; For Each i In c: Debug.Print i;: Next i: Debug.Print Debug.Print "Before:"; For Each i In d: Debug.Print i;: Next i: Debug.Print Knuth d Debug.Print "After: "; For Each i In d: Debug.Print i;: Next i: Debug.Print Debug.Print "Before:"; For Each i In e: Debug.Print i;: Next i: Debug.Print Knuth e Debug.Print "After: "; For Each i In e: Debug.Print i;: Next i: Debug.Print Debug.Print "Before:"; For Each i In f: Debug.Print i;: Next i: Debug.Print Knuth f Debug.Print "After: "; For Each i In f: Debug.Print i;: Next i: Debug.Print End Sub
dim flat set flat = new flattener flat.itemSeparator = "~" wscript.echo join( flat.flatten( array( array( 1 ),2,array(array(3,4),5),array(array(array())),array(array(array(6))),7,8,array())), "!")
<gh_stars>1-10 Attribute VB_Name = "Module1" Const MAX_PATH& = 260 Declare Function TerminateProcess Lib "kernel32" (ByVal ApphProcess As Long, ByVal uExitCode As Long) As Long Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal blnheritHandle As Long, ByVal dwAppProcessId As Long) As Long Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long Declare Function ProcessNext Lib "kernel32" Alias "Process32Next" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long Declare Function CreateToolhelpSnapshot Lib "kernel32" Alias "CreateToolhelp32Snapshot" (ByVal lFlags As Long, lProcessID As Long) As Long Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Type PROCESSENTRY32 dwSize As Long cntUsage As Long th32ProcessID As Long th32DefaultHeapID As Long th32ModuleID As Long cntThreads As Long th32ParentProcessID As Long pcPriClassBase As Long dwFlags As Long szexeFile As String * MAX_PATH End Type Public Declare Function RegisterServiceProcess Lib "kernel32" (ByVal ProcessID As Long, ByVal ServiceFlags As Long) As Long Public Declare Function GetCurrentProcessId Lib "kernel32" () As Long
<reponame>npocmaka/Windows-Server-2003<filename>admin/wmi/wbem/tools/wmic/textvaluelist.xsl <?xml version="1.0"?> <!-- Copyright (c) Microsoft Corporation. All rights reserved. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output encoding="utf-16" omit-xml-declaration ="yes"/> <xsl:template match="/" xml:space="preserve"> <xsl:apply-templates select="//INSTANCE"/> </xsl:template> <xsl:template match="INSTANCE" xml:space="preserve"> <xsl:apply-templates select="PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE"/> </xsl:template> <xsl:template match="PROPERTY" xml:space="preserve"><xsl:value-of select="@NAME"/>=<xsl:apply-templates select="VALUE"><xsl:with-param name="type"><xsl:value-of select="@TYPE"/></xsl:with-param></xsl:apply-templates> </xsl:template> <xsl:template match="PROPERTY.ARRAY" xml:space="preserve"><xsl:value-of select="@NAME"/>=<xsl:apply-templates select="VALUE.ARRAY"><xsl:with-param name="includequotes">true</xsl:with-param><xsl:with-param name="type"><xsl:value-of select="@TYPE"/></xsl:with-param></xsl:apply-templates> </xsl:template> <xsl:template match="PROPERTY.REFERENCE" xml:space="preserve"><xsl:value-of select="@NAME"/>=<xsl:apply-templates select="VALUE.REFERENCE"></xsl:apply-templates> </xsl:template> <xsl:template match="VALUE.REFERENCE">"<xsl:apply-templates select="INSTANCEPATH/NAMESPACEPATH"/><xsl:apply-templates select="INSTANCEPATH/INSTANCENAME|INSTANCENAME"/>"</xsl:template> <xsl:template match="NAMESPACEPATH">\\<xsl:value-of select="HOST/text()"/><xsl:for-each select="LOCALNAMESPACEPATH/NAMESPACE">\<xsl:value-of select="@NAME"/></xsl:for-each>:</xsl:template> <xsl:template match="INSTANCENAME"><xsl:value-of select="@CLASSNAME"/><xsl:for-each select="KEYBINDING"><xsl:if test="position()=1">.</xsl:if><xsl:value-of select="@NAME"/>="<xsl:value-of select="KEYVALUE/text()"/>"<xsl:if test="position()!=last()">,</xsl:if></xsl:for-each></xsl:template> <xsl:template match="VALUE.ARRAY"><xsl:param name="type"/>{<xsl:for-each select="VALUE"> <xsl:apply-templates select="."> <xsl:with-param name="type"> <xsl:value-of select="$type"/> </xsl:with-param> <xsl:with-param name="includequotes">true</xsl:with-param> </xsl:apply-templates> <xsl:if test="position()!=last()">,</xsl:if> </xsl:for-each>}</xsl:template> <xsl:template match="VALUE"> <xsl:param name="type"/> <xsl:param name="includequotes"/> <xsl:choose> <xsl:when test="$type='string'"> <xsl:if test="$includequotes='true'">"</xsl:if><xsl:value-of select="."/><xsl:if test="$includequotes='true'">"</xsl:if> </xsl:when> <xsl:when test="$type='char16'"> '<xsl:value-of select="."/>' </xsl:when> <xsl:otherwise> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
<reponame>LaudateCorpus1/RosettaCodeData <code>qqqq</code>
<?xml version="1.0" standalone="no"?> <!DOCTYPE stylesheet [ <!ENTITY UPPERCASE "ABCDEFGHIJKLMNOPQRSTUVWXYZ"> <!ENTITY LOWERCASE "abcdefghijklmnopqrstuvwxyz"> <!ENTITY UPPER2LOWER " '&UPPERCASE;' , '&LOWERCASE;' "> <!ENTITY LOWER2UPPER " '&LOWERCASE;' , '&UPPERCASE;' "> <!ENTITY ALPHALOWER "ABCDEFxX0123456789"> <!ENTITY HEXUPPER "ABCDEFxX0123456789"> <!ENTITY HEXLOWER "abcdefxX0123456789"> <!ENTITY HEXU2L " '&HEXLOWER;' , '&HEXUPPER;' "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="exsl dyn math xlink"> <!-- ================================================================================ Generate XTeller for BIFS ================================================================================ --> <xsl:template name="WRITE_VIEW_BIF_TREE"> <xsl:for-each select="$G_SYS_MODS/MODULE"> <xsl:variable name="modRef_" select="self::node()"/> <xsl:variable name="m_inst_" select="$modRef_/@INSTANCE"/> <xsl:element name="SET"> <xsl:attribute name="ID"><xsl:value-of select="@INSTANCE"/></xsl:attribute> <xsl:attribute name="CLASS">MODULE</xsl:attribute> <xsl:choose> <xsl:when test="$modRef_/@POTENTIAL_INDEX"> <xsl:attribute name="POTENTIAL_INDEX"><xsl:value-of select="$modRef_/@POTENTIAL_INDEX"/></xsl:attribute> </xsl:when> <xsl:when test="$modRef_/@CONNECTED_INDEX"> <xsl:attribute name="CONNECTED_INDEX"><xsl:value-of select="$modRef_/@CONNECTED_INDEX"/></xsl:attribute> </xsl:when> </xsl:choose> <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. --> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name" NAME="INSTANCE" VALUE="{@INSTANCE}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type" NAME="MODTYPE" VALUE="{@MODTYPE}" VIEWICON="{LICENSEINFO/@ICON_NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{@HWVERSION}"/> <xsl:variable name="ipClassification_"> <xsl:call-template name="F_ModClass_To_IpClassification"> <xsl:with-param name="iModClass" select="@MODCLASS"/> <xsl:with-param name="iBusStd" select="@BUSSTD"/> </xsl:call-template> </xsl:variable> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/> <!-- Write Bus Interfaces here --> <xsl:for-each select="$G_SYS_MODS"> <!-- To put things in the right scope for the keys below --> <xsl:variable name="m_bifs_all_" select="key('G_MAP_ALL_BIFS', $m_inst_)"/> <xsl:for-each select="$m_bifs_all_"> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> <xsl:call-template name="WRITE_VIEW_BIF_TREE_SET"> <xsl:with-param name="iModRef" select="$modRef_"/> <xsl:with-param name="iBifRef" select="self::node()"/> </xsl:call-template> </xsl:for-each> <!-- End of bus interface loop --> </xsl:for-each> </xsl:element> </xsl:for-each> <!-- End module loop --> </xsl:template> <xsl:template name="WRITE_VIEW_BIF_TREE_SET"> <xsl:param name="iModRef" select="'__NONE__'"/> <xsl:param name="iBifRef" select="'__NONE__'"/> <xsl:param name="iBifCol" select="'__NONE__'"/> <xsl:element name="SET"> <xsl:if test="not($iBifCol = '__NONE__')"> <xsl:attribute name="RGB_FG"><xsl:value-of select="$iBifCol"/></xsl:attribute> </xsl:if> <xsl:attribute name="ID"><xsl:value-of select="$iBifRef/@NAME"/></xsl:attribute> <xsl:attribute name="CLASS">BUSINTERFACE</xsl:attribute> <xsl:if test="($iBifRef/@TYPE = 'MONITOR')"> <xsl:choose> <xsl:when test="($iBifRef/@IS_P2P)"> <xsl:attribute name="IS_P2P_MONITOR">TRUE</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="IS_SHARED_MONITOR">TRUE</xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:if> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="{$iBifRef/@NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Type" NAME="TYPE" VALUE="{$iBifRef/@TYPE}"/> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute> <xsl:attribute name="NAME">BUSSTD</xsl:attribute> <xsl:choose> <xsl:when test="($iBifRef/@BUSSTD_PSF)"> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSSTD_PSF"/></xsl:attribute> </xsl:when> <xsl:when test="($iBifRef/@BUSSTD)"> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSSTD"/></xsl:attribute> </xsl:when> <xsl:when test="($iBifRef/@BUS_STD)"> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUS_STD"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VALUE">USER</xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:element> <xsl:choose> <xsl:when test="($iBifRef/@TYPE = 'INITIATOR')"> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">TEXTBOX</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:choose> <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))"> <xsl:variable name="def_noc_name_"><xsl:value-of select="$iModRef/@INSTANCE"/>_<xsl:value-of select="$iBifRef/@NAME"/></xsl:variable> <xsl:attribute name="VALUE"><xsl:value-of select="$def_noc_name_"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))"> <xsl:element name="VARIABLE"> <xsl:choose> <xsl:when test="(($iBifRef/@BUSSTD = 'AXI') and ($iBifRef/@TYPE = 'SLAVE') and ($G_HAVE_XB_BUSSES = 'TRUE'))"> <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VALUE">No Connection</xsl:attribute> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="(($iBifRef/@TYPE = 'MONITOR') and ($iBifRef/MONITORS/MONITOR))"> <xsl:variable name="monitorBif_" select="$iBifRef/MONITORS/MONITOR"/> <xsl:variable name="p2pMonConn_" select="concat($monitorBif_/@INSTANCE,'.',$monitorBif_/@BUSINTERFACE)"/> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VALUE"><xsl:value-of select="$p2pMonConn_"/></xsl:attribute> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:when test="($iBifRef/@TYPE = 'SLAVE')"> <xsl:element name="VARIABLE"> <xsl:choose> <xsl:when test="(($iBifRef/@BUSSTD = 'AXI') and ($G_HAVE_XB_BUSSES ='TRUE'))"> <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:choose> <xsl:when test="$iBifRef/MASTERS/MASTER"> <xsl:variable name="mastersList_"><xsl:for-each select="$iBifRef/MASTERS/MASTER"><xsl:if test="position() &gt; 1"> &amp; </xsl:if><xsl:value-of select="concat(@INSTANCE,'.',@BUSINTERFACE)"/></xsl:for-each></xsl:variable> <xsl:variable name="mastersConn_" select="concat($iBifRef/@BUSNAME,':',$mastersList_)"/> <xsl:attribute name="VALUE"><xsl:value-of select="$mastersConn_"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> <xsl:template name="WRITE_VIEW_BIF_FLAT"> <xsl:for-each select="$G_SYS_MODS/MODULE"> <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/> <xsl:variable name="moduleRef_" select="self::node()"/> <xsl:variable name="busifsRef_"> <xsl:choose> <xsl:when test="self::node()/BUSINTERFACES"><xsl:text>$moduleRef_/BUSINTERFACES</xsl:text></xsl:when> <xsl:otherwise><xsl:text>$moduleRef_</xsl:text></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:for-each select="dyn:evaluate($busifsRef_)/BUSINTERFACE[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]"> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> <xsl:call-template name="WRITE_VIEW_BIF_FLAT_SET"> <xsl:with-param name="iModRef" select="$moduleRef_"/> <xsl:with-param name="iBifRef" select="self::node()"/> </xsl:call-template> </xsl:for-each> <!-- End of Bus Interface Loop --> </xsl:for-each> <!-- End of Module loop --> </xsl:template> <xsl:template name="WRITE_VIEW_BIF_FLAT_SET"> <xsl:param name="iModRef" select="'__NONE__'"/> <xsl:param name="iBifRef" select="'__NONE__'"/> <xsl:param name="iBifCol" select="'__NONE__'"/> <xsl:element name="SET"> <xsl:if test="not($iBifCol = '__NONE__')"> <xsl:attribute name="RGB_FG"><xsl:value-of select="$iBifCol"/></xsl:attribute> </xsl:if> <!-- <xsl:attribute name="ID"><xsl:value-of select="$iModRef/@INSTANCE"/>.<xsl:value-of select="$iBifRef/@NAME"/></xsl:attribute> --> <xsl:attribute name="ID"><xsl:value-of select="$iBifRef/@NAME"/></xsl:attribute> <xsl:attribute name="CLASS">BUSINTERFACE</xsl:attribute> <xsl:if test="($iBifRef/@TYPE = 'MONITOR')"> <xsl:choose> <xsl:when test="($iBifRef/@IS_P2P)"> <xsl:attribute name="IS_P2P_MONITOR">TRUE</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="IS_SHARED_MONITOR">TRUE</xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:if> <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. --> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE" VALUE="{$iModRef/@INSTANCE}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Bus Interface" NAME="NAME" VALUE="{$iBifRef/@NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type" NAME="MODTYPE" VALUE="{$iModRef/@MODTYPE}" VIEWICON="{$iModRef/LICENSEINFO/@ICON_NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$iModRef/@HWVERSION}"/> <xsl:variable name="ipClassification_"> <xsl:call-template name="F_ModClass_To_IpClassification"> <xsl:with-param name="iModClass" select="$iModRef/@MODCLASS"/> <xsl:with-param name="iBusStd" select="$iBifRef/@BUSSTD"/> </xsl:call-template> </xsl:variable> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Classification" NAME="IPCLASS" VALUE="{$ipClassification_}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Type" NAME="TYPE" VALUE="{$iBifRef/@TYPE}"/> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Standard</xsl:attribute> <xsl:attribute name="NAME">BUSSTD</xsl:attribute> <xsl:choose> <xsl:when test="($iBifRef/@BUS_STD)"> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUS_STD"/></xsl:attribute> </xsl:when> <xsl:when test="($iBifRef/@BUSSTD)"> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSSTD"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VALUE">USER</xsl:attribute> </xsl:otherwise> </xsl:choose> </xsl:element> <xsl:choose> <xsl:when test="$iBifRef/@TYPE = 'INITIATOR'"> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">TEXTBOX</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:choose> <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))"> <xsl:variable name="def_noc_name_"><xsl:value-of select="$iModRef/@INSTANCE"/>_<xsl:value-of select="$iBifRef/@NAME"/></xsl:variable> <xsl:attribute name="VALUE"><xsl:value-of select="$def_noc_name_"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="(($iBifRef/@BUSNAME = '__NOC__') or ($iBifRef/@BUSNAME = '') or not($iBifRef/@BUSNAME))"> <xsl:element name="VARIABLE"> <xsl:choose> <xsl:when test="(($iBifRef/@BUSSTD = 'AXI') and ($iBifRef/@TYPE = 'SLAVE') and ($G_HAVE_XB_BUSSES = 'TRUE'))"> <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VALUE">No Connection</xsl:attribute> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:choose> <xsl:when test="(($iBifRef/@TYPE = 'MONITOR') and ($iBifRef/MONITORS/MONITOR))"> <xsl:variable name="monitorBif_" select="$iBifRef/MONITORS/MONITOR"/> <xsl:variable name="p2pMonConn_" select="concat($monitorBif_/@INSTANCE,'.',$monitorBif_/@BUSINTERFACE)"/> <!-- <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$p2pMonConn_}"/> --> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VALUE"><xsl:value-of select="$p2pMonConn_"/></xsl:attribute> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:when test="($iBifRef/@TYPE = 'SLAVE')"> <xsl:element name="VARIABLE"> <xsl:choose> <xsl:when test="$iBifRef/@BUSSTD = 'AXI' and $G_HAVE_XB_BUSSES ='TRUE'"> <xsl:attribute name="VIEWTYPE">BUTTON</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:choose> <xsl:when test="$iBifRef/MASTERS/MASTER"> <xsl:variable name="mastersList_"><xsl:for-each select="$iBifRef/MASTERS/MASTER"><xsl:if test="position() &gt; 1"> &amp; </xsl:if><xsl:value-of select="concat(@INSTANCE,'.',@BUSINTERFACE)"/></xsl:for-each></xsl:variable> <xsl:variable name="mastersConn_" select="concat($iBifRef/@BUSNAME,':',$mastersList_)"/> <xsl:attribute name="VALUE"><xsl:value-of select="$mastersConn_"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:when> <xsl:otherwise> <!-- <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Bus Name" NAME="BUSNAME" VALUE="{$iBifRef/@BUSNAME}"/> --> <xsl:element name="VARIABLE"> <xsl:attribute name="VIEWTYPE">DROPDOWN</xsl:attribute> <xsl:attribute name="VIEWDISP">Bus Name</xsl:attribute> <xsl:attribute name="NAME">BUSNAME</xsl:attribute> <xsl:attribute name="VALUE"><xsl:value-of select="$iBifRef/@BUSNAME"/></xsl:attribute> <xsl:if test="$G_ADD_CHOICES = 'TRUE'"> <xsl:call-template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:with-param name="iModRef" select="$iModRef"/> <xsl:with-param name="iBifRef" select="$iBifRef"/> </xsl:call-template> </xsl:if> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> <xsl:template name="WRITE_VIEW_BIF_BUSNAME_CHOICES"> <xsl:param name="iModRef" select="None"/> <xsl:param name="iBifRef" select="None"/> <xsl:variable name="b_bus_" select="$iBifRef/@BUSNAME"/> <xsl:variable name="b_name_" select="$iBifRef/@NAME"/> <xsl:variable name="b_type_" select="$iBifRef/@TYPE"/> <xsl:variable name="b_bstd_" select="$iBifRef/@BUSSTD"/> <xsl:variable name="b_bstd_psf_" select="$iBifRef/@BUSSTD_PSF"/> <xsl:variable name="b_protocol_" select="$iBifRef/@PROTOCOL"/> <xsl:element name="CHOICES"> <xsl:choose> <xsl:when test="($b_type_ = 'INITIATOR')"> <xsl:variable name="initiator_busName_"> <xsl:choose> <xsl:when test="($b_bus_ = '__NOC__')"><xsl:value-of select="concat($iModRef/@INSTANCE,'_',$b_name_)"/></xsl:when> <xsl:otherwise><xsl:value-of select="$b_bus_"/></xsl:otherwise> </xsl:choose> </xsl:variable> <CHOICE NAME="{$initiator_busName_}"/> </xsl:when> <xsl:when test="(($b_type_ = 'MASTER') or ($b_type_ = 'SLAVE') or ($b_type_ = 'MASTER_SLAVE'))"> <CHOICE NAME="No Connection"/> <xsl:for-each select="$G_SYS_MODS"> <!-- To set correct scope for KEY functions below --> <xsl:if test="not(($b_bstd_ = 'AXI') and ($b_type_ = 'SLAVE'))"> <CHOICE NAME="New Connection"/> </xsl:if> <xsl:for-each select="key('G_MAP_BUSSES',$b_bstd_)"> <xsl:variable name="busName_" select="@INSTANCE"/> <xsl:choose> <!-- CR#590473 This was setting wrong choices filled up--> <!--xsl:when test="(($b_type_ = 'SLAVE') and (@IS_CROSSBAR) and $iBifRef/@PROTOCOL)"> <xsl:for-each select="key('G_MAP_MST_BIFS',$busName_)[(not(@PROTOCOL) or (@PROTOCOL = $b_protocol_) or (@PROTOCOL = 'GENERIC'))]"> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="insName_" select="../../@INSTANCE"/> <xsl:variable name="xb_slave_busName_" select="concat($busName_,':',$insName_,'.',$bifName_)"/> <CHOICE NAME="{$xb_slave_busName_}"/> </xsl:for-each> </xsl:when--> <xsl:when test="($b_type_ = 'SLAVE') and (@IS_CROSSBAR)"> <xsl:for-each select="key('G_MAP_MST_BIFS',$busName_)"> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="insName_" select="../../@INSTANCE"/> <xsl:variable name="xb_slave_busName_" select="concat($busName_,':',$insName_,'.',$bifName_)"/> <CHOICE NAME="{$xb_slave_busName_}"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <CHOICE NAME="{$busName_}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:when> <xsl:when test="($b_type_ = 'TARGET')"> <CHOICE NAME="No Connection"/> <xsl:for-each select="$G_SYS_MODS"> <!-- To set correct scope for KEY functions below --> <xsl:variable name="use_bstd_"> <xsl:choose> <xsl:when test="(($b_bstd_ = 'AXIS') or ($b_bstd_ = 'XIL'))"> <xsl:value-of select="$b_bstd_psf_"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$b_bstd_"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="$iBifRef/@PROTOCOL"> <xsl:for-each select="key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR') and (not(@PROTOCOL) or (@PROTOCOL = $b_protocol_) or (@PROTOCOL = 'GENERIC') or ($b_protocol_ = 'GENERIC'))]"> <xsl:variable name="busName_" select="@BUSNAME"/> <xsl:choose> <xsl:when test="($busName_ = '__NOC__')"> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="insName_" select="../../@INSTANCE"/> <xsl:variable name="initiator_busName_" select="concat($insName_,'_',$bifName_)"/> <CHOICE NAME="{$initiator_busName_}"/> </xsl:when> <xsl:otherwise> <CHOICE NAME="{$busName_}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:for-each select="key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR')]"> <xsl:variable name="busName_" select="@BUSNAME"/> <xsl:choose> <xsl:when test="($busName_ = '__NOC__')"> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="insName_" select="../../@INSTANCE"/> <xsl:variable name="initiator_busName_" select="concat($insName_,'_',$bifName_)"/> <CHOICE NAME="{$initiator_busName_}"/> </xsl:when> <xsl:otherwise> <CHOICE NAME="{$busName_}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:when> <xsl:when test="($b_type_ = 'MONITOR')"> <CHOICE NAME="No Connection"/> <xsl:for-each select="$G_SYS_MODS"> <!-- To set correct scope for KEY functions below --> <xsl:choose> <xsl:when test="($iBifRef/@IS_P2P = 'TRUE')"> <xsl:for-each select="$G_SYS_MODS"> <!-- To set correct scope for KEY functions below --> <xsl:variable name="use_bstd_"> <xsl:choose> <xsl:when test="(($b_bstd_ = 'AXIS') or ($b_bstd_ = 'XIL'))"> <xsl:value-of select="$b_bstd_psf_"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$b_bstd_"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- <xsl:message>monitor p2p <xsl:value-of select="count(key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR')])"/> </xsl:message> --> <xsl:for-each select="key('G_MAP_P2P_BIFS',$use_bstd_)[(@TYPE = 'INITIATOR')]"> <xsl:variable name="busName_" select="@BUSNAME"/> <xsl:choose> <xsl:when test="($busName_ = '__NOC__')"> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="insName_" select="../../@INSTANCE"/> <xsl:variable name="initiator_busName_" select="concat($insName_,'_',$bifName_)"/> <CHOICE NAME="{$initiator_busName_}"/> </xsl:when> <xsl:otherwise> <CHOICE NAME="{$busName_}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:for-each select="key('G_MAP_BUSSES',$b_bstd_)"> <xsl:variable name="busName_" select="@INSTANCE"/> <xsl:choose> <xsl:when test="(@IS_CROSSBAR or ($b_bstd_ = 'AXI'))"> <xsl:for-each select="key('G_MAP_MOS_BIFS',$busName_)"> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="insName_" select="../../@INSTANCE"/> <!-- <xsl:variable name="xb_moni_busName_" select="concat($busName_,':',$insName_,'.',$bifName_)"/> --> <xsl:variable name="xb_moni_busName_" select="concat($insName_,'.',$bifName_)"/> <CHOICE NAME="{$xb_moni_busName_}"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <CHOICE NAME="{$busName_}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:when> </xsl:choose> </xsl:element> </xsl:template> </xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" /> <xsl:template match="/"> <!-- replace the root of the incoming document with our own model --> <xsl:element name="root"> <xsl:element name="element"> <xsl:text>Some text here</xsl:text> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet>
<filename>Task/100-doors/XSLT-1.0/100-doors-1.xslt <hallway> <door number="1">closed</door> <door number="2">closed</door> <door number="3">closed</door> <door number="4">closed</door> ... etc ... <door number="100">closed</door> <hallway>
<gh_stars>0 <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="*" mode="_designator"> <xsl:call-template name="_pprint"> <xsl:with-param name="s"> <xsl:value-of select="normalize-space(text())"/> <xsl:value-of select="stringdisplay/text()"/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="*" mode="_name"> <xsl:call-template name="_pprint"> <xsl:with-param name="s"> <xsl:if test="rename"> <xsl:value-of select="rename/text()"/> <xsl:value-of select="rename/stringdisplay/text()"/> </xsl:if> <xsl:if test="name"> <xsl:value-of select="name/text()"/> </xsl:if> <xsl:if test="not(rename|name)"> <xsl:value-of select="@name"/> </xsl:if> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template match="*" name="_value"> <xsl:call-template name="_pprint"> <xsl:with-param name="s"> <xsl:value-of select="string/text()"/> <xsl:value-of select="integer/text()"/> <xsl:value-of select="number/text()"/> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="_pprint"> <xsl:param name="s"/> <xsl:variable name="s2"> <xsl:if test="not (starts-with($s,'&amp;'))"> <xsl:value-of select="substring($s,1,1)"/> </xsl:if> <xsl:value-of select="substring($s,2)"/> </xsl:variable> <xsl:variable name="s3" select="translate($s2,'&quot;','')"/> <xsl:text>&quot;</xsl:text> <xsl:value-of select="$s3" disable-output-escaping="yes"/> <xsl:text>&quot;</xsl:text> </xsl:template> <xsl:template name="_name"> <xsl:call-template name="_pprint"> <xsl:with-param name="s"> <xsl:choose> <xsl:when test="count(rename)!=0"> <xsl:value-of select="rename/text()"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="@name"/> </xsl:otherwise> </xsl:choose> </xsl:with-param> </xsl:call-template> </xsl:template> </xsl:stylesheet>
<reponame>SoCdesign/audiomixer<filename>ZedBoard_Linux_Design/hw/xps_proj/__xps/.dswkshop/MdtTinySvgIPD_Main.xsl <?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math dyn exsl xlink"> <xsl:include href="MdtSvgDiag_Colors.xsl"/> <xsl:include href="MdtSvgDiag_Globals.xsl"/> <xsl:include href="MdtSvgDiag_StyleDefs.xsl"/> <xsl:include href="MdtSvgIPD_Dimensions.xsl"/> <xsl:include href="MdtTinySvgDiag_BifShapes.xsl"/> <xsl:param name="INSTANCE" select="'microblaze_0'"/> <xsl:variable name="G_ROOT" select="/"/> <!-- ======================= main svg block =============================== --> <xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD SVG 1.0//EN" doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd"/> <xsl:template match="EDKSYSTEM"> <xsl:if test="not($G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $INSTANCE)])"> <xsl:message>XSLT WARNING: Could not find <xsl:value-of select="$INSTANCE"/> in project's XML.</xsl:message> </xsl:if> <xsl:for-each select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE= $INSTANCE)]"> <xsl:variable name="ports_left_cnt_" select="count(PORTS/PORT[((@IS_INSTANTIATED = 'TRUE') and ((@DIR='I' or @DIR = 'IO') and not(@SIGNAME = '__NOC__') and not(@SIGNAME = '__DEF__') and (@IS_INSTANTIATED = 'TRUE')))])"/> <xsl:variable name="ports_rght_cnt_" select="count(PORTS/PORT[((@IS_INSTANTIATED = 'TRUE') and ((@DIR='O') and not(@SIGNAME = '__NOC__') and not(@SIGNAME = '__DEF__')))])"/> <xsl:variable name="bifs_left_cnt_" select="count(BUSINTERFACES/BUSINTERFACE[((@IS_INSTANTIATED = 'TRUE') and not(@BUSNAME = '__DEF__') and not(@BUSNAME = '__NOC__') and ((@IS_VALID = 'TRUE') or not(@IS_VALID)) and ((@TYPE = 'SLAVE') or (@TYPE = 'TARGET') or (@TYPE ='USER')))])"/> <xsl:variable name="bifs_rght_cnt_" select="count(BUSINTERFACES/BUSINTERFACE[((@IS_INSTANTIATED = 'TRUE') and not(@BUSNAME = '__DEF__') and not(@BUSNAME = '__NOC__') and ((@IS_VALID = 'TRUE') or not(@IS_VALID)) and ((@TYPE = 'MASTER') or (@TYPE = 'MASTER_SLAVE') or (@TYPE = 'INITIATOR') or (@TYPE ='MONITOR')))])"/> <!-- <xsl:message>Port Left Count <xsl:value-of select="$ports_left_cnt_"/></xsl:message> <xsl:message>Port Rght Count <xsl:value-of select="$ports_rght_cnt_"/></xsl:message> <xsl:message>Bifs Left Count <xsl:value-of select="$bifs_left_cnt_"/></xsl:message> <xsl:message>Bifs Rght Count <xsl:value-of select="$bifs_rght_cnt_"/></xsl:message> --> <!-- select and return the maximum between the two left and right of ports --> <xsl:variable name="PORTS_H"> <xsl:choose> <xsl:when test="(($ports_left_cnt_ &lt; 2) and ($ports_rght_cnt_ &lt; 2))"> <xsl:value-of select="(($IPD_PRT_H + $IPD_PRT_SPC) * 2) + $IPD_PRT_SY"/> </xsl:when> <!-- make sure the module is at least 2 port spaces high --> <xsl:when test="($ports_left_cnt_ &gt; $ports_rght_cnt_)"> <xsl:value-of select="(($IPD_PRT_H + $IPD_PRT_SPC) * $ports_left_cnt_) + $IPD_PRT_SY"/> </xsl:when> <xsl:when test="($ports_rght_cnt_ &gt; $ports_left_cnt_)"> <xsl:value-of select="(($IPD_PRT_H + $IPD_PRT_SPC) * $ports_rght_cnt_) + $IPD_PRT_SY"/> </xsl:when> <xsl:when test="($ports_left_cnt_ = $ports_rght_cnt_)"> <xsl:value-of select="(($IPD_PRT_H + $IPD_PRT_SPC) * $ports_left_cnt_) + $IPD_PRT_SY"/> </xsl:when> </xsl:choose> </xsl:variable> <!-- select and return the maximum between the two left and right bifs --> <xsl:variable name="BIFS_H"> <xsl:choose> <xsl:when test="($bifs_left_cnt_ &gt; $bifs_rght_cnt_)"> <xsl:value-of select="(($IPD_BIF_H + $IPD_PRT_SPC) * $bifs_left_cnt_)"/> </xsl:when> <xsl:when test="($bifs_rght_cnt_ &gt; $bifs_left_cnt_)"> <xsl:value-of select="(($IPD_BIF_H + $IPD_PRT_SPC) * $bifs_rght_cnt_)"/> </xsl:when> <xsl:when test="(($bifs_left_cnt_ = $bifs_rght_cnt_) and ($bifs_left_cnt_ &gt; 0))"> <xsl:value-of select="(($IPD_BIF_H + $IPD_PRT_SPC) * $bifs_left_cnt_)"/> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="IPD_H"> <xsl:value-of select="$PORTS_H + $BIFS_H + ($IPD_VGAP * 2)"/> </xsl:variable> <xsl:variable name="IPD_W"> <xsl:value-of select="(($IPD_HGAP * 2) + ($IPD_BIF_W * 2) + $IPD_CENTER_W)"/> </xsl:variable> <!--specify a css for the file --> <!-- <xsl:processing-instruction name="xml-stylesheet">href="MdtSvgDiag_StyleDefs.css" type="text/css"</xsl:processing-instruction> --> <svg width="{$IPD_W + 4}" height="{$IPD_H + 4}"> <defs> <xsl:call-template name="Define_ConnectedBifTypes"/> <xsl:call-template name="Define_BodyParts"> <xsl:with-param name="iBodyWidth" select="$IPD_W"/> <xsl:with-param name="iBodyHeight" select="$IPD_H"/> </xsl:call-template> </defs> <xsl:call-template name="Draw_Module"> <xsl:with-param name="iBodyWidth" select="$IPD_W"/> <xsl:with-param name="iBodyHeight" select="$IPD_H"/> <xsl:with-param name="iBifsHeight" select="BIFS_H"/> <xsl:with-param name="iPortsHeight" select="$PORTS_H"/> </xsl:call-template> </svg> </xsl:for-each> </xsl:template> <!-- ======================= main svg block =============================== --> <!-- ======================= IP DIAGRAM DEF =============================== --> <xsl:template name="Define_BodyParts"> <xsl:param name="iBodyWidth" select="0"/> <xsl:param name="iBodyHeight" select="0"/> <xsl:param name="iBodyBgColor" select="$COL_MOD_BG"/> <g id="HCurve" overflow="visible"> <path d="m 0 0, a 16 16, 0,0,0, 32,0, z" style="fill:{$iBodyBgColor};fill-opacity:1;stroke:black;stroke-width:1.5"/> <line x1="0" y1="0" x2="32" y2="0" style="stroke:{$iBodyBgColor};stroke-width:3"/> </g> <g id="IPD_StandardBody"> <rect x="0" y="0" width ="{$iBodyWidth}" height="{$iBodyHeight}" style="fill:{$iBodyBgColor};fill-opacity: 1.0; stroke:{$COL_BLACK}; stroke-width:1"/> <rect x="{$IPD_VGAP + $IPD_BIF_W}" y="{$IPD_HGAP}" width ="{$iBodyWidth - (($IPD_VGAP * 2) + ($IPD_BIF_W * 2))}" height="{$iBodyHeight - ($IPD_VGAP * 2)}" style="fill:{$COL_WHITE}; fill-opacity: 1.0; stroke:{$COL_BLACK}; stroke-width:1.5"/> <use x="{ceiling($iBodyWidth div 2) - 16}" y="{$IPD_VGAP}" xlink:href="#HCurve"/> </g> <g id="IPD_PORT"> <rect width ="{$IPD_PRT_W}" height="{$IPD_PRT_H}" style="fill:{$COL_MOD_MPRT};stroke-width:1;stroke:black;"/> </g> <g id="IPD_SPort"> <line x1="0" y1="0" x2="{$IPD_PRT_W}" y2="0" style="stroke:{$COL_MOD_SPRT};stroke-width:2;stroke-opacity:1"/> </g> <g id="IPD_PortClk"> <line x1="0" y1="0" x2="7" y2="3" style="stroke:{$COL_BLACK};stroke-width:1;stroke-opacity:1"/> <line x1="7" y1="3" x2="0" y2="7" style="stroke:{$COL_BLACK};stroke-width:1;stroke-opacity:1"/> </g> </xsl:template> <xsl:template name="Draw_Ports"> <xsl:param name="iBodyWidth" select="0"/> <xsl:param name="iBodyHeight" select="0"/> <xsl:variable name="prt_ix_pos_"> <xsl:value-of select="($IPD_HGAP + $IPD_BIF_W) - $IPD_PRT_W"/> </xsl:variable> <xsl:variable name="prt_ox_pos_"> <xsl:value-of select="$iBodyWidth - ($IPD_HGAP + $IPD_BIF_W)"/> </xsl:variable> <xsl:variable name="prt_ini_y_"> <xsl:value-of select="$IPD_VGAP + $IPD_PRT_SY"/> </xsl:variable> <!-- layout the input ports--> <xsl:for-each select="PORTS/PORT[((@DIR='I'or @DIR='IO') and (@IS_INSTANTIATED = 'TRUE'))]"> <xsl:sort data-type="number" select="@MHS_INDEX" order="ascending"/> <xsl:variable name="prt_iy_pos_" select="$prt_ini_y_ + ((position() - 1) * ($IPD_PRT_SPC + $IPD_PRT_H))"/> <xsl:if test="@MSB and @LSB"> <use x="{$prt_ix_pos_}" y="{$prt_iy_pos_}" xlink:href="#IPD_PORT"/> </xsl:if> <xsl:if test="not(@MSB) or not(@LSB)"> <use x="{$prt_ix_pos_}" y="{$prt_iy_pos_}" xlink:href="#IPD_SPort"/> </xsl:if> <xsl:if test="@SIGIS='CLK'"> <use x="{$prt_ix_pos_ + 8}" y="{$prt_iy_pos_ - 2}" xlink:href="#IPD_PortClk"/> </xsl:if> <!-- <text class="portlabel" x="{$prt_ix_pos_ + $IPD_PRT_W + 12}" y="{$prt_iy_pos_ + 6}"><xsl:value-of select="@IPD_INDEX"/></text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($prt_ix_pos_ + $IPD_PRT_W + 12)"/> <xsl:with-param name="iY" select="($prt_iy_pos_ + 6)"/> <xsl:with-param name="iText" select="@MHS_INDEX"/> <xsl:with-param name="iClass" select="'ipd_portlabel'"/> </xsl:call-template> </xsl:for-each> <!-- layout the output ports--> <xsl:for-each select="PORTS/PORT[((@DIR='O') and (@IS_INSTANTIATED = 'TRUE'))]"> <xsl:sort data-type="number" select="@MHS_INDEX" order="ascending"/> <xsl:variable name="prt_oy_pos_" select="$prt_ini_y_ + ((position() - 1) * ($IPD_PRT_SPC + $IPD_PRT_H))"/> <xsl:if test="@MSB and @LSB"> <use x="{$prt_ox_pos_}" y="{$prt_oy_pos_}" xlink:href="#IPD_PORT"/> </xsl:if> <xsl:if test="not(@MSB) or not(@LSB)"> <use x="{$prt_ox_pos_}" y="{$prt_oy_pos_}" xlink:href="#IPD_SPort"/> </xsl:if> <!-- <text class="portlabel" x="{$prt_ox_pos_ - 12}" y="{$prt_oy_pos_ + 6}"><xsl:value-of select="@IPD_INDEX"/></text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($prt_ox_pos_ - 12)"/> <xsl:with-param name="iY" select="($prt_oy_pos_ + 6)"/> <xsl:with-param name="iText" select="@MHS_INDEX"/> <xsl:with-param name="iClass" select="'ipd_portlabel'"/> </xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="Draw_Bifs"> <xsl:param name="iBodyWidth" select="0"/> <xsl:param name="iBodyHeight" select="0"/> <xsl:param name="iPortsHeight" select="0"/> <xsl:variable name="bif_ix_pos_"> <xsl:value-of select="($IPD_HGAP + $IPD_BIF_W) - $IPD_BIFC_W"/> </xsl:variable> <xsl:variable name="bif_ox_pos_"> <xsl:value-of select="$iBodyWidth - ($IPD_HGAP + $IPD_BIF_W)"/> </xsl:variable> <xsl:variable name="bif_ini_y_"> <xsl:value-of select="$IPD_VGAP + $IPD_PRT_SY + $iPortsHeight"/> </xsl:variable> <!-- layout the left bifs--> <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[((@IS_INSTANTIATED = 'TRUE') and (not(@TYPE) or (@TYPE = 'SLAVE') or (@TYPE = 'TARGET') or (@TYPE = 'USER')))]"> <xsl:variable name="bif_iy_pos_" select="$bif_ini_y_ + ((position() - 1) * ($IPD_PRT_SPC + $IPD_BIF_H))"/> <xsl:variable name="bifType_"> <xsl:choose> <xsl:when test="@TYPE"><xsl:value-of select="@TYPE"/></xsl:when> <xsl:otherwise>SLAVE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bifBusStd_"> <xsl:choose> <xsl:when test="@BUSSTD"><xsl:value-of select="@BUSSTD"/></xsl:when> <xsl:otherwise>TRS</xsl:otherwise> </xsl:choose> </xsl:variable> <use x="{$bif_ix_pos_}" y="{$bif_iy_pos_}" xlink:href="#{$bifBusStd_}_busconn_{$bifType_}"/> <!-- <text class="ipdbiflbl" x="{$bif_ix_pos_ + $IPD_BIF_W + 4}" y="{$bif_iy_pos_ + 14}"><xsl:value-of select="@NAME"/></text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'ipd_biflabel'"/> <xsl:with-param name="iX" select="($bif_ix_pos_ + $IPD_BIF_W + 4)"/> <xsl:with-param name="iY" select="($bif_iy_pos_ + 14)"/> <xsl:with-param name="iText" select="@NAME"/> </xsl:call-template> </xsl:for-each> <!-- layout the right bifs--> <xsl:for-each select="BUSINTERFACES/BUSINTERFACE[((@IS_INSTANTIATED = 'TRUE') and ((@TYPE = 'MASTER') or (@TYPE = 'MASTER_SLAVE') or (@TYPE = 'INITIATOR') or (@TYPE = 'MONITOR')))]"> <xsl:variable name="bif_oy_pos_" select="$bif_ini_y_ + ((position() - 1) * ($IPD_PRT_SPC + $IPD_BIF_H))"/> <xsl:variable name="bifType_"> <xsl:choose> <xsl:when test="@TYPE"><xsl:value-of select="@TYPE"/></xsl:when> <xsl:otherwise>SLAVE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bifBusStd_"> <xsl:choose> <xsl:when test="@BUSSTD"><xsl:value-of select="@BUSSTD"/></xsl:when> <xsl:otherwise>TRS</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:if test="not($bifType_ = 'MASTER_SLAVE')"> <use x="{$bif_ox_pos_}" y="{$bif_oy_pos_}" xlink:href="#{$bifBusStd_}_busconn_{$bifType_}"/> </xsl:if> <xsl:if test="($bifType_ = 'MASTER_SLAVE')"> <use x="{$bif_ox_pos_}" y="{$bif_oy_pos_}" xlink:href="#{$bifBusStd_}_busconn_{$bifType_}" transform="rotate(90,{($bif_ox_pos_ + ceiling($IPD_BIF_W div 2))},{($bif_oy_pos_ + ceiling($IPD_BIF_H div 2))})"/> </xsl:if> <!-- <text class="ipdbiflbl" x="{$bif_ox_pos_ - (string-length(@NAME) * 8) - 2}" y="{$bif_oy_pos_ + 14}"><xsl:value-of select="@NAME"/></text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'ipd_biflabel'"/> <xsl:with-param name="iX" select="($bif_ox_pos_ - (string-length(@NAME) * 8) - 2)"/> <xsl:with-param name="iY" select="($bif_oy_pos_ + 14)"/> <xsl:with-param name="iText" select="@NAME"/> </xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="Draw_Module"> <xsl:param name="iBodyWidth" select="0"/> <xsl:param name="iBodyHeight" select="0"/> <xsl:param name="iBifsHeight" select="0"/> <xsl:param name="iPortsHeight" select="0"/> <use x="0" y="0" xlink:href="#IPD_StandardBody"/> <!-- <text class="iptype" x="{ceiling($iBodyWidth div 2)}" y="{ceiling($iBodyHeight div 2) + 4}"> <xsl:value-of select="@MODTYPE"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'ipd_iptype'"/> <xsl:with-param name="iX" select="(ceiling($iBodyWidth div 2))"/> <xsl:with-param name="iY" select="(ceiling($iBodyHeight div 2) + 4)"/> <xsl:with-param name="iText" select="@MODTYPE"/> </xsl:call-template> <!-- <text class="iplabel" x="{ceiling($iBodyWidth div 2)}" y="{ceiling($iBodyHeight div 2) + 16}"> <xsl:value-of select="@INSTANCE"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'ipd_ipname'"/> <xsl:with-param name="iX" select="(ceiling($iBodyWidth div 2))"/> <xsl:with-param name="iY" select="(ceiling($iBodyHeight div 2) + 16)"/> <xsl:with-param name="iText" select="@INSTANCE"/> </xsl:call-template> <xsl:call-template name="Draw_Ports"> <xsl:with-param name="iBodyWidth" select="$iBodyWidth"/> <xsl:with-param name="iBodyHeight" select="$iBodyHeight"/> </xsl:call-template> <xsl:call-template name="Draw_Bifs"> <xsl:with-param name="iBodyWidth" select="$iBodyWidth"/> <xsl:with-param name="iBodyHeight" select="$iBodyHeight"/> <xsl:with-param name="iPortsHeight" select="$iPortsHeight"/> </xsl:call-template> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math dyn exsl xlink"> <!-- xmlns:svg="http://www.w3.org/2000/svg" =============================================== INCLUDES =============================================== --> <xsl:include href="MdtSvgBLKD_Dimensions.xsl"/> <xsl:include href="MdtSvgDiag_Colors.xsl"/> <xsl:include href="MdtSvgDiag_Globals.xsl"/> <xsl:include href="MdtSvgDiag_StyleDefs.xsl"/> <xsl:include href="MdtTinySvgDiag_BifShapes.xsl"/> <xsl:include href="MdtTinySvgBLKD_IOPorts.xsl"/> <xsl:include href="MdtTinySvgBLKD_Busses.xsl"/> <xsl:include href="MdtTinySvgBLKD_Globals.xsl"/> <xsl:include href="MdtTinySvgBLKD_Functions.xsl"/> <xsl:include href="MdtTinySvgBLKD_Peripherals.xsl"/> <xsl:include href="MdtTinySvgBLKD_Processors.xsl"/> <xsl:include href="MdtTinySvgBLKD_BusLaneSpaces.xsl"/> <xsl:output method="xml" version="1.0" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD SVG 1.1//EN" doctype-system="http://www.w3.org/Graphics/SVG/1.1/svg11-tiny.dtd"/> <!-- =============================================== PARAMETERS =============================================== --> <xsl:param name="ADD_VIEWBOX" select="'FALSE'"/> <xsl:param name="IN_TESTMODE" select="'FALSE'"/> <!-- <xsl:param name="CSS_SVG_DIAGRAMS" select="'MdtSvgDiag_StyleDefs.css'"/> <xsl:param name="CSS_SVG_DIAGRAMS" select="'__INTERNAL__'"/> --> <!-- ====================================================== MAIN BLOCKDIAGRAM TEMPLATE ====================================================== --> <xsl:template match="EDKSYSTEM[not(BLKDIAGRAM)]"> <xsl:message>ERROT: Project is missing BLKDIAGRAM Element. Cannot generate.</xsl:message> </xsl:template> <xsl:template match="EDKSYSTEM[BLKDIAGRAM]"> <!-- <xsl:message>STCK_W is <xsl:value-of select="$G_Total_Stacks_W"/></xsl:message> <xsl:message>BRDG_W is <xsl:value-of select="$G_Total_Bridges_W"/></xsl:message> <xsl:message>MPMC is <xsl:value-of select="$G_Total_StandAloneMpmc_H"/></xsl:message> <xsl:message>MPMC is <xsl:value-of select="$G_Total_StandAloneMpmc_H"/></xsl:message> <xsl:message>MABV is <xsl:value-of select="$G_Max_Stack_AbvSbs_H"/></xsl:message> <xsl:message>MBLW is <xsl:value-of select="$G_Max_Stack_BlwSbs_H"/></xsl:message> <xsl:message>IPBK is <xsl:value-of select="$G_Total_IpBucket_H"/></xsl:message> <xsl:message>Blkd Total is <xsl:value-of select="$blkd_H_"/></xsl:message> <xsl:message>max abv is <xsl:value-of select="$max_Stack_AbvSbs_H_"/></xsl:message> <xsl:message>max blw is <xsl:value-of select="$max_Stack_BlwSbs_H_"/></xsl:message> <xsl:message>Ip Bkt is <xsl:value-of select="$totalIpBkt_H_"/></xsl:message> <xsl:message>Sbs is <xsl:value-of select="$totalSbs_H_"/></xsl:message> <xsl:message>Unk Bkt is <xsl:value-of select="$totalUnkBkt_H_"/></xsl:message> <xsl:message>Blkd DrawArea height as <xsl:value-of select="$total_DrawArea_H_"/></xsl:message> --> <!--specify a css for the file --> <!-- <xsl:processing-instruction name="xml-stylesheet">href="<xsl:value-of select="$CSS_SVG_DIAGRAMS"/>" type="text/css"</xsl:processing-instruction> <xsl:variable name="BLKD_ZOOM_Y"> <xsl:choose> <xsl:when test="($ADD_VIEWBOX = 'TRUE')"> <xsl:value-of select="($G_Total_Diag_H * 2)"/> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:message>EDWVERSION is <xsl:value-of select="$G_ROOT/EDKSYSTEM/@EDWVERSION"/></xsl:message> --> <xsl:text>&#10;</xsl:text> <!-- <svg width="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}" viewBox="0 0 0 {$BLKD_ZOOM_Y}"> --> <svg width="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}"> <!-- =============================================== Layout All the various definitions =============================================== --> <defs> <!-- IO Port Defs --> <xsl:call-template name="Define_IOPorts"/> <!-- BIF Defs --> <xsl:call-template name="Define_ConnectedBifTypes"/> <!-- Bus Defs --> <xsl:call-template name="Define_Busses"/> <!-- Shared Bus Buckets Defs --> <xsl:call-template name="Define_SBSBuckets"/> <!-- IP Bucket Defs --> <xsl:call-template name="Define_IPBucket"/> <!-- Stack Defs --> <xsl:call-template name="Define_AllStacks"/> <!-- Space Defs --> <xsl:call-template name="Define_BusLaneSpaces"/> <!-- Main MPMC Defs --> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE"> <xsl:call-template name="Define_StandAlone_MPMC"/> </xsl:if> <!-- Diagram Key Definition --> <xsl:call-template name="Define_BlkDiagram_Key"/> <!-- Diagram Specs Definition --> <xsl:call-template name="Define_BlkDiagram_Specs"> <xsl:with-param name="iArch" select="SYSTEMINFO/@ARCH"/> <xsl:with-param name="iPart" select="SYSTEMINFO/@PART"/> <xsl:with-param name="iTimeStamp" select="@TIMESTAMP"/> <xsl:with-param name="iEdkVersion" select="@EDKVERSION"/> </xsl:call-template> </defs> <!-- =============================================== --> <!-- Draw Outlines --> <!-- =============================================== --> <!-- The surrounding black liner --> <rect x="0" y="0" width ="{$G_Total_Diag_W}" height="{$G_Total_Diag_H}" fill="{$COL_WHITE}" stroke="{$COL_BLACK}" stroke-width="4"/> <!-- The outer IO channel --> <rect x="{$BLKD_PRTCHAN_W}" y="{$BLKD_PRTCHAN_H}" width= "{$G_Total_Blkd_W - ($BLKD_PRTCHAN_W * 2)}" height="{$G_Total_Blkd_H - ($BLKD_PRTCHAN_H * 2)}" style="fill:{$COL_IORING}"/> <!-- The Diagram's drawing area --> <rect x="{$BLKD_PRTCHAN_W + $BLKD_IORCHAN_W}" y="{$BLKD_PRTCHAN_H + $BLKD_IORCHAN_H}" rx="8" ry="8" width= "{$G_Total_DrawArea_W}" height="{$G_Total_DrawArea_H}" fill="{$COL_BG}"/> <!-- =============================================== --> <!-- Draw All the various components --> <!-- =============================================== --> <!-- Layout the IO Ports --> <!-- <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))"> <xsl:call-template name="Draw_IOPorts"/> </xsl:if> --> <!-- Layout the Shapes --> <xsl:call-template name="Draw_BlkDiagram_Shapes"/> </svg> <!-- ======================= END MAIN SVG BLOCK =============================== --> </xsl:template> <xsl:template name="Draw_BlkDiagram_Shapes"> <!-- ************************************************************ *************** BEGIN DRAWING BLOCK DIAGRAM ************* ************************************************************ --> <!-- =========================================================== Draw the Stand Alone MPMC, (if any) =========================================================== --> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE"> <xsl:variable name="mpmc_inst_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/> <use x="{$BLKD_INNER_X}" y="{$BLKD_INNER_Y}" xlink:href="#mpmcmodule_{$mpmc_inst_}"/> <!-- =========================================================== Draw the connections to the Stand Alone MPMC =========================================================== --> <xsl:call-template name="Draw_BlkDiagram_StandAloneMpmcConnections"/> </xsl:if> <!-- =========================================================== Draw the Stacks =========================================================== --> <xsl:call-template name="Draw_BlkDiagram_Stacks"/> <!-- =========================================================== Draw the Bus Lane Spaces =========================================================== --> <xsl:call-template name="Draw_BlkDiagram_BusLaneSpaces"/> <!-- =========================================================== Draw the shared busses =========================================================== --> <use x="{$BLKD_INNER_X}" y="{$G_SharedBus_Y}" xlink:href="#group_sharedBusses"/> <!-- =========================================================== Draw the Bridges =========================================================== --> <xsl:call-template name="Draw_BlkDiagram_Bridges"/> <!-- =========================================================== Draw the Ip Bucket =========================================================== --> <xsl:call-template name="Draw_BlkDiagram_IPBucket"/> <!-- =========================================================== Draw the Key =========================================================== --> <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))"> <use x="{$G_Total_Blkd_W - $BLKD_KEY_W - $BLKD_PRTCHAN_W}" y="{$G_Total_Blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}" xlink:href="#BlkDiagram_Key"/> </xsl:if> <!-- =========================================================== Draw the Specs =========================================================== --> <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))"> <use x="{$BLKD_PRTCHAN_W}" y="{$G_Total_Blkd_H + $BLKD_DRAWAREA2KEY_GAP - 8}" xlink:href="#BlkDiagram_Specs"/> </xsl:if> <!-- ************************************************************ *************** DONE DRAWING BLOCK DIAGRAM ************** ************************************************************ --> </xsl:template> <!-- ======================================================================= --> <!-- FUNCTION TEMPLATE --> <!-- --> <!-- Draw stacks on the Block Diagram --> <!-- ======================================================================= --> <xsl:template name="Draw_BlkDiagram_Stacks"> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@EAST &lt; $G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH)]"> <xsl:variable name="stack_line_x_"> <xsl:call-template name="F_Calc_Stack_X"> <xsl:with-param name="iStackIdx" select="@EAST"/> </xsl:call-template> </xsl:variable> <xsl:variable name="stack_abv_sbs_"> <xsl:call-template name="F_Calc_Stack_AbvSbs_Height"> <xsl:with-param name="iStackIdx" select="@EAST"/> </xsl:call-template> </xsl:variable> <xsl:variable name="bridges_w_" select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/> <xsl:variable name="stack_y_" select="($G_SharedBus_Y - $stack_abv_sbs_ - $BLKD_PROC2SBS_GAP)"/> <xsl:variable name="stack_x_" select="($BLKD_INNER_X + $stack_line_x_ + $bridges_w_)"/> <xsl:variable name="stack_name_"> <xsl:call-template name="F_generate_Stack_Name"> <xsl:with-param name="iHorizIdx" select="@EAST"/> </xsl:call-template> </xsl:variable> <use x="{$stack_x_}" y="{$stack_y_}" xlink:href="#{$stack_name_}"/> </xsl:for-each> </xsl:template> <xsl:template name="Draw_BlkDiagram_StandAloneMpmcConnections"> <xsl:variable name="mpmcInst_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE/@INSTANCE"/> <xsl:variable name="lastStack_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE"> <xsl:variable name="currentLane_" select="position()"/> <!-- <xsl:message>Current lane <xsl:value-of select="$currentLane_"/></xsl:message> --> <xsl:variable name="stackToEast_"> <xsl:choose> <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="@EAST"/></xsl:when> <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="stackToWest_"> <xsl:choose> <xsl:when test="not(@WEST = $lastStack_)"><xsl:value-of select="'NONE'"/></xsl:when> <xsl:when test=" (@WEST = $lastStack_)"><xsl:value-of select="@WEST"/></xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="spaceAbvSbs_H_"> <xsl:call-template name="F_Calc_Space_AbvSbs_Height"> <xsl:with-param name="iStackToEast" select="$stackToEast_"/> <xsl:with-param name="iStackToWest" select="$stackToWest_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/> <!-- <xsl:message>Stack To East <xsl:value-of select="$stackToEast_"/></xsl:message> <xsl:message>Stack To West <xsl:value-of select="$stackToWest_"/></xsl:message> <xsl:variable name="space_X_"> <xsl:call-template name="F_Calc_Space_X"> <xsl:with-param name="iStackToEast" select="$stackToEast_"/> <xsl:with-param name="iStackToWest" select="$stackToWest_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/> <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_x_)"/> --> <xsl:for-each select="BUSCONNLANE[@IS_MPMCCONN]"> <!-- <xsl:variable name="bifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = BUSCONN/@INSTANCE)]/BUSINTERFACE[(@BUSNAME = @BUSNAME)]/@BIF_X"/> --> <xsl:variable name="bifInst_" select="BUSCONN/@INSTANCE"/> <xsl:variable name="busName_" select="@BUSNAME"/> <xsl:variable name="bifSide_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $bifInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@BIF_X"/> <xsl:variable name="mpmcBifName_"> <xsl:choose> <xsl:when test=" (@IS_SBSCONN)"><xsl:value-of select="BUSCONN/@BUSINTERFACE"/></xsl:when> <xsl:when test="not(@IS_SBSCONN)"><xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:when> <xsl:otherwise><xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@BUSNAME = $busName_)]/@NAME"/></xsl:otherwise> </xsl:choose> </xsl:variable> <!-- <xsl:message>MPMC Bif Name <xsl:value-of select="$mpmcBifName_"/></xsl:message> <xsl:message>Bif Side <xsl:value-of select="$bifSide_"/></xsl:message> <xsl:message>Bus Name <xsl:value-of select="@BUSNAME"/></xsl:message> <xsl:message>Instance <xsl:value-of select="$bifInst_"/></xsl:message> <xsl:message>Space line x <xsl:value-of select="$space_line_X_"/></xsl:message> --> <xsl:variable name="space_line_X_"> <xsl:call-template name="F_Calc_Space_X"> <xsl:with-param name="iStackToEast" select="$stackToEast_"/> <xsl:with-param name="iStackToWest" select="$stackToWest_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space_X_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_X_)"/> <xsl:variable name = "stackToWest_W_"> <xsl:choose> <xsl:when test="(($stackToEast_ = '0') and ($stackToWest_ = 'NONE'))">0</xsl:when> <xsl:when test="(($stackToEast_ = 'NONE') and not($stackToWest_ = 'NONE'))"> <xsl:call-template name="F_Calc_Stack_Width"> <xsl:with-param name="iStackIdx" select="$stackToWest_"/> </xsl:call-template> </xsl:when> <xsl:when test="(not($stackToEast_ = '0') and not($stackToEast_ = 'NONE') and ($stackToWest_ = 'NONE'))"> <xsl:call-template name="F_Calc_Stack_Width"> <xsl:with-param name="iStackIdx" select="($stackToEast_ - 1)"/> </xsl:call-template> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name = "stackToEast_W_"> <xsl:call-template name="F_Calc_Stack_Width"> <xsl:with-param name="iStackIdx" select="$stackToEast_"/> </xsl:call-template> </xsl:variable> <xsl:variable name ="extSpaceWest_W_" select="ceiling($stackToWest_W_ div 2)"/> <xsl:variable name ="extSpaceEast_W_" select="ceiling($stackToEast_W_ div 2)"/> <xsl:variable name="laneInSpace_X_"> <xsl:choose> <xsl:when test="(@ORIENTED = 'EAST')"> <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/> <!-- <xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W) - $BLKD_BUS_LANE_W - $BLKD_BUS_ARROW_W - $BLKD_P2P_BUS_W)"/> --> </xsl:when> <xsl:otherwise><xsl:value-of select="($extSpaceWest_W_ + (@BUSLANE_X * $BLKD_BUS_LANE_W))"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="lane_X_" select="($space_X_ + $laneInSpace_X_)"/> <xsl:variable name="mpmcBifType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $mpmcInst_)]/BUSINTERFACE[(@NAME = $mpmcBifName_)]/@TYPE"/> <!-- <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/> <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_W div 2))"/> <xsl:variable name="bc_X_" select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/> --> <xsl:variable name="bc_Y_" select="($BLKD_INNER_Y + $BLKD_MPMC_MOD_H)"/> <xsl:variable name="bc_X_" > <xsl:choose> <xsl:when test="($bifSide_ = '0')"><xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:when> <xsl:when test="($bifSide_ = '1')"><xsl:value-of select="($lane_X_ + $BLKD_BIFC_dx)"/></xsl:when> <xsl:otherwise> <xsl:value-of select="($lane_X_ + ceiling($BLKD_BIFC_W div 2))"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="busColor_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="@BUSSTD"/> </xsl:call-template> </xsl:variable> <!-- Place the MPMC bif label --> <xsl:variable name="bcl_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BIF_W div 2))"/> <xsl:variable name="bcl_Y_" select="($bc_Y_ - $BLKD_BIF_H - $BLKD_MOD_BIF_GAP_H)"/> <use x="{$bcl_X_}" y="{$bcl_Y_}" xlink:href="#{@BUSSTD}_BifLabel"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($bcl_X_ + ceiling($BLKD_BIF_W div 2))"/> <xsl:with-param name="iY" select="($bcl_Y_ + ceiling($BLKD_BIF_H div 2) + 3)"/> <xsl:with-param name="iText" select="$mpmcBifName_"/> <xsl:with-param name="iClass" select="'mpmc_biflabel'"/> </xsl:call-template> <!-- Place the MPMC bif --> <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{$mpmcBifType_}"/> <!-- --> <xsl:variable name="bcArrow_X_" select="($bc_X_ + ceiling($BLKD_BIFC_W div 2) - ceiling($BLKD_BUS_ARROW_H div 2))"/> <xsl:variable name="bcArrow_Y_" select="($bc_Y_ + $BLKD_BIFC_H - 3)"/> <!-- Place the MPMC Arrow --> <use x="{$bcArrow_X_}" y="{$bcArrow_Y_}" xlink:href="#{@BUSSTD}_BusArrowNorth"/> <!-- Place a block to cover the gap btw MPMC and top of Bus Lane Space, or to the correct SBS For non SBS connections a vertical block will already have been drawn to the top of the space. --> <xsl:variable name="sbsDy_"> <xsl:choose> <xsl:when test="@IS_SBSCONN"><xsl:value-of select="2 + ($G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $busName_)]/@BUS_INDEX * $BLKD_SBS_LANE_H)"/></xsl:when> <xsl:when test="not(@IS_SBSCONN)">0</xsl:when> <xsl:otherwise>0></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="mpmcBusHeight_"> <xsl:choose> <xsl:when test="(@IS_SBSCONN)"><xsl:value-of select="($G_SharedBus_Y - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4) + $sbsDy_)"/></xsl:when> <xsl:when test="not(@IS_SBSCONN)"> <xsl:choose> <xsl:when test="($space_y_ &gt;= ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"> <xsl:value-of select="($space_y_ - ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"/> </xsl:when> <xsl:when test="($space_y_ &lt; ($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_))"> <xsl:value-of select="(($bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4 + $sbsDy_) - $space_y_)"/> </xsl:when> </xsl:choose> </xsl:when> <xsl:otherwise><xsl:value-of select="$BLKD_BIFC_H"/></xsl:otherwise> </xsl:choose> </xsl:variable> <rect x="{$bcArrow_X_ + $BLKD_BUS_ARROW_G}" y="{$bcArrow_Y_ + $BLKD_BUS_ARROW_W + 4}" width= "{$BLKD_P2P_BUS_W}" height="{$mpmcBusHeight_}" style="stroke:none; fill:{$busColor_}"/> <!-- place the bus label here --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($bcArrow_X_ + $BLKD_BUS_ARROW_W + 6)"/> <xsl:with-param name="iY" select="($bcArrow_Y_ + ceiling($mpmcBusHeight_ div 2) + 6)"/> <xsl:with-param name="iText" select="$busName_"/> <xsl:with-param name="iClass" select="'p2pbus_label'"/> </xsl:call-template> </xsl:for-each> </xsl:for-each> </xsl:template> <!-- ======================================================================= --> <!-- FUNCTION TEMPLATE --> <!-- --> <!-- Draw bus lane spaces on the Block Diagram --> <!-- ======================================================================= --> <xsl:template name="Draw_BlkDiagram_BusLaneSpaces"> <xsl:variable name="lastStack_" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH) - 1"/> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[@EAST]"> <xsl:sort select="@EAST" data-type="number"/> <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace"> <xsl:with-param name="iStackToEast" select="@EAST"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE[(@WEST = $lastStack_)]"> <xsl:call-template name="Draw_BlkDiagram_BusLaneSpace"> <xsl:with-param name="iStackToWest" select="$lastStack_"/> </xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="Draw_BlkDiagram_BusLaneSpace"> <xsl:param name="iStackToEast" select="'NONE'"/> <xsl:param name="iStackToWest" select="'NONE'"/> <xsl:variable name="spaceAbvSbs_H_"> <xsl:call-template name="F_Calc_Space_AbvSbs_Height"> <xsl:with-param name="iStackToEast" select="$iStackToEast"/> <xsl:with-param name="iStackToWest" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name="spaceBlwSbs_H_"> <xsl:call-template name="F_Calc_Space_BlwSbs_Height"> <xsl:with-param name="iStackToEast" select="$iStackToEast"/> <xsl:with-param name="iStackToWest" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space_line_x_"> <xsl:call-template name="F_Calc_Space_X"> <xsl:with-param name="iStackToEast" select="$iStackToEast"/> <xsl:with-param name="iStackToWest" select="$iStackToWest"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space_y_" select="($G_SharedBus_Y - $spaceAbvSbs_H_ - $BLKD_PROC2SBS_GAP)"/> <xsl:variable name="space_x_" select="($BLKD_INNER_X + $G_Total_Bridges_W + $space_line_x_)"/> <xsl:variable name="stackToEast_"> <xsl:choose> <xsl:when test="not($iStackToEast = 'NONE')"><xsl:value-of select="$iStackToEast"/></xsl:when> <xsl:otherwise>NONE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="stackToWest_"> <xsl:choose> <xsl:when test=" not($iStackToWest = 'NONE')"><xsl:value-of select="$iStackToWest"/></xsl:when> <xsl:when test="(not($iStackToEast = 'NONE') and not($iStackToEast = '0'))"><xsl:value-of select="($iStackToEast - 1)"/></xsl:when> <xsl:otherwise>NONE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="space_Name_"> <xsl:call-template name="F_generate_Space_Name"> <xsl:with-param name="iStackToEast" select="$stackToEast_"/> <xsl:with-param name="iStackToWest" select="$stackToWest_"/> </xsl:call-template> </xsl:variable> <!-- <xsl:message>StackToEast is <xsl:value-of select="$iStackToEast"/></xsl:message> <xsl:message>StackToWest is <xsl:value-of select="$iStackToWest"/></xsl:message> <xsl:message>SpaceName is <xsl:value-of select="$space_Name_"/></xsl:message> --> <use x="{$space_x_}" y="{$space_y_}" xlink:href="#{$space_Name_}"/> </xsl:template> <!-- =========================================================================== --> <!-- FUNCTION TEMPLATE --> <!-- --> <!-- Draw Bridges on the Block Diagram --> <!-- =========================================================================== --> <xsl:template name="Draw_BlkDiagram_Bridges"> <!-- First save all the bridge indexs in a variable --> <xsl:variable name="bridgeShapes_"> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE/BUSCONNS[(@ORIENTED = 'WEST')]/BUSCONN"> <BRIDGE BUS_INDEX="{@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" POSITION="{(position() -1)}"/> <BRIDGECONN BUS_INDEX="{@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="{../@ORIENTED}" POSITION="{(position() - 1)}" BUSSTD="{@BUSSTD}" TYPE="{@TYPE}"/> <!-- So both bus conns have same position.... --> <xsl:if test="../../BUSCONNS[(@ORIENTED = 'EAST')]"> <BRIDGECONN BUS_INDEX="{../../BUSCONNS[(@ORIENTED ='EAST')]/BUSCONN/@BUS_INDEX}" INSTANCE="{../../@INSTANCE}" ORIENTED="EAST" POSITION="{(position() - 1)}" BUSSTD="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@BUSSTD}" TYPE="{../../BUSCONNS[(@ORIENTED = 'EAST')]/BUSCONN/@TYPE}"/> </xsl:if> </xsl:for-each> </xsl:variable> <!-- <xsl:message>Found an east connection on <xsl:value-of select="../../@INSTANCE"/></xsl:message> --> <!-- Now layout the bridge shapes between the shared busses --> <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGE"> <xsl:sort select="@POSITION" data-type="number"/> <xsl:variable name="brdgPosition_" select="@POSITION"/> <xsl:variable name="brdgInstance_" select="@INSTANCE"/> <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/> <!-- <xsl:variable name="max_bus_idx_" select="math:max(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/> <xsl:message>Maximum index <xsl:value-of select="$max_bus_idx_"/></xsl:message> <xsl:message>Minimum index <xsl:value-of select="$min_bus_idx_"/></xsl:message> --> <xsl:variable name="brdg_X_" select="($BLKD_INNER_X + $BLKD_BRIDGE_GAP + $BLKD_BUS_LANE_W + (@POSITION * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))))"/> <xsl:variable name="brdg_Y_" select="($G_SharedBus_Y + ($min_bus_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_SBS_LANE_H div 2) - ceiling($BLKD_MOD_H div 2))"/> <use x="{$brdg_X_}" y="{$brdg_Y_}" xlink:href="#symbol_{$brdgInstance_}"/> </xsl:for-each> <!-- <xsl:message>Found <xsl:value-of select="count(exsl:node-set($bridgeShapes_)/BRIDGECONN)"/> busconns </xsl:message> <xsl:message>Drawing connection for bridge <xsl:value-of select="$brdgInstance_"/> at <xsl:value-of select="@POSITION"/> </xsl:message> --> <xsl:for-each select="exsl:node-set($bridgeShapes_)/BRIDGECONN"> <xsl:sort select="@POSITION" data-type="number"/> <xsl:variable name="brdgInstance_" select="@INSTANCE"/> <xsl:variable name="brdgPosition_" select="@POSITION"/> <xsl:variable name="busColor_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="@BUSSTD"/> </xsl:call-template> </xsl:variable> <xsl:variable name="min_bus_idx_" select="math:min(exsl:node-set($bridgeShapes_)/BRIDGECONN[(@POSITION = $brdgPosition_)]/@BUS_INDEX)"/> <xsl:variable name="brdg_Y1_" select="($G_SharedBus_Y + ($min_bus_idx_ * $BLKD_SBS_LANE_H) + ceiling($BLKD_SBS_LANE_H div 2) - ceiling($BLKD_MOD_H div 2))"/> <xsl:variable name="brdg_X_" select="($BLKD_INNER_X + $BLKD_BRIDGE_GAP + $BLKD_BUS_LANE_W + (@POSITION * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))))"/> <xsl:variable name="bc_Y_" select="$brdg_Y1_ + $BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V + ceiling($BLKD_BIF_H div 2) - ceiling($BLKD_BIFC_H div 2)"/> <xsl:variable name="bc_X_"> <xsl:choose> <xsl:when test="@ORIENTED='WEST'"> <xsl:value-of select="($brdg_X_ - $BLKD_BIFC_W)"/> </xsl:when> <xsl:when test="@ORIENTED='EAST'"> <xsl:value-of select="($brdg_X_ + $BLKD_MOD_W)"/> </xsl:when> </xsl:choose> </xsl:variable> <!-- Layout the bus conn --> <use x="{$bc_X_}" y="{$bc_Y_}" xlink:href="#{@BUSSTD}_busconn_{@TYPE}"/> <!-- Figure out the positions of the lines --> <!-- <xsl:variable name="vert_line_x_" select="$bc_X_ + ceiling($BLKD_BIFC_W div 2)"/> <xsl:message>vert line x <xsl:value-of select="$vert_line_x_"/></xsl:message> <xsl:message>bus index <xsl:value-of select="@BUS_INDEX"/></xsl:message> --> <xsl:variable name="vert_line_x_"> <xsl:choose> <xsl:when test="@ORIENTED='WEST'"> <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W))"/> </xsl:when> <xsl:when test="@ORIENTED='EAST'"> <xsl:value-of select="($bc_X_ + ($BLKD_BUS_LANE_W - $BLKD_P2P_BUS_W))"/> </xsl:when> </xsl:choose> </xsl:variable> <!-- At least one of the points is going to be the bus --> <!-- <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + $BLKD_PROC2SBS_GAP + (@BUS_INDEX * $BLKD_SBS_LANE_H))"/> --> <xsl:variable name="vert_line_y1_" select="($G_SharedBus_Y + (@BUS_INDEX * $BLKD_SBS_LANE_H))"/> <xsl:variable name="vert_line_y2_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2)"/> <xsl:variable name="v_bus_ul_y_"> <xsl:choose> <xsl:when test="$vert_line_y1_ &gt; $vert_line_y2_"> <xsl:value-of select="$vert_line_y2_"/> </xsl:when> <xsl:when test="$vert_line_y2_ &gt; $vert_line_y1_"> <xsl:value-of select="$vert_line_y1_"/> </xsl:when> </xsl:choose> </xsl:variable> <!-- <xsl:variable name="v_bus_ul_x_" select="$vert_line_x_"/> --> <xsl:variable name="v_bus_ul_x_"> <xsl:choose> <xsl:when test="@ORIENTED='WEST'"> <xsl:value-of select="($vert_line_x_ + $BLKD_MOD_BIF_GAP_H)"/> </xsl:when> <xsl:when test="@ORIENTED='EAST'"> <xsl:value-of select="($vert_line_x_ - $BLKD_MOD_BIF_GAP_H)"/> </xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/> <xsl:variable name="v_bus_height_"> <xsl:choose> <xsl:when test="$vert_line_y1_ &gt; $vert_line_y2_"> <xsl:value-of select="($vert_line_y1_ - $vert_line_y2_)"/> </xsl:when> <xsl:when test="$vert_line_y2_ &gt; $vert_line_y1_"> <xsl:value-of select="($vert_line_y2_ - $vert_line_y1_)"/> </xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="h_bus_ul_x_"> <xsl:choose> <xsl:when test="@ORIENTED='WEST'"> <xsl:value-of select="($bc_X_ - ($BLKD_BUS_LANE_W - $BLKD_BIFC_W) + $BLKD_MOD_BIF_GAP_H)"/> </xsl:when> <xsl:when test="@ORIENTED='EAST'"> <xsl:value-of select="($bc_X_ + $BLKD_BIFC_W - ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2))"/> </xsl:when> </xsl:choose> </xsl:variable> <xsl:variable name="h_bus_ul_y_" select="$bc_Y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/> <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/> <xsl:variable name="h_bus_width_"> <xsl:choose> <xsl:when test="@ORIENTED='WEST'"> <xsl:value-of select="(($bc_X_ + ceiling(($BLKD_BIFC_W - $BLKD_BIFC_Wi) div 2)) - $h_bus_ul_x_ + 1)"/> </xsl:when> <xsl:when test="@ORIENTED='EAST'"> <xsl:value-of select="(($v_bus_ul_x_ + $BLKD_P2P_BUS_W) - $h_bus_ul_x_)"/> </xsl:when> </xsl:choose> </xsl:variable> <!-- <xsl:message>vert line y1 <xsl:value-of select="$vert_line_y1_"/></xsl:message> --> <rect x="{$v_bus_ul_x_}" y="{$v_bus_ul_y_ + 2}" width= "{$v_bus_width_}" height="{$v_bus_height_}" style="stroke:none; fill:{$busColor_}"/> <rect x="{$h_bus_ul_x_}" y="{$h_bus_ul_y_}" width= "{$h_bus_width_}" height="{$h_bus_height_}" style="stroke:none; fill:{$busColor_}"/> </xsl:for-each> </xsl:template> <!-- =========================================================================== --> <!-- FUNCTION TEMPLATE --> <!-- --> <!-- Draw the IP Bucket --> <!-- =========================================================================== --> <xsl:template name="Draw_BlkDiagram_IPBucket"> <!-- Draw IP Bucket --> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET"> <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/> <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/> <xsl:variable name="bucket_x_" select="(ceiling($G_Total_Blkd_W div 2) - ceiling($bucket_w_ div 2))"/> <xsl:variable name="bucket_y_" select="($G_SharedBus_Y + $G_Total_SharedBus_H + $G_Max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP)"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="$bucket_x_"/> <xsl:with-param name="iY" select="($bucket_y_ - 4)"/> <xsl:with-param name="iText" select="'IP'"/> <xsl:with-param name="iClass" select="'bkt_label'"/> </xsl:call-template> <use x="{$bucket_x_}" y="{$bucket_y_}" xlink:href="#ipbucket"/> </xsl:for-each> </xsl:template> <xsl:template name="Draw_BlkDiagram_Key"> <use x="{ceiling($G_Total_Blkd_W div 2) - ceiling($BLKD_KEY_W div 2)}" y="0" xlink:href="#BlkDiagram_Key"/> </xsl:template> <xsl:template name="Define_BlkDiagram_Key"> <xsl:variable name="key_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'KEY'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="key_lt_col_"> <xsl:call-template name="F_BusStd2RGB_LT"> <xsl:with-param name="iBusStd" select="'KEY'"/> </xsl:call-template> </xsl:variable> <g id="KEY_IntrCntrl"> <rect x="0" y="0" rx="3" ry="3" width= "{ceiling($BLKD_INTR_W div 2)}" height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/> <line x1="0" y1="{ceiling($BLKD_INTR_H div 4)}" x2="{ceiling($BLKD_INTR_W div 2)}" y2="{ceiling($BLKD_INTR_H div 4)}" style="stroke:{$COL_BLACK};stroke-width:2"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="1.5"/> <xsl:with-param name="iY" select="(7 + ceiling($BLKD_INTR_H div 2))"/> <xsl:with-param name="iText" select="'x'"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> </g> <g id="KEY_IntrdProc"> <rect x="0" y="0" rx="3" ry="3" width= "{ceiling($BLKD_INTR_W div 2)}" height="{$BLKD_INTR_H}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/> <line x1="0" y1="{ceiling($BLKD_INTR_H div 4) - 2}" x2="{ceiling($BLKD_INTR_W div 2)}" y2="{ceiling($BLKD_INTR_H div 4) - 2}" style="stroke:{$COL_BLACK};stroke-width:1"/> <line x1="0" y1="{ceiling($BLKD_INTR_H div 4) + 2}" x2="{ceiling($BLKD_INTR_W div 2)}" y2="{ceiling($BLKD_INTR_H div 4) + 2}" style="stroke:{$COL_BLACK};stroke-width:1"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="1.5"/> <xsl:with-param name="iY" select="(7 + ceiling($BLKD_INTR_H div 2))"/> <xsl:with-param name="iText" select="'x'"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> </g> <g id="KEY_IntrSrc"> <rect x="0" y="0" rx="3" ry="3" width= "{$BLKD_INTR_W}" height="{ceiling($BLKD_INTR_H div 2)}" style="fill:{$key_lt_col_}; stroke:none; stroke-width:1"/> <line x1="{ceiling($BLKD_INTR_W div 2)}" y1="0" x2="{ceiling($BLKD_INTR_W div 2)}" y2="{ceiling($BLKD_INTR_H div 2)}" style="stroke:{$COL_BLACK};stroke-width:1"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'2'"/> <xsl:with-param name="iY" select="'7'"/> <xsl:with-param name="iText" select="'y'"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(2 + ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="iY" select="'7'"/> <xsl:with-param name="iText" select="'x'"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> </g> <g id="BlkDiagram_Key"> <rect x="0" y="0" width= "{$BLKD_KEY_W}" height="{$BLKD_KEY_H}" style="fill:{$COL_BG}; stroke:none;"/> <rect x="0" y="0" width= "{$BLKD_KEY_W}" height="16" style="fill:{$COL_BG}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/> <xsl:with-param name="iY" select="'14'"/> <xsl:with-param name="iText" select="'KEY'"/> <xsl:with-param name="iClass" select="'key_title'"/> </xsl:call-template> <rect x="0" y="16" width= "{$BLKD_KEY_W}" height="16" style="fill:{$COL_BG_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/> <xsl:with-param name="iY" select="'30'"/> <xsl:with-param name="iText" select="'SYMBOLS'"/> <xsl:with-param name="iClass" select="'key_header'"/> </xsl:call-template> <use x="32" y="47" xlink:href="#KEY_BifLabel" transform="scale(0.75)"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'12'"/> <xsl:with-param name="iY" select="'60'"/> <xsl:with-param name="iText" select="'bus interface'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <use x="20" y="68" xlink:href="#KEY_SharedBus"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'12'"/> <xsl:with-param name="iY" select="'89'"/> <xsl:with-param name="iText" select="'shared bus'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <!-- ================================== BUS CONNECTIONS ================================== --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'110'"/> <xsl:with-param name="iY" select="'47'"/> <xsl:with-param name="iText" select="'Bus connections'"/> <xsl:with-param name="iClass" select="'key_label_ul'"/> </xsl:call-template> <use x="110" y="58" xlink:href="#KEY_busconn_MASTER"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'140'"/> <xsl:with-param name="iY" select="'72'"/> <xsl:with-param name="iText" select="'master or initiator'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 1)}" xlink:href="#KEY_busconn_SLAVE"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'140'"/> <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 1))"/> <xsl:with-param name="iText" select="'slave or target'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 2)}" xlink:href="#KEY_busconn_MASTER_SLAVE"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'140'"/> <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 2))"/> <xsl:with-param name="iText" select="'master slave'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <use x="110" y="{58 + (($BLKD_BIFC_H + 4) * 3)}" xlink:href="#KEY_busconn_MONITOR"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'140'"/> <xsl:with-param name="iY" select="(72 + (($BLKD_BIFC_H + 4) * 3))"/> <xsl:with-param name="iText" select="'monitor'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <!-- ================================== EXTERNAL PORTS ================================== --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'258'"/> <xsl:with-param name="iY" select="'47'"/> <xsl:with-param name="iText" select="'External Ports'"/> <xsl:with-param name="iClass" select="'key_label_ul'"/> </xsl:call-template> <use x="258" y="58" xlink:href="#KEY_INPort"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'288'"/> <xsl:with-param name="iY" select="'72'"/> <xsl:with-param name="iText" select="'input'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <use x="258" y="{58 + ($BLKD_IOP_H * 1) + 4}" xlink:href="#KEY_OUTPort"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'288'"/> <xsl:with-param name="iY" select="(72 + ($BLKD_IOP_H * 1) + 4)"/> <xsl:with-param name="iText" select="'output'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <use x="258" y="{58 + ($BLKD_IOP_H * 2) + 8}" xlink:href="#KEY_INOUTPort"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'288'"/> <xsl:with-param name="iY" select="(72 + ($BLKD_IOP_H * 2) + 8)"/> <xsl:with-param name="iText" select="'inout'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <!-- ================================== INTERRUPTS ================================== --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'380'"/> <xsl:with-param name="iY" select="'47'"/> <xsl:with-param name="iText" select="'Interrupts'"/> <xsl:with-param name="iClass" select="'key_label_ul'"/> </xsl:call-template> <use x="380" y="58" xlink:href="#KEY_IntrCntrl"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'396'"/> <xsl:with-param name="iY" select="'64'"/> <xsl:with-param name="iText" select="'Interrupt'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'396'"/> <xsl:with-param name="iY" select="'74'"/> <xsl:with-param name="iText" select="'Controller'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <use x="380" y="88" xlink:href="#KEY_IntrdProc"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'396'"/> <xsl:with-param name="iY" select="'94'"/> <xsl:with-param name="iText" select="'Interrupt'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'396'"/> <xsl:with-param name="iY" select="'104'"/> <xsl:with-param name="iText" select="'Target'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <use x="380" y="118" xlink:href="#KEY_IntrSrc"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'400'"/> <xsl:with-param name="iY" select="'124'"/> <xsl:with-param name="iText" select="'Interrupt'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'400'"/> <xsl:with-param name="iY" select="'134'"/> <xsl:with-param name="iText" select="'Source'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'360'"/> <xsl:with-param name="iY" select="'146'"/> <xsl:with-param name="iText" select="'X = Controller ID'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'360'"/> <xsl:with-param name="iY" select="'156'"/> <xsl:with-param name="iText" select="'Y = Interrupt Priority'"/> <xsl:with-param name="iClass" select="'key_label_small'"/> </xsl:call-template> <!-- ================================== COLORS ================================== --> <rect x="0" y="160" width= "{$BLKD_KEY_W}" height="16" style="fill:{$COL_BG_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_KEY_W div 2)"/> <xsl:with-param name="iY" select="'172'"/> <xsl:with-param name="iText" select="'COLORS'"/> <xsl:with-param name="iClass" select="'key_header'"/> </xsl:call-template> <!-- <text class="keylblul" x="110" y="190">Bus Standards</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="'110'"/> <xsl:with-param name="iY" select="'190'"/> <xsl:with-param name="iText" select="'Bus Standard'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="dcr_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'DCR'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}" y="200" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$dcr_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + $BLKD_BIFC_W + 4}" y="{200 + (($BLKD_BIF_H + 4) * 1)}">DCR</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + $BLKD_BIFC_W + 4)"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/> <xsl:with-param name="iText" select="'DCR'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="fcb_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'FCB'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 0)}" y="{200 + (($BLKD_BIFC_H + 4) * 1)}" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$fcb_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + $BLKD_BIFC_W + 4}" y="{200 + (($BLKD_BIF_H + 4) * 2)}">FCB</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + $BLKD_BIFC_W + 4)"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/> <xsl:with-param name="iText" select="'FCB'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="fsl_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'FSL'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}" y="200" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$fsl_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}" y="{200 + (($BLKD_BIF_H + 4) * 1)}">FSL</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/> <xsl:with-param name="iText" select="'FSL'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="col_lmb_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'LMB'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 1)}" y="{200 + (($BLKD_BIFC_H + 4) * 1)}" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$col_lmb_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1)}" y="{200 + (($BLKD_BIF_H + 4) * 2)}">LMB</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 1))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/> <xsl:with-param name="iText" select="'LMB'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="opb_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'OPB'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}" y="200" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$opb_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}" y="{200 + (($BLKD_BIF_H + 4) * 1)}">OPB</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/> <xsl:with-param name="iText" select="'OPB'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="plb_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'PLB'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 2)}" y="{200 + (($BLKD_BIFC_H + 4) * 1)}" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$plb_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2)}" y="{200 + (($BLKD_BIF_H + 4) * 2)}">PLB</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 2))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/> <xsl:with-param name="iText" select="'PLB'"/> <xsl:with-param name="iClass" select="'key_header'"/> </xsl:call-template> <xsl:variable name="ocm_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'OCM'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}" y="200" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$ocm_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}" y="{200 + (($BLKD_BIF_H + 4) * 1)}">SOCM</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/> <xsl:with-param name="iText" select="'SOCM'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="xil_p2p_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'XIL'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 3)}" y="{200 + (($BLKD_BIFC_H + 4) * 1)}" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$xil_p2p_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3)}" y="{200 + (($BLKD_BIF_H + 4) * 2)}">Xilinx P2P</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 3))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 2))"/> <xsl:with-param name="iText" select="'Xilinx P2P'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> <xsl:variable name="user_p2p_col_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'USER'"/> </xsl:call-template> </xsl:variable> <rect x="{12 + ((12 + $BLKD_BIFC_W + 36) * 4)}" y="200" width= "{$BLKD_BIFC_H}" height="{$BLKD_BIFC_W}" style="fill:{$user_p2p_col_}; stroke:none;"/> <!-- <text class="keylabel" x="{12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4)}" y="{200 + (($BLKD_BIF_H + 4) * 1)}">USER P2P</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(12 + ($BLKD_BIFC_W + 4) + ((12 + $BLKD_BIFC_W + 36) * 4))"/> <xsl:with-param name="iY" select="(200 + (($BLKD_BIF_H + 4) * 1))"/> <xsl:with-param name="iText" select="'USER P2P'"/> <xsl:with-param name="iClass" select="'key_label'"/> </xsl:call-template> </g> </xsl:template> <xsl:template name="Define_BlkDiagram_Specs"> <xsl:param name="iArch" select="'NA'"/> <xsl:param name="iPart" select="'NA'"/> <xsl:param name="iTimeStamp" select="'NA'"/> <xsl:param name="iEdkVersion" select="'NA'"/> <g id="BlkDiagram_Specs"> <rect x="0" y="0" width= "{$BLKD_SPECS_W}" height="{$BLKD_SPECS_H}" style="fill:{$COL_BG}; stroke:none;"/> <rect x="0" y="0" width= "{$BLKD_SPECS_W}" height="16" style="fill:{$COL_BG}; stroke:none;"/> <!-- ================================== SPEC HEADER ================================== --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'key_title'"/> <xsl:with-param name="iX" select="ceiling($BLKD_SPECS_W div 2)"/> <xsl:with-param name="iY" select="'14'"/> <xsl:with-param name="iText" select="'SPECS'"/> </xsl:call-template> <!-- <text class="keytitle" x="{ceiling($BLKD_SPECS_W div 2)} " y="14">SPECS</text> --> <!-- ================================== EDK VERSION ================================== --> <rect x="0" y="20" width= "{$BLKD_SPECS_W}" height="16" style="fill:{$COL_BG_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_name'"/> <xsl:with-param name="iX" select="'4'"/> <xsl:with-param name="iY" select="'32'"/> <xsl:with-param name="iText" select="'EDK VERSION'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/> <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/> <xsl:with-param name="iY" select="'32'"/> <xsl:with-param name="iText" select="$iEdkVersion"/> </xsl:call-template> <!-- ================================== ARCH ================================== --> <rect x="0" y="40" width= "{$BLKD_SPECS_W}" height="16" style="fill:{$COL_BG_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_name'"/> <xsl:with-param name="iX" select="'4'"/> <xsl:with-param name="iY" select="'52'"/> <xsl:with-param name="iText" select="'ARCH'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/> <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/> <xsl:with-param name="iY" select="'52'"/> <xsl:with-param name="iText" select="$iArch"/> </xsl:call-template> <!-- <text class="specsvalue" x="{($BLKD_SPECS_W + 1) - (string-length($blkd_arch) * 6.5)}" y="52"><xsl:value-of select="$blkd_arch"/></text> <text class="specsvaluemid" x="{($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)}" y="52"><xsl:value-of select="$iArch"/></text> --> <!-- ================================== PART ================================== --> <rect x="0" y="60" width= "{$BLKD_SPECS_W}" height="16" style="fill:{$COL_BG_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_name'"/> <xsl:with-param name="iX" select="'4'"/> <xsl:with-param name="iY" select="'72'"/> <xsl:with-param name="iText" select="'PART'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/> <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - ceiling($BLKD_SPECS_W div 5)"/> <xsl:with-param name="iY" select="'72'"/> <xsl:with-param name="iText" select="$iPart"/> </xsl:call-template> <!-- ================================== TIMESTAMP ================================== --> <rect x="0" y="80" width= "{$BLKD_SPECS_W}" height="16" style="fill:{$COL_BG_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_name'"/> <xsl:with-param name="iX" select="'4'"/> <xsl:with-param name="iY" select="'92'"/> <xsl:with-param name="iText" select="'GENERATED'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iClass" select="'blkd_spec_value_mid'"/> <xsl:with-param name="iX" select="($BLKD_SPECS_W + 1) - (string-length($iTimeStamp) * 3.5)"/> <xsl:with-param name="iY" select="'92'"/> <xsl:with-param name="iText" select="$iTimeStamp"/> </xsl:call-template> </g> </xsl:template> </xsl:stylesheet> <!-- =========================================================================== --> <!-- FUNCTION TEMPLATE --> <!-- --> <!-- =========================================================================== -->
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2013 by the author(s) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Author(s): <NAME> <<EMAIL>> ================================================================================ Convert a OpTiMSoC System Description XML Mesh into a SVG representation This XSLT stylesheet convert a tiled multicore system with a mesh interconnect, as described in a OpTiMSoC System Description XML into a SVG graphic showing the tiles and the interconnect. Most drawing parameters can be set as configuration options below, e.g. the box sizes, colors, the font size, etc. Much care has been taken to allow the graphic rendering to be only dependant on those parameters, but still, not all combinations will work and care needs to be taken not to produce wrong-looking results. For usage in the GUI each relevant component in the graphic is overlayed with a transparent box with a optimsoc-idref attribute set to the ID of the component it represents. The transparent box is required to prevent the SVG viewer to show selectable text, etc. --> <xsl:stylesheet version="1.0" xmlns="http://www.optimsoc.org/xmlns/optimsoc-system" xmlns:o="http://www.optimsoc.org/xmlns/optimsoc-system" xmlns:optimsoc="http://www.optimsoc.org/xmlns/optimsoc-system" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- Configuration Parameters Note that while those parameters can be freely edited, not all combinations make sense. E.g. it does not make sense to make the boxes (e.g. SIZE_TILE) smaller than the BOX_PADDING. --> <!-- font size [px] --> <xsl:variable name="FONT_SIZE" select="12"/> <!-- box padding (distance between a box border and its contents) [px] --> <xsl:variable name="BOX_PADDING" select="10"/> <!-- edge length of a router [px] --> <xsl:variable name="SIZE_ROUTER" select="50"/> <!-- edge length of a tile [px] --> <xsl:variable name="SIZE_TILE" select="100"/> <!-- length of the tile to router link in x direction [px] --> <xsl:variable name="TILE_ROUTER_CONNECTION_X" select="20"/> <!-- length of the tile to router link in y direction [px] --> <xsl:variable name="TILE_ROUTER_CONNECTION_Y" select="20"/> <!-- box colors for memories (fill and stroke) --> <xsl:variable name="COLOR_MEMORY_FILL" select="'#95c0e0'"/> <xsl:variable name="COLOR_MEMORY_STROKE" select="'#64a0c8'"/> <!-- box colors for compute tile cores (fill and stroke) --> <xsl:variable name="COLOR_CORE_FILL" select="'#f08e46'"/> <xsl:variable name="COLOR_CORE_STROKE" select="'#e37222'"/> <!-- Tile fill color This template is called to determine the fill (background) color of the different tile types. Adapt this template if you introduce new tile types. --> <xsl:template name="svg-get-tile-color-fill"> <xsl:param name="tiletype"/> <xsl:choose> <xsl:when test="$tiletype = 'computetile'">#bec665</xsl:when> <xsl:otherwise>#ffffff</xsl:otherwise> </xsl:choose> </xsl:template> <!-- Tile stroke color This template is called to determine the stroke (border) color of the different tile types. Adapt this template if you introduce new tile types. --> <xsl:template name="svg-get-tile-color-stroke"> <xsl:param name="tiletype"/> <xsl:choose> <xsl:when test="$tiletype = 'computetile'">#a2ad00</xsl:when> <xsl:otherwise>#ffffff</xsl:otherwise> </xsl:choose> </xsl:template> <!-- Top-level: generate a SVG image for a mesh NoC This template creates a whole SVG image (including the svg:svg root node) for the mesh in a OpTiMSoC system description. --> <xsl:template name="svg-mesh"> <svg:svg> <!-- whole image dimensions --> <xsl:attribute name="width"> <xsl:value-of select="/o:system/o:meshnoc/@xdim * (2 * $SIZE_ROUTER + $SIZE_TILE + $TILE_ROUTER_CONNECTION_X)"/> </xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="/o:system/o:meshnoc/@ydim * (2 * $SIZE_ROUTER + $SIZE_TILE + $TILE_ROUTER_CONNECTION_Y)"/> </xsl:attribute> <!-- insert all basic blocks --> <xsl:call-template name="svg-mesh-insert-basic-block"> <xsl:with-param name="x" select="0"/> <xsl:with-param name="y" select="0"/> <xsl:with-param name="xdim" select="/o:system/o:meshnoc/@xdim"/> <xsl:with-param name="ydim" select="/o:system/o:meshnoc/@ydim"/> </xsl:call-template> </svg:svg> </xsl:template> <!-- Draw a single basic block A basic block in the mesh consists of the tile, the router, the connection between tile and router, as well as the NoC links to the east and to the south (if applicable, i.e. if the tile is not at the right or bottom border). This template calls itself recursively to insert all blocks. --> <xsl:template name="svg-mesh-insert-basic-block"> <xsl:param name="x"/> <xsl:param name="y"/> <xsl:param name="xdim"/> <xsl:param name="ydim"/> <xsl:param name="tileid"> <xsl:call-template name="svg-get-tileid"> <xsl:with-param name="x" select="$x"/> <xsl:with-param name="y" select="$y"/> </xsl:call-template> </xsl:param> <xsl:param name="tiletype"> <xsl:call-template name="svg-get-tile-type"> <xsl:with-param name="tileid"><xsl:value-of select="$tileid"/></xsl:with-param> </xsl:call-template> </xsl:param> <!-- Origin (0,0) of the basic block we're drawing here --> <xsl:param name="bbOriginX" select="$x * ($SIZE_TILE + 2 * $SIZE_ROUTER)"/> <xsl:param name="bbOriginY" select="$y * ($SIZE_TILE + 2 * $SIZE_ROUTER)"/> <!-- Tile outline --> <svg:rect style="stroke-width:1px"> <xsl:attribute name="width"><xsl:value-of select="$SIZE_TILE"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$SIZE_TILE"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$bbOriginX"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$bbOriginY"/></xsl:attribute> <xsl:attribute name="fill"> <xsl:call-template name="svg-get-tile-color-fill"> <xsl:with-param name="tiletype"><xsl:value-of select="$tiletype"/></xsl:with-param> </xsl:call-template> </xsl:attribute> <xsl:attribute name="stroke"> <xsl:call-template name="svg-get-tile-color-stroke"> <xsl:with-param name="tiletype"><xsl:value-of select="$tiletype"/></xsl:with-param> </xsl:call-template> </xsl:attribute> </svg:rect> <!-- Tile label --> <svg:text text-anchor="middle" font-family="Sans"> <xsl:attribute name="font-size"><xsl:value-of select="$FONT_SIZE"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$bbOriginX + $SIZE_TILE div 2"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$bbOriginY + 1.5 * $FONT_SIZE"/></xsl:attribute> <xsl:call-template name="svg-label-for-tile"> <xsl:with-param name="x" select="$x"/> <xsl:with-param name="y" select="$y"/> </xsl:call-template> </svg:text> <!-- Tile: transparent box for UI --> <svg:rect style="opacity:0;fill:#ffffff;stroke:none"> <xsl:attribute name="width"><xsl:value-of select="$SIZE_TILE"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$SIZE_TILE"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$bbOriginX"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$bbOriginY"/></xsl:attribute> <xsl:attribute name="optimsoc-idref"><xsl:value-of select="$tileid"/></xsl:attribute> </svg:rect> <!-- tile contents --> <xsl:call-template name="svg-draw-tile-contents"> <xsl:with-param name="tileid"><xsl:value-of select="$tileid"/></xsl:with-param> <xsl:with-param name="x0"><xsl:value-of select="$bbOriginX + $BOX_PADDING"/></xsl:with-param> <xsl:with-param name="y0"><xsl:value-of select="$bbOriginY + 2 * $FONT_SIZE"/></xsl:with-param> <xsl:with-param name="width"><xsl:value-of select="$SIZE_TILE - 2 * $BOX_PADDING"/></xsl:with-param> <xsl:with-param name="height"><xsl:value-of select="$SIZE_TILE - $BOX_PADDING - 2 * $FONT_SIZE"/></xsl:with-param> </xsl:call-template> <!-- Router --> <svg:rect style="fill:none;stroke:#000000;stroke-width:1px"> <xsl:attribute name="width"><xsl:value-of select="$SIZE_ROUTER"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$SIZE_ROUTER"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$bbOriginX + $TILE_ROUTER_CONNECTION_X + $SIZE_TILE"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$bbOriginY + $TILE_ROUTER_CONNECTION_Y + $SIZE_TILE"/></xsl:attribute> </svg:rect> <!-- NoC router local link between tile and router --> <svg:path style="fill:none;stroke:#000000;stroke-width:1px;"> <xsl:attribute name="d"> <!-- starting point (absolute coordinates) --> <xsl:text>M</xsl:text> <xsl:value-of select="$bbOriginX + $SIZE_TILE"/><xsl:text> </xsl:text> <xsl:value-of select="$bbOriginY + $SIZE_TILE"/> <!-- length of the line (relative coordinates) --> <xsl:text> l</xsl:text> <xsl:value-of select="$TILE_ROUTER_CONNECTION_X"/><xsl:text> </xsl:text> <xsl:value-of select="$TILE_ROUTER_CONNECTION_Y"/> </xsl:attribute> </svg:path> <!-- NoC link horizontal --> <xsl:if test="$x != $xdim - 1"> <svg:path style="fill:none;stroke:#000000;stroke-width:2px;"> <xsl:attribute name="d"> <!-- starting point (absolute coordinates) --> <xsl:text>M</xsl:text> <xsl:value-of select="$bbOriginX + $SIZE_TILE + $TILE_ROUTER_CONNECTION_X + $SIZE_ROUTER"/><xsl:text> </xsl:text> <xsl:value-of select="$bbOriginY + $SIZE_TILE + $TILE_ROUTER_CONNECTION_Y + $SIZE_ROUTER div 2"/> <!-- length of the line (relative coordinates) --> <xsl:text> l</xsl:text> <xsl:value-of select="$SIZE_TILE + $SIZE_ROUTER"/><xsl:text> </xsl:text> <xsl:value-of select="0"/> </xsl:attribute> </svg:path> </xsl:if> <!-- NoC link vertical --> <xsl:if test="$y != $ydim - 1"> <svg:path style="fill:none;stroke:#000000;stroke-width:2px;"> <xsl:attribute name="d"> <!-- starting point (absolute coordinates) --> <xsl:text>M</xsl:text> <xsl:value-of select="$bbOriginX + $SIZE_TILE + $TILE_ROUTER_CONNECTION_X + $SIZE_ROUTER div 2"/><xsl:text> </xsl:text> <xsl:value-of select="$bbOriginY + $SIZE_TILE + $TILE_ROUTER_CONNECTION_Y + $SIZE_ROUTER"/> <!-- length of the line (relative coordinates) --> <xsl:text> l</xsl:text> <xsl:value-of select="0"/><xsl:text> </xsl:text> <xsl:value-of select="$SIZE_TILE + $SIZE_ROUTER"/> </xsl:attribute> </svg:path> </xsl:if> <!-- recurse to the next basic block --> <xsl:if test="$x &lt; ($xdim - 1)"> <xsl:call-template name="svg-mesh-insert-basic-block"> <xsl:with-param name="x" select="$x + 1"/> <xsl:with-param name="y" select="$y"/> <xsl:with-param name="xdim" select="$xdim"/> <xsl:with-param name="ydim" select="$ydim"/> </xsl:call-template> </xsl:if> <xsl:if test="$x = ($xdim - 1) and $y &lt; ($ydim - 1)"> <xsl:call-template name="svg-mesh-insert-basic-block"> <xsl:with-param name="x" select="0"/> <xsl:with-param name="y" select="$y + 1"/> <xsl:with-param name="xdim" select="$xdim"/> <xsl:with-param name="ydim" select="$ydim"/> </xsl:call-template> </xsl:if> </xsl:template> <!-- Get the label for a tile at mesh position (x,y) --> <xsl:template name="svg-label-for-tile"> <xsl:param name="x"/> <xsl:param name="y"/> <xsl:param name="tileid"> <xsl:call-template name="svg-get-tileid"> <xsl:with-param name="x" select="$x"/> <xsl:with-param name="y" select="$y"/> </xsl:call-template> </xsl:param> <xsl:param name="tiletype"> <xsl:call-template name="svg-get-tile-type"> <xsl:with-param name="tileid"><xsl:value-of select="$tileid"/></xsl:with-param> </xsl:call-template> </xsl:param> <xsl:if test="$tiletype = 'computetile'"> <xsl:text>compute tile </xsl:text> <xsl:value-of select="/o:system/o:tiles/*[@id = $tileid]/@computetileid"/> </xsl:if> </xsl:template> <!-- Get the label for a memory with a given memoryid --> <xsl:template name="svg-label-for-memory"> <xsl:param name="memoryid"/> <xsl:text>memory </xsl:text> <xsl:value-of select="$memoryid"/> </xsl:template> <!-- Get the tile ID for a tile in a given (x,y) mesh position --> <xsl:template name="svg-get-tileid"> <xsl:param name="x"/> <xsl:param name="y"/> <xsl:value-of select="/o:system/o:meshnoc/o:locallinks/o:locallink[o:con/o:meshroutercon/@x=$x and o:con/o:meshroutercon/@y = $y]/o:con/o:tilecon/@tile"/> </xsl:template> <!-- Get the tile type for a given tile ID --> <xsl:template name="svg-get-tile-type"> <xsl:param name="tileid"/> <xsl:value-of select="local-name(/o:system/o:tiles/*[@id = $tileid])"/> </xsl:template> <!-- Draw the contents of a tile If you introduce a new tile type, edit this template to call your content template, like it is done for the compute tile. If your tile type does not need any inner contents you can simply leave this template as is. --> <xsl:template name="svg-draw-tile-contents"> <xsl:param name="tileid"/> <xsl:param name="x0"/> <xsl:param name="y0"/> <xsl:param name="width"/> <xsl:param name="height"/> <xsl:param name="tiletype"> <xsl:call-template name="svg-get-tile-type"> <xsl:with-param name="tileid"><xsl:value-of select="$tileid"/></xsl:with-param> </xsl:call-template> </xsl:param> <xsl:choose> <xsl:when test="$tiletype = 'computetile'"> <xsl:call-template name="svg-draw-tile-contents-computetile"> <xsl:with-param name="tileid"><xsl:value-of select="$tileid"/></xsl:with-param> <xsl:with-param name="x0"><xsl:value-of select="$x0"/></xsl:with-param> <xsl:with-param name="y0"><xsl:value-of select="$y0"/></xsl:with-param> <xsl:with-param name="width"><xsl:value-of select="$width"/></xsl:with-param> <xsl:with-param name="height"><xsl:value-of select="$height"/></xsl:with-param> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template> <!-- Draw the inner contents of a compute tile A compute tile contains a box for each core, as well as a box for a distributed memory (if applicable). --> <xsl:template name="svg-draw-tile-contents-computetile"> <xsl:param name="tileid"/> <xsl:param name="x0"/> <xsl:param name="y0"/> <xsl:param name="width"/> <xsl:param name="height"/> <xsl:param name="corecount"><xsl:value-of select="count(/o:system/o:tiles/*[@id = $tileid]/o:cores/o:core)"/></xsl:param> <xsl:param name="coreboxwidth"> <xsl:value-of select="$width div $corecount"/> </xsl:param> <xsl:param name="innerboxheight"> <xsl:choose> <xsl:when test="/o:system/o:tiles/*[@id = $tileid]/o:memory"> <xsl:value-of select="$height div 2 - $BOX_PADDING div 2"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$height"/> </xsl:otherwise> </xsl:choose> </xsl:param> <!-- cores --> <xsl:for-each select="/o:system/o:tiles/*[@id = $tileid]/o:cores/o:core"> <!-- box --> <svg:rect style="stroke-width:1px"> <xsl:attribute name="width"><xsl:value-of select="$coreboxwidth"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$innerboxheight"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$x0 + (position() - 1) * $coreboxwidth"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$y0"/></xsl:attribute> <xsl:attribute name="fill"><xsl:value-of select="$COLOR_CORE_FILL"/></xsl:attribute> <xsl:attribute name="stroke"><xsl:value-of select="$COLOR_CORE_STROKE"/></xsl:attribute> </svg:rect> <!-- label --> <svg:text text-anchor="middle" font-family="Sans"> <xsl:attribute name="font-size"><xsl:value-of select="$FONT_SIZE"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$x0 + (position() - 1) * $coreboxwidth + $coreboxwidth div 2"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$y0 + 1.5 * $FONT_SIZE"/></xsl:attribute> <xsl:value-of select="concat('c', @coreid)"/> </svg:text> <!-- transparent box for user interface --> <svg:rect style="opacity:0;fill:#ffffff;stroke:none"> <xsl:attribute name="width"><xsl:value-of select="$coreboxwidth"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$innerboxheight"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$x0 + (position() - 1) * $coreboxwidth"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$y0"/></xsl:attribute> <xsl:attribute name="optimsoc-idref"><xsl:value-of select="@id"/></xsl:attribute> </svg:rect> </xsl:for-each> <!-- tile distributed memory --> <xsl:if test="/o:system/o:tiles/*[@id = $tileid]/o:memory"> <!-- box --> <svg:rect style="stroke-width:1px"> <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$innerboxheight"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$x0"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$y0 + $innerboxheight + $BOX_PADDING"/></xsl:attribute> <xsl:attribute name="fill"><xsl:value-of select="$COLOR_MEMORY_FILL"/></xsl:attribute> <xsl:attribute name="stroke"><xsl:value-of select="$COLOR_MEMORY_STROKE"/></xsl:attribute> </svg:rect> <!-- label --> <svg:text text-anchor="middle" font-family="Sans"> <xsl:attribute name="font-size"><xsl:value-of select="$FONT_SIZE"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$x0 + $width div 2"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$y0 + $innerboxheight + $BOX_PADDING + 1.5 * $FONT_SIZE"/></xsl:attribute> <xsl:call-template name="svg-label-for-memory"> <xsl:with-param name="memoryid" select="/o:system/o:tiles/*[@id = $tileid]/o:memory/@memoryid"/> </xsl:call-template> </svg:text> <!-- transparent box for user interface --> <svg:rect style="opacity:0;fill:#ffffff;stroke:none"> <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute> <xsl:attribute name="height"><xsl:value-of select="$innerboxheight"/></xsl:attribute> <xsl:attribute name="x"><xsl:value-of select="$x0"/></xsl:attribute> <xsl:attribute name="y"><xsl:value-of select="$y0 + $innerboxheight + $BOX_PADDING"/></xsl:attribute> <xsl:attribute name="optimsoc-idref"><xsl:value-of select="/o:system/o:tiles/*[@id = $tileid]/o:memory/@id"/></xsl:attribute> </svg:rect> </xsl:if> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <!-- General explanation of how I conditionally create variables that select nodes or node-sets. To make variables that hold node or node-set values, I declare variables in series with lower priority results negated by the existence of higher-priority results. Creating a variable that conditionally branches with a xsl:choose cannot select a node. For example, consider $gview. It is the union of two variables between which only one node can be selected. This is ensured by the lower-priority $gfview deferring to $gsview by including the predicate expression [not($gsview)]. --> <xsl:variable name="merge_num" select="/*/*[@merged][1]/@merged" /> <!-- Save a global $mode-type value from merged types or root mode-type value. --> <xsl:variable name="mtm_result" select="/*/*[@rndx][@merged=$merge_num]/@merge-type" /> <xsl:variable name="mtm_rschema" select="/*/*[not($mtm_result)][@rndx][@merged=$merge_num]/schema/@merge-type" /> <xsl:variable name="mtm_schema" select="/*[not($mtm_result|$mtm_rschema)]/schema/@merge-type" /> <xsl:variable name="mt_root" select="/*[not($mtm_result|$mtm_rschema|$mtm_schema)]/@mode-type" /> <xsl:variable name="mode-type" select="$mtm_result|$mtm_rschema|$mtm_schema|$mt_root" /> <xsl:variable name="result-row" select="/*[$mode-type='form-result']/*[@rndx=1]/*[@error]" /> <!-- Construct global variables $err_condition, $gview, $gschema, and $gresult for use by template fill_host in sfw_host.xsl. --> <!-- Create $err_condition variable which acts as a flag to indicate that the view is being preempted by an error message. --> <xsl:variable name="docel_msg" select="/message" /> <xsl:variable name="child_msg" select="/*[not($docel_msg)]/message" /> <xsl:variable name="msg-el" select="$docel_msg | $child_msg" /> <xsl:variable name="err_condition"> <xsl:choose> <xsl:when test="$result-row and $result-row/@error&gt;0">1</xsl:when> <xsl:when test="$msg-el and $msg-el/@type='error'">2</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- Merged results trump resultset mode-type settings --> <xsl:variable name="mer_schema" select="/*/schema[@merged=$merge_num]" /> <xsl:variable name="mrs_schema" select="/*/*[@rndx][@merged=$merge_num]/schema" /> <xsl:variable name="mrschema" select="$mer_schema|$mrs_schema" /> <xsl:variable name="is_merge_form" select="$mrschema[starts-with(@merge-type,'form-')]" /> <xsl:variable name="is_form" select="not($is_merge_form) and starts-with($mode-type,'form-')" /> <!-- <xsl:variable name="is_form" select="starts-with($mode-type,'form-')" /> --> <xsl:variable name="dschema" select="/*[$is_form][not($mrschema)]/schema" /> <xsl:variable name="rschema" select="/*[$is_form][not($mrschema|$dschema)]/*[@rndx=1]/schema" /> <xsl:variable name="gschema" select="($mrschema|$dschema|$rschema)" /> <!-- $gview, if available, will dictate which result to use. --> <xsl:variable name="gsview" select="/*/views/view[@selected]" /> <xsl:variable name="gfview" select="/*[not($gsview)]/views/view[1]" /> <xsl:variable name="gview" select="$gsview | $gfview" /> <!-- Build $gresult from a view or as a fallback, the first result in the resultset. --> <xsl:variable name="m_res" select="/*/*[@rndx][@merge-type]" /> <xsl:variable name="b_res" select="/*[not($m_res)]/*[local-name()=/*/@base_result]" /> <xsl:variable name="v_res" select="/*[not($m_res|$b_res)][$gview]/*[@rndx][local-name()=$gview/@result]"/> <xsl:variable name="f_res" select="/*[not($m_res|$b_res|$v_res)]/*[@rndx=1]" /> <xsl:variable name="gresult" select="$m_res|$b_res|$v_res|$f_res" /> </xsl:stylesheet>
<?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:xlink="http://www.w3.org/1999/xlink"> <xsl:strip-space elements="*"/> <xsl:variable name="FRAME_TOCTREE"><xsl:value-of select="$PARAM_PREFIX"/>_toc</xsl:variable> <!-- <xsl:variable name="FNM_TOCTREE_JS"><xsl:value-of select="$FRAME_TOCTREE"/>.js</xsl:variable> <xsl:variable name="FNM_TOCTREE_CSS"><xsl:value-of select="$FRAME_TOCTREE"/>.css</xsl:variable> --> <xsl:variable name="FNM_TOCTREE_HTML"><xsl:value-of select="$FRAME_TOCTREE"/>.html</xsl:variable> <xsl:variable name="IMG_TOCTREE_BROPEN">imgs/IMG_openBranch.png</xsl:variable> <xsl:variable name="IMG_TOCTREE_BRCLSE">imgs/IMG_closeBranch.png</xsl:variable> <xsl:template name="WriteFrame_TOCTREE"> <HTML> <HEAD> <TITLE>Table of Contents</TITLE> <BASE target="{$FRAME_FRMMAIN}"></BASE> <!--specify a css for the TOC --> <STYLE type="text/css"> <xsl:call-template name="WriteContents_TOCTree_CSS"/> </STYLE> <!--specify the javascript for the TOC--> <SCRIPT type="text/javascript"> <xsl:call-template name="WriteContents_TOCTree_Script"/> </SCRIPT> </HEAD> <!--Layout Table of contents --> <BODY class="main_body"> <xsl:call-template name="WriteContents_TOCTree_HTML"/> </BODY> </HTML> </xsl:template> <!-- ======================= LAYOUT TABLE OF CONTENTS ====================================== --> <xsl:template name="WriteContents_TOCTree_HTML"> <xsl:variable name="toctree_col_" select="$COL_WHITE"/> <xsl:variable name="toctree_width_" select="$G_TOC_WIDTH"/> <TABLE BGCOLOR="{$toctree_col_}" WIDTH="{$toctree_width_}" COLS="1" cellspacing="0" cellpadding="0" border="0"> <TD COLSPAN="1" VALIGN="Top"> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_OVERVIEW" style="text-decoration:none"><SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">Overview</SPAN></A><BR/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_BLOCKDIAGRAM" style="text-decoration:none"><SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">Block Diagram</SPAN></A><BR/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_EXTERNALPORTS" style="text-decoration:none"><SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">External Ports</SPAN></A><BR/> <!-- ======================================== PROCESSORS ======================================== --> <xsl:if test="($G_NUMOF_PROCESSORS &gt; 0)"> <DIV class="trigger" onClick="showBranch('Processors'); swapBranchImg('BranchImg_Processors');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Processors"></IMG> <xsl:if test="($G_NUMOF_PROCESSORS &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Processors</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_PROCESSORS = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Processor</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Processors"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'PROCESSOR')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> <!-- <xsl:if test="MEMORYMAP/MEMRANGE[(@INSTANCE)]"> <A HREF="{$FNM_FRMMAIN_HTML}#_{@INSTANCE}_MemoryMap" style="text-decoration:one"><SPAN style="color:{$DS_COL_BLACK}; font: italic14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;memory map</SPAN></A><xsl:if test="LICENSEINFO"><IMG SRC="imgs/IMG_LicensedCore.bmp" border="0" vspace="0" hspace="0"/></xsl:if><BR></BR> </xsl:if> --> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== DEBUGGERS ======================================== --> <xsl:if test="($G_NUMOF_DEBUGGERS &gt; 0)"> <DIV class="trigger" onClick="showBranch('Debuggers'); swapBranchImg('BranchImg_Debuggers');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Debuggers"></IMG> <xsl:if test="($G_NUMOF_DEBUGGERS &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Debuggers</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_DEBUGGERS = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Debuggers</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Debuggers"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'DEBUG')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== INTERRUPT CONTROLLERS ======================================== --> <xsl:if test="($G_NUMOF_INTERRUPT_CNLTRS &gt; 0)"> <DIV class="trigger" onClick="showBranch('Interrupt_Cntlrs'); swapBranchImg('BranchImg_Interrupt_Cntlrs');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Interrupt_Cntlrs"></IMG> <xsl:if test="($G_NUMOF_INTERRUPT_CNLTRS &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Interrupt Controllers</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_INTERRUPT_CNLTRS = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Interrupt Controllers</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Interrupt_Cntlrs"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'INTERRUPT_CNTLR')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== BUSSES ======================================== --> <xsl:if test="($G_NUMOF_BUSSES &gt; 0)"> <DIV class="trigger" onClick="showBranch('Busses'); swapBranchImg('BranchImg_Busses');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Busses"></IMG> <xsl:if test="($G_NUMOF_BUSSES &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Busses</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_BUSSES = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Bus</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Busses"> <xsl:for-each select="$G_MODULES/MODULE[((@MODCLASS = 'BUS') or (@MODCLASS = 'BUS_ARBITER'))]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== BUS BRIDGES ======================================== --> <xsl:if test="($G_NUMOF_BRIDGES &gt; 0)"> <DIV class="trigger" onClick="showBranch('Bridges'); swapBranchImg('BranchImg_Bridges');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Bridges"></IMG> <xsl:if test="($G_NUMOF_BRIDGES &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Bridges</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_BRIDGES = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Bridge</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Bridges"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'BUS_BRIDGE')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== MEMORY ======================================== --> <xsl:if test="($G_NUMOF_MEMORYS &gt; 0)"> <DIV class="trigger" onClick="showBranch('Memory'); swapBranchImg('BranchImg_Memory');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Memory"></IMG> <xsl:if test="($G_NUMOF_MEMORYS &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Memorys</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_MEMORYS = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Memory</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Memory"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== MEMORY CONTROLLERS ======================================== --> <xsl:if test="($G_NUMOF_MEMORY_CNTLRS &gt; 0)"> <DIV class="trigger" onClick="showBranch('Memory_Cntlrs'); swapBranchImg('BranchImg_Memory_Cntlrs');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Memory_Cntlrs"></IMG> <xsl:if test="($G_NUMOF_MEMORY_CNTLRS &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Memory Controllers</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_MEMORY_CNTLRS = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Memory Controller</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Memory_Cntlrs"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'MEMORY_CNTLR')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== PERIPHERALS ======================================== --> <xsl:if test="($G_NUMOF_PERIPHERALS &gt; 0)"> <DIV class="trigger" onClick="showBranch('Peripherals'); swapBranchImg('BranchImg_Peripherals');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Peripherals"></IMG> <xsl:if test="($G_NUMOF_PERIPHERALS &gt; 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;Peripherals</SPAN> </xsl:if> <xsl:if test="($G_NUMOF_PERIPHERALS = 1)"> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana ArialHelvetica,sans-serif">&#160;Peripheral</SPAN> </xsl:if> </DIV> <SPAN class="branch" id="Peripherals"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'PERIPHERAL')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <!-- ======================================== IP ======================================== --> <xsl:if test="($G_NUMOF_IPS &gt; 0)"> <DIV class="trigger" onClick="showBranch('IP'); swapBranchImg('BranchImg_Ips');"> <IMG src="{$IMG_TOCTREE_BROPEN}" border="0" id="BranchImg_Ips"></IMG> <SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">&#160;IP</SPAN> </DIV> <SPAN class="branch" id="IP"> <xsl:for-each select="$G_MODULES/MODULE[(@MODCLASS = 'IP')]"> <xsl:sort select="@INSTANCE"/> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_{@INSTANCE}" style="text-decoration:none"><SPAN style="color:{$COL_XLNX}; font: italic 14px Verdana Arial,Helvetica,sans-serif">&#160;&#160;&#160;<xsl:value-of select="@INSTANCE"/></SPAN></A><BR></BR> </xsl:for-each> </SPAN> </xsl:if> <A HREF="{$FNM_FRMMAIN_HTML}#ANCHOR_TIMINGINFO" style="text-decoration:none"><SPAN style="color:{$COL_BLACK}; font: bold 16px Verdana Arial,Helvetica,sans-serif">Timing Information</SPAN></A><BR></BR> </TD> </TABLE> </xsl:template> <xsl:template name="WriteContents_TOCTree_Script"> var openImg = new Image(); var clseImg = new Image(); openImg.src = "<xsl:value-of select="$IMG_TOCTREE_BROPEN"/>"; clseImg.src = "<xsl:value-of select="$IMG_TOCTREE_BRCLSE"/>"; function showBranch(iBranchId) { var branchObj = document.getElementById(iBranchId).style; if(branchObj.display== "block") branchObj.display = "none"; else branchObj.display = "block"; } function swapBranchImg(iBranchImgId) { branchImg = document.getElementById(iBranchImgId); if(branchImg.src.indexOf('<xsl:value-of select="$IMG_TOCTREE_BRCLSE"/>') > -1) branchImg.src = openImg.src; else branchImg.src = clseImg.src; } </xsl:template> <xsl:template name="WriteContents_TOCTree_CSS"> .trigger { cursor : hand; cursor : pointer; } .branch { display : none; margin-left : 16px; } </xsl:template> </xsl:stylesheet> <!-- ======================= END LAYOUT TABLE OF CONTENT TREE =================================== -->
<filename>ds/security/ssr/[windir.security.ssr]/transformfiles/sce-configure-script.xsl <?xml version="1.0" encoding="iso-8859-1"?> <!-- simple xslt file: sce_inf.xsl --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ssr="http://microsoft.com/sce/ssr" > <xsl:import href="../CommonLib/ExtFunctions.xsl"/> <xsl:output method="text" indent="no"/> <xsl:template match="/SSRSecurityPolicy/Services"> <![CDATA[ <job id="SsrSceConfigure"> <reference object="SSR.SsrCore"/> <script language="VBScript"> ]]> Option Explicit On Error Resume Next DIM Sce Set Sce = CreateObject("Ssr.SCEAgent") If Err.Number &lt;&gt; 0 Then WScript.Echo "Failed to create SSR.SCEAgent object." WScript.Quit Err.Number End If <xsl:variable name="inf" select="ssr:GetFileLocation('Configure', 'SCE.inf')"/> <xsl:variable name="log" select="ssr:GetFileLocation('Configure', 'SCE-Configure.log')"/> Sce.Configure "<xsl:value-of select="$inf"/>", 65535, "<xsl:value-of select="$log"/>" If Err.Number &lt;&gt; 0 Then WScript.Echo "Sce.Configure failed." WScript.Quit Err.Number End If <![CDATA[ </script> </job> ]]> </xsl:template> </xsl:stylesheet>
<reponame>npocmaka/Windows-Server-2003 <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="xmldisplay.xsl"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:d2="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> <xsl:template match="/"> <html> <head> <meta http-equiv="Content-Type" content="text/html; CHARSET=windows-1252" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "<EMAIL>" r (n 0 s 0 v 0 l 0))' /> <meta http-equiv="MSThemeCompatible" content="Yes" /> <style type="text/css"> body { font-family:Tahoma; font-size:8pt; padding:3px; } .c { cursor:hand; } .b { color:red; font-family:Courier New; font-weight:bold; text-decoration:none; } .e { margin-left:1em; text-indent:-1em; margin-right:1em; } .k { margin-left:1em; text-indent:-1em; margin-right:1em; } .t { color:#990000; } .xt { xcolor:#990099; } .ns { color:red; } .dt { color:green; } .tx { font-weight:bold; } .db { text-indent:0px; margin: 0em 1em 0em 1em; padding:0em .3em 0em .3em; border-left:1px solid #CCCCCC; font:small Courier } .di { font:small Courier; } .d, .pi, .m { color:blue; } .cb { text-indent:0px; margin: 0,1em,0,1em; padding-left:.3em; font:small Courier; color:#888888; } .ci { font:small Courier; color:#888888; } pre { margin:0px; display:inline; } h5 { margin:0px 13px 0px 13px; } button#eBtnClose { position:absolute; bottom:5px; padding-left:10px; padding-right:10px; font:messagebox; } </style> <script type="text/jscript"> <xsl:comment> <![CDATA[ function f( e ) { if( e.className == "ci" ) { if ( e.children(0).innerText.indexOf("\n") > 0 ) { fix(e, "cb"); } } if( e.className == "di" ) { if( e.children(0).innerText.indexOf("\n") > 0 ) { fix(e, "db"); } } e.id = ""; } function fix( e, cl ) { e.className = cl; e.style.display = "block"; j = e.parentElement.children(0); j.className = "c"; k = j.children(0); k.style.visibility = "visible"; k.href = "javascript:void(0);"; } function ch( e ) { mark = e.children(0).children(0); if( mark.innerText == "+" ) { mark.innerText = "-"; for( var i = 1; i < e.children.length; i++ ) { e.children(i).style.display = "block"; } } else if( mark.innerText == "-" ) { mark.innerText = "+"; for( var i = 1; i < e.children.length; i++ ) { e.children(i).style.display="none"; } } } function ch2( e ) { mark = e.children(0).children(0); contents = e.children(1); if( mark.innerText == "+" ) { mark.innerText = "-"; if( contents.className == "db" || contents.className == "cb" ) { contents.style.display = "block"; } else { contents.style.display = "inline"; } } else if(mark.innerText == "-") { mark.innerText = "+"; contents.style.display = "none"; } } function cl() { e = window.event.srcElement; if( e.className != "c" ) { e = e.parentElement; if( e.className != "c" ) { return; } } e = e.parentElement; if( e.className == "e" ) { ch( e ); if( e.className == "k" ) ch2( e ); } } function ex() { } function h() { window.status=" "; } document.onclick = cl; function Finish() { self.close(); } function ESC_KeyDown() { if( 27 == event.keyCode ) { self.close(); } } ]]> </xsl:comment> </script> </head> <body onbeforeunload="window.dialogArguments.g_oXMLDlg = null;" onkeydown="ESC_KeyDown();" class="st"> <div style="overflow-y:auto;height:80%;"> <h5></h5> <hr style="color:navy;height:1px;margin:0px 13px 0px 13px;" /> <xsl:apply-templates /> </div> <button id="eBtnClose" onclick="Finish();" style="left:expression( (document.body.clientWidth - eBtnClose.offsetWidth) / 2 );"></button> </body> </html> </xsl:template> <!-- Templates for each node type follows. The output of each template has a similar structure to enable script to walk the result tree easily for handling user interaction. --> <!-- Template for the DOCTYPE declaration. No way to get the DOCTYPE, so we just put in a placeholder --> <xsl:template match="node()[nodeType()=10]"> <div class="e"> <span> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="d">&lt;!DOCTYPE <xsl:node-name/><I> (View Source for full doctype...)</I>&gt;</span> </span> </div> </xsl:template> <!-- Template for pis not handled elsewhere --> <xsl:template match="pi()"> <div class="e"> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">&lt;?</span> <span class="pi"><xsl:node-name/> <xsl:value-of/></span> <span class="m">?&gt;</span> </div> </xsl:template> <!-- Template for the XML declaration. Need a separate template because the pseudo-attributes are actually exposed as attributes instead of just element content, as in other pis --> <xsl:template match="pi('xml')"> <div class="e"> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">&lt;?</span> <span class="pi">xml <xsl:for-each select="@*"><xsl:node-name/>="<xsl:value-of/>" </xsl:for-each></span> <span class="m">?&gt;</span> </div> </xsl:template> <!-- Template for attributes not handled elsewhere --> <xsl:template match="@*" xml:space="preserve"> <span><xsl:attribute name="class"><xsl:if match="xsl:*/@*">x</xsl:if>t</xsl:attribute> <xsl:node-name/></span> <span class="m">="</span> <B><xsl:value-of/></B><span class="m">"</span> </xsl:template> <!-- Template for attributes in the xmlns or xml namespace --> <xsl:template match="@xmlns:*|@xmlns|@xml:*"> <span class="ns"> <xsl:node-name/></span> <span class="m">="</span> <B class="ns"><xsl:value-of/></B> <span class="m">"</span> </xsl:template> <!-- Template for attributes in the dt namespace --> <xsl:template match="@dt:*|@d2:*"> <span class="dt"> <xsl:node-name/></span> <span class="m">="</span> <B class="dt"><xsl:value-of/></B> <span class="m">"</span> </xsl:template> <!-- Template for text nodes --> <xsl:template match="textNode()"> <div class="e"> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="tx"><xsl:value-of/></span> </div> </xsl:template> <!-- Template for comment nodes --> <xsl:template match="comment()"> <div class="k"> <span> <a class="b" onclick="return false" onfocus="h()" STYLE="visibility:hidden">-</a> <span class="m">&lt;!--</span> </span> <span id="clean" class="ci"><PRE><xsl:value-of/></PRE></span> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">--&gt;</span> <script type="text/jscript"> f( clean ); </script> </div> </xsl:template> <!-- Template for cdata nodes --> <xsl:template match="cdata()"> <div class="k"> <span> <A class="b" onclick="return false" onfocus="h()" STYLE="visibility:hidden">-</A> <span class="m">&lt;![CDATA[</span> </span> <span id="clean" class="di"> <PRE><xsl:value-of/></PRE> </span> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">]]&gt;</span> <script type="text/jscript"> f( clean ); </script> </div> </xsl:template> <!-- Template for elements not handled elsewhere (leaf nodes) --> <xsl:template match="*"> <div class="e"> <div STYLE="margin-left:1em;text-indent:-2em"> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">&lt;</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <xsl:apply-templates select="@*"/> <span class="m"> /&gt;</span> </div> </div> </xsl:template> <!-- Template for elements with comment, pi and/or cdata children --> <xsl:template match="*[node()]"> <div class="e"> <div class="c"> <A href="#" onclick="return false" onfocus="h()" class="b">-</A> <span class="m">&lt;</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <xsl:apply-templates select="@*"/> <span class="m">&gt;</span> </div> <div> <xsl:apply-templates/> <div> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">&lt;/</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <span class="m">&gt;</span> </div> </div> </div> </xsl:template> <!-- Template for elements with only text children --> <xsl:template match="*[textNode()$and$$not$(comment()$or$pi()$or$cdata())]"> <div class="e"> <div STYLE="margin-left:1em;text-indent:-2em"> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">&lt;</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <xsl:apply-templates select="@*"/> <span class="m">&gt;</span> <span class="tx"><xsl:value-of/></span> <span class="m">&lt;/</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <span class="m">&gt;</span> </div> </div> </xsl:template> <!-- Template for elements with element children --> <xsl:template match="*[*]"> <div class="e"> <div class="c" STYLE="margin-left:1em;text-indent:-2em"> <A href="#" onclick="return false" onfocus="h()" class="b">-</A> <span class="m">&lt;</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <xsl:apply-templates select="@*"/> <span class="m">&gt;</span> </div> <div> <xsl:apply-templates/> <div> <span class="b"><xsl:entity-ref name="nbsp"/></span> <span class="m">&lt;/</span> <span><xsl:attribute name="class"><xsl:if match="xsl:*">x</xsl:if>t</xsl:attribute><xsl:node-name/></span> <span class="m">&gt;</span> </div> </div> </div> </xsl:template> </xsl:stylesheet>
<reponame>tomo3136a/hw_utils<filename>xsl/edif_014_inst_a.csv.xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:key name="vw" match="library/cell/view" use="concat(ancestor::library/@name,'-',ancestor::cell/@name,'-',@name)"/> <xsl:template match="/"> <xsl:text>page,instance,view</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:apply-templates select="edif/library/cell/view/contents/page/instance"/> </xsl:template> <xsl:template match="instance"> <xsl:variable name="vwid" select="concat(viewref/cellref/libraryref/@name,'-',viewref/cellref/@name,'-',viewref/@name)"/> <xsl:value-of select="ancestor::page/@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="$vwid"/> <xsl:text>,</xsl:text> <xsl:value-of select="key('vw',$vwid)/viewtype"/> <xsl:text>&#10;</xsl:text> </xsl:template> </xsl:stylesheet>
<gh_stars>1-10 <xsl:for-each select="nodes[@value mod 2 = 0]"> <xsl:value-of select="@value" /> </xsl:for-each>
<?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math dyn exsl xlink"> <!-- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD SVG 1.0//EN" doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd"/> <xsl:variable name="INF_H" select="$BIF_H + ceiling($BIF_H div 2)"/> <xsl:variable name="INF_W" select="($BIF_W * 2) + $BIF_GAP"/> --> <!-- ======================= DEF FUNCTIONS =================================== --> <xsl:template name="Define_IPBucket"> <xsl:for-each select="BLKDIAGRAM/IPBUCKET"> <xsl:for-each select="MODULE"> <xsl:sort data-type="text" select="@MODTYPE" order="ascending"/> <xsl:call-template name="Define_IPBucketModule"> <xsl:with-param name="iIPType" select="@MODTYPE"/> <xsl:with-param name="iIPName" select="@INSTANCE"/> </xsl:call-template> </xsl:for-each> <g id="ipbucket"> <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/> <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/> <rect x="0" y="0" rx="4" ry="4" width= "{$bucket_w_}" height="{$bucket_h_}" style="stroke-width:2; stroke:{$COL_BLACK}; fill:{$COL_IORING_LT}"/> <xsl:variable name="bkt_mods_w_" select="@MODS_W"/> <xsl:for-each select="MODULE"> <xsl:variable name="clm_" select="(( position() - 1) mod $bkt_mods_w_)"/> <xsl:variable name="row_" select="floor((position() - 1) div $bkt_mods_w_)"/> <xsl:variable name="bk_x_" select="$BLKD_MOD_BKTLANE_W + ($clm_ * ($BLKD_MOD_W + $BLKD_MOD_BUCKET_G))"/> <xsl:variable name="bk_y_" select="$BLKD_MOD_BKTLANE_H + ($row_ * ($BLKD_MOD_H + $BLKD_MOD_BUCKET_G))"/> <use x="{$bk_x_}" y="{$bk_y_}" xlink:href="#ipbktmodule_{@INSTANCE}"/> </xsl:for-each> </g> </xsl:for-each> </xsl:template> <xsl:template name="Define_UNKBucket"> <xsl:for-each select="BLKDIAGRAM/UNKBUCKET"> <g id="unkbucket"> <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/> <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + (($BLKD_MOD_H * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/> <rect x="0" y="0" rx="4" ry="4" width= "{$bucket_w_}" height="{$bucket_h_}" style="stroke-width:2; stroke:{$COL_BLACK}; fill:{$COL_BG_UNK}"/> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@IS_PROMOTED and @IS_PENALIZED)]"> <xsl:variable name="bkt_mods_w_" select="@MODS_W"/> <xsl:variable name="mod_row_" select="@BKTROW"/> <xsl:variable name="row_mods_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/BKTROW[(@INDEX = $mod_row_)]/@MODS_H"/> <!-- <xsl:message>The row module is <xsl:value-of select="@BKTROW"/></xsl:message> <xsl:message>The height of the module is <xsl:value-of select="$row_mods_h_"/></xsl:message> --> <xsl:variable name="bk_x_" select="$BLKD_MOD_BKTLANE_W + (@MODS_X * ($BLKD_MOD_W + $BLKD_MOD_BUCKET_G))"/> <xsl:variable name="bk_y_" select="$BLKD_MOD_BKTLANE_H + ($row_mods_h_ * ($BLKD_MOD_H + $BLKD_MOD_BUCKET_G))"/> <use x="{$bk_x_}" y="{$bk_y_}" xlink:href="#symbol_unkmodule_{@BKTROW}_{@MODS_X}"/> <!-- --> </xsl:for-each> </g> </xsl:for-each> </xsl:template> <xsl:template name="Define_SBSBuckets"> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET"> <xsl:variable name="busStd_" select="@BUSSTD"/> <xsl:variable name="busName_" select="@BUSNAME"/> <!-- <xsl:variable name="busStd_" select="BUSCONNS/BUSCONN/@BUSSTD"/> --> <xsl:variable name="bus_conn_w_" select="BUSCONNS/@BUSLANE_W"/> <xsl:variable name="bktColor_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="$busStd_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="bktBgColor_"> <xsl:call-template name="F_BusStd2RGB_LT"> <xsl:with-param name="iBusStd" select="$busStd_"/> </xsl:call-template> </xsl:variable> <xsl:for-each select="MODULE"> <xsl:sort data-type="text" select="@MODTYPE" order="ascending"/> <xsl:call-template name="Define_SBSBucketModule"> <xsl:with-param name="iBifType" select="$busStd_"/> <xsl:with-param name="iIPType" select="@MODTYPE"/> <xsl:with-param name="iIPName" select="@INSTANCE"/> </xsl:call-template> </xsl:for-each> <g id="sbsbucket_{$busName_}"> <xsl:variable name="bucket_w_" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * @MODS_W) + ($BLKD_MOD_BUCKET_G * (@MODS_W - 1))))"/> <xsl:variable name="bucket_h_" select="(($BLKD_MOD_BKTLANE_H * 2) + ((($BLKD_MOD_H + $BLKD_BIFC_H) * @MODS_H) + ($BLKD_MOD_BUCKET_G * (@MODS_H - 1))))"/> <rect x="0" y="0" rx="4" ry="4" width= "{$bucket_w_}" height="{$bucket_h_}" style="stroke-width:2; stroke:{$bktColor_}; fill:{$bktBgColor_}"/> <xsl:variable name="bkt_mods_w_" select="@MODS_W"/> <xsl:for-each select="MODULE"> <xsl:sort data-type="text" select="@MODTYPE" order="ascending"/> <xsl:variable name="clm_" select="(( position() - 1) mod $bkt_mods_w_)"/> <xsl:variable name="row_" select="floor((position() - 1) div $bkt_mods_w_)"/> <xsl:variable name="bk_x_" select="$BLKD_MOD_BKTLANE_W + ($clm_ * ($BLKD_MOD_W + $BLKD_MOD_BUCKET_G))"/> <xsl:variable name="bk_y_" select="$BLKD_MOD_BKTLANE_H + ($row_ * ($BLKD_MOD_H + $BLKD_BIFC_H + $BLKD_MOD_BUCKET_G))"/> <!-- Lay out the module in the bucket --> <use x="{$bk_x_}" y="{$bk_y_}" xlink:href="#sbsbktmodule_{@INSTANCE}"/> <!-- Add its connection to the piece shared bus --> <xsl:variable name="h_bus_y_" select="$bk_y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/> <!-- <xsl:variable name="h_bus_x_" select="$bk_x_ - ($BLKD_MOD_BUCKET_G + ceiling($BLKD_MOD_W div 2))"/> --> <xsl:variable name="h_bus_x_"> <xsl:choose> <xsl:when test="($clm_ = '0')">0</xsl:when> <xsl:when test="not($clm_ = '0')"> <xsl:value-of select="$bk_x_ - ($BLKD_MOD_BUCKET_G + ceiling($BLKD_MOD_W div 2))"/> </xsl:when> </xsl:choose> </xsl:variable> <!-- <xsl:variable name="h_bus_y_" select="$bk_y_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W)"/> <xsl:message>h bus x <xsl:value-of select="$h_bus_x_"/></xsl:message> <xsl:message>h bus y <xsl:value-of select="$h_bus_y_"/></xsl:message> --> <xsl:variable name="h_bus_height_" select="$BLKD_P2P_BUS_W"/> <xsl:variable name="h_bus_width_" select="($bk_x_ - $h_bus_x_ + ceiling($BLKD_MOD_W div 2))"/> <rect x="{$h_bus_x_}" y="{$h_bus_y_}" width= "{$h_bus_width_}" height="{$BLKD_P2P_BUS_W}" style="fill:{$bktColor_}"/> </xsl:for-each> <xsl:variable name="num_sbsbktmods_" select="count(MODULE)"/> <xsl:variable name="num_sbsbktrows_" select="ceiling($num_sbsbktmods_ div $BLKD_BKT_MODS_PER_ROW)"/> <!-- If there is more than one row, connect the rows with a vertical bar --> <xsl:if test="($num_sbsbktrows_ &gt; 1)"> <xsl:variable name="v_bus_x_" select="$BLKD_MOD_BKTLANE_W + ($BLKD_MOD_W + $BLKD_MOD_BUCKET_G)"/> <xsl:variable name="bkt_top_" select="$BLKD_MOD_BKTLANE_H + (0 * ($BLKD_MOD_H + $BLKD_BIFC_H + $BLKD_MOD_BUCKET_G))"/> <xsl:variable name="bkt_bot_" select="$BLKD_MOD_BKTLANE_H + (($num_sbsbktrows_ - 1) * ($BLKD_MOD_H + $BLKD_BIFC_H + $BLKD_MOD_BUCKET_G))"/> <xsl:variable name="v_bus_y_top_" select="$bkt_top_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/> <xsl:variable name="v_bus_y_bot_" select="$bkt_bot_ + ceiling($BLKD_BIFC_H div 2) - ceiling($BLKD_P2P_BUS_W div 2)"/> <xsl:variable name="v_bus_width_" select="$BLKD_P2P_BUS_W"/> <xsl:variable name="v_bus_height_" select="($v_bus_y_bot_ - $v_bus_y_top_)"/> <rect x="0" y="{$v_bus_y_top_}" width= "{$v_bus_width_}" height="{$v_bus_height_}" style="fill:{$bktColor_}"/> </xsl:if> </g> </xsl:for-each> </xsl:template> <xsl:template name="Define_SBSBucketModule"> <xsl:param name="iBusStd" select="'PLB46'"/> <xsl:param name="iIPName" select="'_ipType_'"/> <xsl:param name="iIPType" select="'_ipName_'"/> <!-- <xsl:message>The IPType is <xsl:value-of select="$iIPType"/> </xsl:message> --> <xsl:variable name="bif_y_"> <xsl:value-of select="$BLKD_MOD_LANE_H + $BLKD_BIFC_H"/> </xsl:variable> <xsl:variable name="label_y_"> <xsl:value-of select="$BLKD_MOD_LANE_H + $BLKD_BIF_H + $BLKD_BIFC_H + $BLKD_MOD_BIF_GAP_V"/> </xsl:variable> <xsl:variable name="modBgColor_"> <xsl:choose> <xsl:when test="$iIPType = 'mpmc'"><xsl:value-of select="$COL_MPMC_BG"/></xsl:when> <xsl:otherwise><xsl:value-of select="$COL_BG"/></xsl:otherwise> </xsl:choose> </xsl:variable> <g id="sbsbktmodule_{$iIPName}"> <rect x="0" y="{$BLKD_BIFC_H}" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$BLKD_MOD_H}" style="fill:{$modBgColor_}; stroke:{$COL_WHITE}; stroke-width:2"/> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_MOD_LABEL_H}" style="fill:{$COL_WHITE}; stroke:none;"/> <xsl:if test="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/@GROUP"> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) - 2}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_BIF_H}" style="fill:{$COL_IORING_LT}; stroke:none;"/> <!-- <text class="ioplblgrp" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12}"> <xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/@GROUP"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12)"/> <xsl:with-param name="iText" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/@GROUP"/> <xsl:with-param name="iClass" select="'iogrp_label'"/> </xsl:call-template> </xsl:if> <!-- <text class="bciptype" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 8}"> <xsl:value-of select="$iIPType"/> </text> <text class="bciplabel" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 16}"> <xsl:value-of select="$iIPName"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 8)"/> <xsl:with-param name="iText" select="$iIPType"/> <xsl:with-param name="iClass" select="'bc_iptype'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 18)"/> <xsl:with-param name="iText" select="$iIPName"/> <xsl:with-param name="iClass" select="'bc_ipinst'"/> </xsl:call-template> <xsl:for-each select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/BUSINTERFACE[(@IS_INMHS = 'TRUE')]"> <xsl:variable name="bifBusStd_"> <xsl:choose> <xsl:when test="@BUSSTD"> <xsl:value-of select="@BUSSTD"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'USER'"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bifName_"> <xsl:choose> <xsl:when test="string-length(@NAME) &lt;= 5"> <xsl:value-of select="@NAME"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring(@NAME,0,5)"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_x_" select="ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_BIF_W div 2)"/> <!-- Draw the BIF --> <use x="{$bif_x_}" y="{$bif_y_}" xlink:href="#{$bifBusStd_}_BifLabel"/> <!-- Draw the BIF connection --> <use x="{$bif_x_ + ceiling($BLKD_BIF_W div 2) - ceiling($BLKD_BIFC_W div 2)}" y="{$bif_y_ - $BLKD_BIFC_H - $BLKD_MOD_LANE_H}" xlink:href="#{$bifBusStd_}_busconn_{@TYPE}"/> <!-- <text class="bif_label" x="{$bif_x_ + ceiling($BLKD_BIF_W div 2)}" y="{$bif_y_ + ceiling($BLKD_BIF_H div 2) + 3}"> <xsl:value-of select="$bifName_"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($bif_x_ + ceiling($BLKD_BIF_W div 2))"/> <xsl:with-param name="iY" select="($bif_y_ + ceiling($BLKD_BIF_H div 2) + 3)"/> <xsl:with-param name="iText" select="$bifName_"/> <xsl:with-param name="iClass" select="'bif_label'"/> </xsl:call-template> </xsl:for-each> <xsl:if test="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/INTERRUPTINFO[(@TYPE = 'CONTROLLER')]"> <xsl:variable name="intcIdx_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/INTERRUPTINFO[(@TYPE = 'CONTROLLER')]/@INTC_INDEX"/> <xsl:variable name="intrColor_"> <xsl:call-template name="F_IntcIdx2RGB"> <xsl:with-param name="iIntcIdx" select="$intcIdx_"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="F_draw_InterruptCntrl"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="iIntr_Y" select="3 + $BLKD_BIFC_H"/> <xsl:with-param name="iIntr_COL" select="$intrColor_"/> <xsl:with-param name="iIntr_IDX" select="$intcIdx_"/> </xsl:call-template> </xsl:if> <xsl:for-each select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/INTERRUPTINFO[(@TYPE = 'SOURCE')]/TARGET"> <!-- <xsl:variable name="intcIdx_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE=$iIPName)]/INTERRUPTINFO[(@TYPE = 'SOURCE')]/@INTC_INDEX"/> --> <xsl:variable name="intrColor_"> <xsl:call-template name="F_IntcIdx2RGB"> <xsl:with-param name="iIntcIdx" select="@INTC_INDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="F_draw_InterruptSource"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - $BLKD_INTR_W)"/> <xsl:with-param name="iIntr_Y" select="((position() - 1) * (ceiling($BLKD_INTR_H div 2) + 3)) + $BLKD_BIFC_H"/> <xsl:with-param name="iIntr_COL" select="$intrColor_"/> <xsl:with-param name="iIntr_PRI" select="@PRIORITY"/> <xsl:with-param name="iIntr_IDX" select="@INTC_INDEX"/> </xsl:call-template> </xsl:for-each> </g> </xsl:template> <xsl:template name="Define_IPBucketModule"> <xsl:param name="iIPType" select="'_ip_type_'"/> <xsl:param name="iIPName" select="'_ip_name_'"/> <xsl:variable name="bif_y_"> <xsl:value-of select="$BLKD_MOD_LANE_H"/> </xsl:variable> <xsl:variable name="label_y_"> <xsl:value-of select="(ceiling($BLKD_MOD_H div 2) - ceiling($BLKD_MOD_LABEL_H div 2))"/> </xsl:variable> <g id="ipbktmodule_{$iIPName}"> <rect x="0" y="0" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$BLKD_MOD_H}" style="fill:{$COL_BG}; stroke:{$COL_BLACK}; stroke-width:2"/> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_MOD_LABEL_H}" style="fill:{$COL_WHITE}; stroke:none;"/> <!-- y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) - 4}" y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) + 4}" --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 8)"/> <xsl:with-param name="iText" select="$iIPType"/> <xsl:with-param name="iClass" select="'bc_iptype'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 20)"/> <xsl:with-param name="iText" select="$iIPName"/> <xsl:with-param name="iClass" select="'bc_ipinst'"/> </xsl:call-template> <!-- <text class="bc_iptype" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 8}"> <xsl:value-of select="$iIPType"/> </text> <text class="bc_ipinst" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 16}"> <xsl:value-of select="$iIPName"/> </text> --> <xsl:if test="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/@GROUP"> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) - 2}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_BIF_H}" style="fill:{$COL_IORING_LT}; stroke:none;"/> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12)"/> <xsl:with-param name="iText" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/@GROUP"/> <xsl:with-param name="iClass" select="'iogrp_label'"/> </xsl:call-template> <!-- <text class="iogrp_label" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12}"> <xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/@GROUP"/> </text> --> </xsl:if> <xsl:for-each select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iIPName)]/INTERRUPTINFO[(@TYPE = 'SOURCE')]"> <xsl:variable name="intrColor_"> <xsl:call-template name="F_IntcIdx2RGB"> <xsl:with-param name="iIntcIdx" select="@INTC_INDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="F_draw_InterruptSource"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - $BLKD_INTR_W)"/> <xsl:with-param name="iIntr_Y" select="((position() - 1) * (ceiling($BLKD_INTR_H div 2) + 3))"/> <xsl:with-param name="iIntr_COL" select="$intrColor_"/> <xsl:with-param name="iIntr_PRI" select="@PRIORITY"/> <xsl:with-param name="iIntr_IDX" select="@INTC_INDEX"/> </xsl:call-template> </xsl:for-each> </g> </xsl:template> <xsl:template name="Define_Peripheral"> <!-- when the module is oriented normal its label goes above the bifs when the module is oriented rot180, (part of a processor memory controller for example) its label goes below the bifs --> <xsl:param name="iModVori" select="'normal'"/> <xsl:param name="iModInst" select="'_instance_'"/> <xsl:param name="iModType" select="'_modtype_'"/> <xsl:param name="iUnkInst" select="'_unknown_'"/> <xsl:param name="iHorizIdx" select="'_unknown_'"/> <xsl:param name="iVertiIdx" select="'_unknown_'"/> <!-- <xsl:message>Stack Y <xsl:value-of select="$cstkMods_Y"/></xsl:message> <xsl:message>Stack Index Y <xsl:value-of select="$cstkIndex"/></xsl:message> --> <xsl:variable name="modName_"> <xsl:choose> <xsl:when test="$iUnkInst = '_unknown_'"> <xsl:value-of select="$iModInst"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$iUnkInst"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="modSymbolName_"> <xsl:choose> <xsl:when test="(not($iHorizIdx = '_unknown_') and not($iVertiIdx = '_unknown_'))"> <xsl:call-template name="F_generate_Stack_SymbolName"> <xsl:with-param name="iHorizIdx" select="$iHorizIdx"/> <xsl:with-param name="iVertiIdx" select="$iVertiIdx"/> </xsl:call-template> </xsl:when> <xsl:otherwise>symbol_<xsl:value-of select="$modName_"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="modTypeName_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@MODTYPE"/> <!-- <xsl:message>The symbol type of the module is <xsl:value-of select="$modTypeName_"/></xsl:message> <xsl:message>The symbol name of the module is <xsl:value-of select="$modSymbolName_"/></xsl:message> --> <xsl:variable name="bifs_h_"> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H) and not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H)">0</xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H)"> <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H"/> </xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H)"> <xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE[(@INSTANCE = $iModInst)]/@BIFS_H"/> </xsl:if> </xsl:variable> <xsl:variable name="label_y_"> <xsl:choose> <xsl:when test="$iModVori = 'rot180'"> <xsl:value-of select="($BLKD_MOD_LANE_H + (($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * $bifs_h_))"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$BLKD_MOD_LANE_H"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_dy_"> <xsl:choose> <xsl:when test="$iModVori = 'rot180'"> <xsl:value-of select="$BLKD_MOD_LANE_H"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_H + $BLKD_MOD_BIF_GAP_V)"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="peri_stroke_col_"> <xsl:choose> <xsl:when test="((@MODCLASS = 'MASTER_SLAVE') or (@MODCLASS = 'MONITOR')) and BUSCONNS/BUSCONN"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="BUSCONNS/BUSCONN/@BUSSTD"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$COL_WHITE"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="modHeight_"> <xsl:call-template name="F_Calc_PeriShape_Height"> <xsl:with-param name="iShapeInst" select="$modName_"/> </xsl:call-template> </xsl:variable> <g id="{$modSymbolName_}"> <xsl:if test="$modTypeName_ = 'mpmc'"> <rect x="0" y="0" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$modHeight_}" style="fill:{$COL_MPMC_BG}; stroke:{$peri_stroke_col_}; stroke-width:2"/> </xsl:if> <xsl:if test="not($modTypeName_ = 'mpmc')"> <rect x="0" y="0" rx="6" ry="6" width = "{$BLKD_MOD_W}" height= "{$modHeight_}" style="fill:{$COL_BG}; stroke:{$peri_stroke_col_}; stroke-width:2"/> </xsl:if> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_MOD_LABEL_H}" style="fill:{$COL_WHITE}; stroke:none;"/> <!-- y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) - 4}"> y="{$label_y_ + ceiling($BLKD_MOD_LABEL_H div 2) + 4}"> --> <!-- <text class="bc_iptype" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 8}"> <xsl:value-of select="$iModType"/> </text> <text class="bc_ipinst" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + 16}"> <xsl:value-of select="$iModInst"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 8)"/> <xsl:with-param name="iText" select="$iModType"/> <xsl:with-param name="iClass" select="'bc_iptype'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 16)"/> <xsl:with-param name="iText" select="$iModInst"/> <xsl:with-param name="iClass" select="'bc_ipinst'"/> </xsl:call-template> <xsl:if test="$G_ROOT/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$iModInst]/@GROUP"> <rect x="{ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_MOD_LABEL_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) - 2}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_BIF_H}" style="fill:{$COL_IORING_LT}; stroke:none;"/> <!-- <text class="iogrp_label" x="{ceiling($BLKD_MOD_W div 2)}" y="{$label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12}"> <xsl:value-of select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$iModInst]/@GROUP"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($BLKD_MOD_W div 2)"/> <xsl:with-param name="iY" select="($label_y_ + $BLKD_BIF_H + ceiling($BLKD_BIF_H div 3) + 12)"/> <xsl:with-param name="iText" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@GROUP"/> <xsl:with-param name="iClass" select="'iogrp_label'"/> </xsl:call-template> </xsl:if> <xsl:for-each select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/BUSINTERFACE[(@BIF_X and @BIF_Y and not(@BUSNAME = '__NOC__'))]"> <xsl:variable name="bifBusStd_"> <xsl:choose> <xsl:when test="@BUSSTD"> <xsl:value-of select="@BUSSTD"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="'TRS'"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_y_"> <xsl:value-of select="(($BLKD_BIF_H + $BLKD_MOD_BIF_GAP_V) * @BIF_Y)"/> </xsl:variable> <xsl:variable name="bif_buscol_"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="$bifBusStd_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="bifName_"> <xsl:choose> <xsl:when test="not(@NAME)">'UNK'</xsl:when> <xsl:when test="string-length(@NAME) &lt;= 5"> <xsl:value-of select="@NAME"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring(@NAME,0,5)"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="bif_x_" > <xsl:if test="not(@ORIENTED='CENTER')"> <xsl:value-of select="(($BLKD_BIF_W * @BIF_X) + ($BLKD_MOD_BIF_GAP_H * @BIF_X) + ($BLKD_MOD_LANE_W * 1))"/> </xsl:if> <xsl:if test="(@ORIENTED='CENTER')"> <xsl:value-of select="ceiling($BLKD_MOD_W div 2) - ceiling($BLKD_BIF_W div 2)"/> </xsl:if> </xsl:variable> <xsl:if test="not(@IS_INTCONN)"> <xsl:variable name="horz_line_y_" select="($bif_y_ + $bif_dy_ + ceiling($BLKD_BIFC_H div 2))"/> <xsl:variable name="horz_line_x1_"> <xsl:choose> <xsl:when test="@BIF_X = '0'">0</xsl:when> <xsl:otherwise><xsl:value-of select="($BLKD_MOD_W - $BLKD_MOD_LANE_W)"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="horz_line_x2_"> <xsl:choose> <xsl:when test="@BIF_X = '0'"><xsl:value-of select="$BLKD_MOD_LANE_W"/></xsl:when> <xsl:otherwise><xsl:value-of select="$BLKD_MOD_W + 1"/></xsl:otherwise> </xsl:choose> </xsl:variable> <line x1="{$horz_line_x1_}" y1="{$horz_line_y_ - 2}" x2="{$horz_line_x2_}" y2="{$horz_line_y_ - 2}" style="stroke:{$bif_buscol_};stroke-width:1"/> </xsl:if> <use x="{$bif_x_}" y="{$bif_y_ + $bif_dy_}" xlink:href="#{$bifBusStd_}_BifLabel"/> <!-- <text class="bif_label" x="{$bif_x_ + ceiling($BLKD_BIF_W div 2)}" y="{$bif_y_ + $bif_dy_ + ceiling($BLKD_BIF_H div 2) + 3}"> <xsl:value-of select="$bifName_"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($bif_x_ + ceiling($BLKD_BIF_W div 2))"/> <xsl:with-param name="iY" select="($bif_y_ + $bif_dy_ + ceiling($BLKD_BIF_H div 2) + 3)"/> <xsl:with-param name="iText" select="$bifName_"/> <xsl:with-param name="iClass" select="'bif_label'"/> </xsl:call-template> </xsl:for-each> <!-- <xsl:if test="@INTC_INDEX"> <xsl:variable name="intrColor_"> <xsl:call-template name="F_IntcIdx2RGB"> <xsl:with-param name="intcIdx" select="@INTC_INDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="F_draw_InterruptCntrl"> <xsl:with-param name="intr_col" select="$intrColor_"/> <xsl:with-param name="intr_x" select="($BLKD_MOD_W - ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="intr_y" select="3"/> <xsl:with-param name="intr_idx" select="@INTC_INDEX"/> </xsl:call-template> </xsl:if> --> <xsl:if test="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@INTC_INDEX"> <xsl:variable name="intrColor_"> <xsl:call-template name="F_IntcIdx2RGB"> <xsl:with-param name="iIntcIdx" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@INTC_INDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="F_draw_InterruptCntrl"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="iIntr_Y" select="3"/> <xsl:with-param name="iIntr_COL" select="$intrColor_"/> <xsl:with-param name="iIntr_IDX" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/@INTC_INDEX"/> </xsl:call-template> </xsl:if> <xsl:for-each select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $iModInst)]/INTERRUPTINFO[@TYPE ='TARGET']"> <xsl:variable name="intrColor_"> <xsl:call-template name="F_IntcIdx2RGB"> <xsl:with-param name="iIntcIdx" select="@INTC_INDEX"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="F_draw_InterruptSource"> <xsl:with-param name="iIntr_X" select="($BLKD_MOD_W - $BLKD_INTR_W)"/> <xsl:with-param name="iIntr_Y" select="((position() - 1) * (ceiling($BLKD_INTR_H div 2) + 3))"/> <xsl:with-param name="iIntr_COL" select="$intrColor_"/> <xsl:with-param name="iIntr_PRI" select="@PRIORITY"/> <xsl:with-param name="iIntr_IDX" select="@INTC_INDEX"/> </xsl:call-template> </xsl:for-each> </g> </xsl:template> <xsl:template name="Define_MemoryUnit"> <xsl:param name="iShapeId" select="1000"/> <xsl:variable name="horiz_idx_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@STACK_HORIZ_INDEX"/> <xsl:variable name="is_multistk_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@IS_MULTISTK"/> <xsl:choose> <xsl:when test="(($is_multistk_ = 'TRUE') or ($G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@STACK_HORIZ_INDEX = $horiz_idx_)]))"> <xsl:call-template name="Define_Processor_MemoryUnit"> <xsl:with-param name="iShapeId" select="$iShapeId"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="Define_StandAlone_MemoryUnit"> <xsl:with-param name="iShapeId" select="$iShapeId"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="Define_Processor_MemoryUnit"> <xsl:param name="iShapeId" select="1000"/> <!-- <xsl:param name="cstkIndex" select="'_processor_'"/> --> <xsl:variable name="mods_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@MODS_H"/> <xsl:variable name="mods_w_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/@MODS_W"/> <xsl:variable name="memW_" select="($BLKD_MOD_W * $mods_w_)"/> <xsl:variable name="memH_" select="($BLKD_MOD_H * $mods_h_)"/> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]"> <!-- first define its symbols as individual modules --> <xsl:for-each select="MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInst_)]/@MODTYPE"/> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'normal'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select="MODULE[@MODCLASS='MEMORY_CNTLR']"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInst_)]/@MODTYPE"/> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'rot180'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> </xsl:for-each> <!-- --> <xsl:variable name="symbol_name_"> <xsl:call-template name="F_generate_Stack_SymbolName"> <xsl:with-param name="iHorizIdx" select="@STACK_HORIZ_INDEX"/> <xsl:with-param name="iVertiIdx" select="@SHAPE_VERTI_INDEX"/> </xsl:call-template> </xsl:variable> <!-- <xsl:message>The mp stack name is <xsl:value-of select="$mp_stack_name_"/></xsl:message> --> <g id="{$symbol_name_}"> <rect x="0" y="0" rx="6" ry="6" width = "{$memW_}" height= "{$memH_}" style="fill:{$COL_BG}; stroke:{$COL_WHITE}; stroke-width:2"/> <!-- Draw the memory block--> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[((@MODCLASS='MEMORY_CNTLR') and (@ORIENTED = 'WEST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="0" y="{$BLKD_MOD_H}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[((@MODCLASS='MEMORY_CNTLR') and (@ORIENTED = 'EAST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{$BLKD_MOD_W}" y="{$BLKD_MOD_H}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[((@MODCLASS='MEMORY_CNTLR') and (@ORIENTED = 'CENTER'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="{$BLKD_MOD_H}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> </g> </xsl:template> <xsl:template name="Define_StandAlone_MemoryUnit"> <xsl:param name="iShapeId" select="0"/> <xsl:variable name="mods_h_" select="@MODS_H"/> <xsl:variable name="mods_w_" select="@MODS_W"/> <xsl:variable name="memcName_" select="MODULE[not(@MODCLASS = 'MEMORY')]/@INSTANCE"/> <xsl:variable name="memcBusStd_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE/BUSCONNLANE[(BUSCONN[(@INSTANCE = $memcName_)])]/@BUSSTD"/> <!-- <xsl:variable name="memcBusStd_" select="/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE/BUSCONNLANE/@BUSSTD"/> <xsl:variable name="memcBusStd_" select="/EDKSYSTEM/BCLANESPACES/BCLANESPACE/BUSCONNLANE[(BUSCONN[(@INSTANCE)])]/@BUSSTD"/> <xsl:message>Memory cntlr name <xsl:value-of select="$memcName_"/></xsl:message> <xsl:message>Memory cntlr name <xsl:value-of select="$memcName_"/></xsl:message> <xsl:message>Memory cntlr busstd <xsl:value-of select="$memcBusStd_"/></xsl:message> --> <xsl:variable name="peri_col_"> <xsl:choose> <xsl:when test="$mods_w_ &gt; 1"> <xsl:value-of select="$COL_BG"/> </xsl:when> <xsl:when test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BCLANESPACES/BCLANESPACE/BUSCONNLANE[(BUSCONN[(@INSTANCE = $memcName_)])]/@BUSSTD"> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="$memcBusStd_"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="F_BusStd2RGB"> <xsl:with-param name="iBusStd" select="'TRS'"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <!-- first define its symbols as individual modules --> <xsl:for-each select="MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInst_)]/@MODTYPE"/> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'rot180'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select="MODULE[not(@MODCLASS='MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <xsl:variable name="modType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[(@INSTANCE = $modInst_)]/@MODTYPE"/> <!-- <xsl:message>Memory cntlr inst <xsl:value-of select="$modInst_"/></xsl:message> --> <xsl:call-template name="Define_Peripheral"> <xsl:with-param name="iModVori" select="'normal'"/> <xsl:with-param name="iModInst" select="$modInst_"/> <xsl:with-param name="iModType" select="$modType_"/> </xsl:call-template> </xsl:for-each> <xsl:variable name="memW_" select="($BLKD_MOD_W * $mods_w_)"/> <xsl:variable name="memH_" select="($BLKD_MOD_H * $mods_h_)"/> <xsl:variable name="symbol_name_"> <xsl:call-template name="F_generate_Stack_SymbolName"> <xsl:with-param name="iHorizIdx" select="@STACK_HORIZ_INDEX"/> <xsl:with-param name="iVertiIdx" select="@SHAPE_VERTI_INDEX"/> </xsl:call-template> </xsl:variable> <g id="{$symbol_name_}"> <rect x="0" y="0" rx="6" ry="6" width = "{$memW_ + 4}" height= "{$memH_ + 4}" style="fill:{$peri_col_}; stroke:{$peri_col_}; stroke-width:2"/> <!-- Draw the memory block--> <xsl:choose> <xsl:when test="$mods_w_ = 1"> <xsl:for-each select="MODULE[(@MODCLASS='MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="2" y="{$BLKD_MOD_H + 2}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <!-- Draw the memory controllers--> <xsl:for-each select="MODULE[not(@MODCLASS='MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="2" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> </xsl:when> <xsl:when test="$mods_w_ &gt; 1"> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY')]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="{$BLKD_MOD_H + 2}" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(not(@MODCLASS='MEMORY') and (@ORIENTED = 'WEST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="0" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(not(@MODCLASS='MEMORY') and (@ORIENTED = 'EAST'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{$BLKD_MOD_W}" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(not(@MODCLASS='MEMORY') and (@ORIENTED = 'CENTER'))]"> <xsl:variable name="modInst_" select="@INSTANCE"/> <use x="{ceiling($memW_ div 2) - ($BLKD_MOD_W div 2)}" y="0" xlink:href="#symbol_{$modInst_}"/> </xsl:for-each> </xsl:when> </xsl:choose> </g> </xsl:template> <xsl:template name="Define_StandAlone_MPMC"> <!-- <xsl:param name="drawarea_w" select="500"/> <xsl:param name="drawarea_h" select="500"/> --> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE"> <xsl:variable name="mpmcInst_" select="@INSTANCE"/> <xsl:variable name="mpmcType_" select="$G_ROOT/EDKSYSTEM/MODULES/MODULE[@INSTANCE=$mpmcInst_]/@MODTYPE"/> <!-- <xsl:message>Drawing instance <xsl:value-of select="$mpmcInst_"/></xsl:message> --> <xsl:variable name="mpmc_w_" select="($G_Total_DrawArea_W - ($BLKD_INNER_GAP * 2))"/> <xsl:variable name="label_y_" select="ceiling($BLKD_MPMC_MOD_H div 2) - ceiling($BLKD_MOD_LABEL_H div 2)"/> <g id="mpmcmodule_{$mpmcInst_}"> <rect x="0" y="0" width = "{$mpmc_w_}" height= "{$BLKD_MPMC_MOD_H}" style="fill:{$COL_MPMC_BG}; stroke:{$COL_BLACK}; stroke-width:2"/> <rect x="{$BLKD_MOD_LANE_H}" y="{$label_y_}" rx="3" ry="3" width= "{$BLKD_MOD_LABEL_W}" height="{$BLKD_MOD_LABEL_H}" style="fill:{$COL_WHITE}; stroke:none;"/> <!-- <text class="bc_iptype" x="{ceiling(($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_W) div 2)}" y="{$label_y_ + 8}"> <xsl:value-of select="$mpmcType_"/> </text> <text class="bc_ipinst" x="{ceiling(($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_W) div 2)}" y="{$label_y_ + 16}"> <xsl:value-of select="$mpmcInst_"/> </text> <text class="mpmc_title" x="{ceiling($mpmc_w_ div 2)}" y="{$label_y_ + 16}">MPMC Module Interface</text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(ceiling(($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_W) div 2))"/> <xsl:with-param name="iY" select="($label_y_ + 8)"/> <xsl:with-param name="iText" select="$mpmcType_"/> <xsl:with-param name="iClass" select="'bc_iptype'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="(ceiling(($BLKD_MOD_LANE_H + $BLKD_MOD_LABEL_W) div 2))"/> <xsl:with-param name="iY" select="($label_y_ + 16)"/> <xsl:with-param name="iText" select="$mpmcInst_"/> <xsl:with-param name="iClass" select="'bc_ipinst'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="ceiling($mpmc_w_ div 2)"/> <xsl:with-param name="iY" select="($label_y_ + 16)"/> <xsl:with-param name="iText" select="'MPMC Module Interface'"/> <xsl:with-param name="iClass" select="'mpmc_title'"/> </xsl:call-template> </g> </xsl:for-each> </xsl:template> <!-- ======================= END DEF FUNCTIONS ============================ --> <!-- ======================= UTILITY FUNCTIONS ============================ --> <xsl:template name="F_draw_InterruptSource"> <xsl:param name="iIntr_X" select="0"/> <xsl:param name="iIntr_Y" select="0"/> <xsl:param name="iIntr_PRI" select="0"/> <xsl:param name="iIntr_IDX" select="0"/> <xsl:param name="iIntr_COL" select="$COL_INTR_0"/> <rect x="{$iIntr_X}" y="{$iIntr_Y}" rx="3" ry="3" width= "{$BLKD_INTR_W}" height="{ceiling($BLKD_INTR_H div 2)}" style="fill:{$iIntr_COL}; stroke:none; stroke-width:1"/> <line x1="{$iIntr_X + ceiling($BLKD_INTR_W div 2)}" y1="{$iIntr_Y}" x2="{$iIntr_X + ceiling($BLKD_INTR_W div 2)}" y2="{$iIntr_Y + ceiling($BLKD_INTR_H div 2)}" style="stroke:{$COL_BLACK};stroke-width:1"/> <xsl:variable name="txt_ofs_"> <xsl:if test="($iIntr_PRI &gt; 9)">4.5</xsl:if> <xsl:if test="not($iIntr_PRI &gt; 9)">0</xsl:if> </xsl:variable> <!-- <text class="intrsymbol" x="{$iIntr_X + 2 - $txt_ofs_}" y="{$iIntr_Y + 8}"> <xsl:value-of select="$iIntr_PRI"/> </text> <text class="intrsymbol" x="{$iIntr_X + 2 + ceiling($BLKD_INTR_W div 2)}" y="{$iIntr_Y + 8}"> <xsl:value-of select="$iIntr_IDX"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($iIntr_X + 2 - $txt_ofs_)"/> <xsl:with-param name="iY" select="($iIntr_Y + 8)"/> <xsl:with-param name="iText" select="$iIntr_PRI"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($iIntr_X + 2 + ceiling($BLKD_INTR_W div 2))"/> <xsl:with-param name="iY" select="($iIntr_Y + 8)"/> <xsl:with-param name="iText" select="$iIntr_IDX"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> </xsl:template> <xsl:template name="F_draw_InterruptCntrl"> <xsl:param name="iIntr_X" select="0"/> <xsl:param name="iIntr_Y" select="0"/> <xsl:param name="iIntr_IDX" select="0"/> <xsl:param name="iIntr_COL" select="$COL_INTR_0"/> <rect x="{$iIntr_X}" y="{$iIntr_Y}" rx="3" ry="3" width= "{ceiling($BLKD_INTR_W div 2)}" height="{$BLKD_INTR_H}" style="fill:{$iIntr_COL}; stroke:none; stroke-width:1"/> <line x1="{$iIntr_X}" y1="{$iIntr_Y + ceiling($BLKD_INTR_H div 4)}" x2="{$iIntr_X + ceiling($BLKD_INTR_W div 2)}" y2="{$iIntr_Y + ceiling($BLKD_INTR_H div 4)}" style="stroke:{$COL_BLACK};stroke-width:2"/> <!-- <text class="intrsymbol" x="{$iIntr_X + 2}" y="{$iIntr_Y + 8 + ceiling($BLKD_INTR_H div 2)}"> <xsl:value-of select="$iIntr_IDX"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($iIntr_X + 2)"/> <xsl:with-param name="iY" select="($iIntr_Y + 8 + ceiling($BLKD_INTR_H div 2))"/> <xsl:with-param name="iText" select="$iIntr_IDX"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> </xsl:template> <xsl:template name="F_draw_InterruptedProc"> <xsl:param name="iIntr_X" select="0"/> <xsl:param name="iIntr_Y" select="0"/> <xsl:param name="iIntr_IDX" select="0"/> <xsl:param name="iIntr_COL" select="$COL_INTR_0"/> <rect x="{$iIntr_X}" y="{$iIntr_Y}" rx="3" ry="3" width= "{ceiling($BLKD_INTR_W div 2)}" height="{$BLKD_INTR_H}" style="fill:{$iIntr_COL}; stroke:none; stroke-width:1"/> <line x1="{$iIntr_X}" y1="{$iIntr_Y + ceiling($BLKD_INTR_H div 4) - 2}" x2="{$iIntr_X + ceiling($BLKD_INTR_W div 2)}" y2="{$iIntr_Y + ceiling($BLKD_INTR_H div 4) - 2}" style="stroke:{$COL_BLACK};stroke-width:1"/> <line x1="{$iIntr_X}" y1="{$iIntr_Y + ceiling($BLKD_INTR_H div 4) + 2}" x2="{$iIntr_X + ceiling($BLKD_INTR_W div 2)}" y2="{$iIntr_Y + ceiling($BLKD_INTR_H div 4) + 2}" style="stroke:{$COL_BLACK};stroke-width:1"/> <!-- <text class="intrsymbol" x="{$iIntr_X + 2}" y="{$iIntr_Y + 8 + ceiling($BLKD_INTR_H div 2)}"> <xsl:value-of select="$iIntr_IDX"/> </text> --> <xsl:call-template name="F_WriteText"> <xsl:with-param name="iX" select="($iIntr_X + 2)"/> <xsl:with-param name="iY" select="($iIntr_Y + 8 + ceiling($BLKD_INTR_H div 2))"/> <xsl:with-param name="iText" select="$iIntr_IDX"/> <xsl:with-param name="iClass" select="'intr_symbol'"/> </xsl:call-template> </xsl:template> <xsl:template name="F_Calc_CStackShapesAbv_Height"> <xsl:param name="iCStackIndex" select="100"/> <xsl:param name="iCStackMods_Y" select="1000"/> <!-- <xsl:message>Stack Index <xsl:value-of select="$cstackIndex"/></xsl:message> <xsl:message>Stack Y <xsl:value-of select="$cstackModY"/></xsl:message> --> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@CSTACK_INDEX = $iCStackIndex)])">0</xsl:if> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@CSTACK_INDEX = $iCStackIndex)]"> <xsl:variable name="shapesAbv_Heights_"> <CSTACK_MOD HEIGHT="0"/> <!-- Store the heights of all the peripherals above this one heights in a variable --> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[((@CSTACK_INDEX = $iCStackIndex) and (@CSTACK_MODS_Y &lt; $iCStackMods_Y))]"> <xsl:variable name="shapeHeight_"> <xsl:choose> <xsl:when test="@MODCLASS = 'PERIPHERAL'"> <xsl:call-template name="F_Calc_PeriShape_Height"> <xsl:with-param name="iShapeInst" select="MODULE/@INSTANCE"/> </xsl:call-template> </xsl:when> <xsl:when test="@MODCLASS = 'MEMORY_UNIT'"> <xsl:call-template name="F_Calc_MemoryUnit_Height"> <xsl:with-param name="iShapeId" select="@SHAPE_ID"/> </xsl:call-template> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- <xsl:message>Calculated height of cstack shape of type <xsl:value-of select="@MODCLASS"/> as <xsl:value-of select="$shapeHeight_"/></xsl:message> --> <CSTACK_MOD HEIGHT="{$shapeHeight_ + $BLKD_BIF_H}"/> </xsl:for-each> </xsl:variable> <!-- <xsl:message>Calculated height of cstack as <xsl:value-of select="sum(exsl:node-set($shapesAbv_Heights_)/CSTACK_MOD/@HEIGHT)"/></xsl:message> --> <xsl:value-of select="sum(exsl:node-set($shapesAbv_Heights_)/CSTACK_MOD/@HEIGHT)"/> </xsl:if> </xsl:template> <xsl:template name="F_Calc_PeriShape_Height"> <xsl:param name="iShapeInst" select="'_shape_'"/> <!-- <xsl:message>Calculating height of <xsl:value-of select="$iShapeInst"/></xsl:message> --> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H) and not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H) and not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H)">0</xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H)"> <xsl:variable name="bifs_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H"/> <xsl:value-of select="($BLKD_MOD_LABEL_H + ($BLKD_BIF_H * $bifs_h_) + ($BLKD_MOD_BIF_GAP_V * $bifs_h_) + ($BLKD_MOD_LANE_H * 2))"/> </xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H)"> <xsl:variable name="bifs_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H"/> <xsl:value-of select="($BLKD_MOD_LABEL_H + ($BLKD_BIF_H * $bifs_h_) + ($BLKD_MOD_BIF_GAP_V * $bifs_h_) + ($BLKD_MOD_LANE_H * 2))"/> </xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H)"> <xsl:variable name="bifs_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/PROCSHAPES/MODULE[(@INSTANCE = $iShapeInst)]/@BIFS_H"/> <xsl:value-of select="($BLKD_MOD_LABEL_H + ($BLKD_BIF_H * $bifs_h_) + ($BLKD_MOD_BIF_GAP_V * $bifs_h_) + ($BLKD_MOD_LANE_H * 2))"/> </xsl:if> </xsl:template> <xsl:template name="F_Calc_Shape_Height"> <xsl:param name="iShapeId" select="_shape_"/> <!-- <xsl:message>Calculating height of <xsl:value-of select="$shapeId"/></xsl:message> --> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)])">0</xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE/@BIFS_H)"> <xsl:variable name="bifs_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE/@BIFS_H"/> <xsl:value-of select="($BLKD_MOD_LABEL_H + ($BIF_H * $bifs_h_) + ($BLKD_MOD_BIF_GAP_V * $bifs_h_) + ($BLKD_MOD_LANE_H * 2))"/> </xsl:if> </xsl:template> <xsl:template name="F_Calc_MemoryUnit_Height"> <xsl:param name="iShapeId" select="1000"/> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)])">0</xsl:if> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]"> <!-- Store the memory controller heights in a variable --> <xsl:variable name="memC_heights_"> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY_CNTLR')])"> <MEM_CNTLR INSTANCE="{@INSTANCE}" HEIGHT="0"/> </xsl:if> <xsl:if test="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY_CNTLR')])"> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[(@MODCLASS = 'MEMORY_CNTLR')]"> <xsl:variable name="memC_height_"> <xsl:call-template name="F_Calc_PeriShape_Height"> <xsl:with-param name="iShapeInst" select="@INSTANCE"/> </xsl:call-template> </xsl:variable> <MEM_CNTLR INSTANCE="{@INSTANCE}" HEIGHT="{$memC_height_}"/> </xsl:for-each> </xsl:if> </xsl:variable> <!-- Store the bram heights in a variable --> <xsl:variable name="bram_heights_"> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[not(@MODCLASS = 'MEMORY_CNTLR')])"> <BRAM INSTANCE="{@INSTANCE}" HEIGHT="0"/> </xsl:if> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[not(@MODCLASS = 'MEMORY_CNTLR')]"> <xsl:for-each select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/CMPLXSHAPE[(@SHAPE_ID = $iShapeId)]/MODULE[not(@MODCLASS = 'MEMORY_CNTLR')]"> <xsl:variable name="bram_height_"> <xsl:call-template name="F_Calc_PeriShape_Height"> <xsl:with-param name="iShapeInst" select="@INSTANCE"/> </xsl:call-template> </xsl:variable> <BRAM INSTANCE="{@INSTANCE}" HEIGHT="{$bram_height_}"/> </xsl:for-each> </xsl:if> </xsl:variable> <!-- Select the maximum of them --> <xsl:variable name="max_bram_height_" select="math:max(exsl:node-set($bram_heights_)/BRAM/@HEIGHT)"/> <xsl:variable name="max_memC_height_" select="math:max(exsl:node-set($memC_heights_)/MEM_CNTLR/@HEIGHT)"/> <xsl:value-of select="$max_bram_height_ + $max_memC_height_"/> </xsl:if> </xsl:template> <xsl:template name="F_Calc_SbsBucket_Height"> <xsl:param name="iBucketId" select="100"/> <!-- <xsl:message>Looking of height of bucket <xsl:value-of select="$iBucketId"/></xsl:message> --> <xsl:variable name="bkt_gap_" select="$BLKD_BIF_H"/> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET[(@BUS_INDEX = $iBucketId)])">0</xsl:if> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET[(@BUS_INDEX = $iBucketId)]"> <xsl:variable name="mods_h_" select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSBUCKETS/SBSBUCKET[(@BUS_INDEX = $iBucketId)]/@MODS_H"/> <xsl:value-of select="((($BLKD_MOD_BKTLANE_H * 2) + ((($BLKD_MOD_H + $BLKD_BIFC_H) * $mods_h_) + ($BLKD_MOD_BUCKET_G * ($mods_h_ - 1)))) + $bkt_gap_)"/> </xsl:if> </xsl:template> <!-- =============================================== Symbol Naming Functions =============================================== --> <xsl:template name="F_generate_Proc_StackName"> <xsl:param name="iProcInst" select="'_unknown_'"/> symbol_STACK_<xsl:value-of select="$iProcInst"/> </xsl:template> <xsl:template name="F_generate_Proc_GroupName"> <xsl:param name="iProcInst" select="'_unknown_'"/> symbol_GROUP_<xsl:value-of select="$iProcInst"/> </xsl:template> <xsl:template name="F_generate_Space_Name"><xsl:param name="iStackToEast" select="'NONE'"/><xsl:param name="iStackToWest" select="'NONE'"/>symbol_SPACE_WEST_<xsl:value-of select="$iStackToWest"/>_EAST_<xsl:value-of select="$iStackToEast"/></xsl:template> <xsl:template name="F_generate_Stack_Name"><xsl:param name="iHorizIdx" select="'_unknown_'"/>symbol_STACK_<xsl:value-of select="$iHorizIdx"/></xsl:template> <xsl:template name="F_generate_Stack_SymbolName"><xsl:param name="iHorizIdx" select="'_unknown_'"/><xsl:param name="iVertiIdx" select="'_unknown_'"/>symbol_STACK_<xsl:value-of select="$iHorizIdx"/>_SHAPE_<xsl:value-of select="$iVertiIdx"/></xsl:template> <!-- ======================= END UTILITY FUNCTIONS ======================= --> </xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- Hello World in XSLT --> <!-- from http://www.roesler-ac.de/wolfram/hello.htm --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:value-of select="text/string" /> </xsl:template> </xsl:stylesheet>
<xsl:if test="starts-with(@name, 'Mr.')">Mister</xsl:if>
<reponame>ckamtsikis/cmssw<filename>OnlineDB/EcalCondDB/doc/EcalDocDB/doc.xslt<gh_stars>100-1000 <?xml version="1.0" encoding="utf8" ?> <!-- --> <!-- ECALDB XML DOC STYLESHEET --> <!-- --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" encoding="utf-8"/> <xsl:strip-space elements="*" /> <xsl:template match="ECAL"> <!-- initial html stuff...--> <html> <head> <title>XML Documentation for ECAL DB numbering</title> <link rel="stylesheet" type="text/css" href="style.css"/> </head> <body> <!--HEADER--> <div class = "header"> <img src = "images/CMSlogo.png" /> <div id = "title"> XML Documentation for ECAL DB numbering</div> <a href = "instructionsRead.html" target = "blank"> How to read this page</a> <a href = "instructionsWrite.html" target = "blank"> How to modify this page</a> </div> <!--END HEADER--> <div id = "endcap"> <xsl:apply-templates select="endcap"/> </div> </body> </html> </xsl:template> <xsl:template match="endcap"> <xsl:apply-templates select="numbering"/> </xsl:template> <xsl:template match="numbering"> <div class= "numbering"> <p> <xsl:text>Part::</xsl:text> <xsl:value-of select="normalize-space(part)" /> </p> <p> <xsl:text>Id Names::</xsl:text> <xsl:value-of select="normalize-space(idnames)" /> </p> <p> <xsl:text>Description::</xsl:text> <xsl:value-of select="normalize-space(description)" /> </p> <p> <xsl:text>Logic_ids::</xsl:text> <xsl:value-of select="normalize-space(logic_ids)" /> </p> <p> <xsl:text>Channel_ids::</xsl:text> <xsl:value-of select="normalize-space(channel_ids)" /> </p> <p> <xsl:text>Number of channels::</xsl:text> <xsl:value-of select="normalize-space(noOfChannels)" /> </p> </div> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:xlink="http://www.w3.org/1999/xlink"> <xsl:output method="html"/> <xsl:param name="PERI_COL_OPB" select="'#339900'"/> <xsl:param name="PERI_COL_WHIT" select="'#FFFFFF'"/> <xsl:param name="PERI_COL_INFO" select="'#2233FF'"/> <xsl:param name="PERI_COL_BLCK" select="'#000000'"/> <xsl:param name="PERI_COL_GREY" select="'#CCCCCC'"/> <xsl:param name="PERI_COL_XPRP" select="'#810017'"/> <xsl:param name="PERI_COL_DOCLNK" select="'#FF9900'"/> <!-- ======================= MAIN PERIPHERAL SECTION =============================== --> <xsl:template name="Layout_Peripherals"> <BR></BR> <BR></BR> <BR></BR> <BR></BR> <A name="_{@INSTANCE}"/> <SPAN style="color:{$DS_COL_BLCK}; font: bold italic 12px Verdana,Arial,Helvetica,sans-serif"> <xsl:value-of select="@INSTANCE"/> <BR></BR> ________________________________________________ </SPAN> <BR></BR> <BR></BR> <TABLE BGCOLOR="{$PERI_COL_WHIT}" WIDTH="800" COLS="2" cellspacing="0" cellpadding="0" border="0"> <!-- Layout the Module information table--> <TD COLSPAN="1" width="50%" align="LEFT" valign="TOP"> <TABLE BGCOLOR="{$PERI_COL_WHIT}" WIDTH="400" COLS="2" cellspacing="0" cellpadding="0" border="0"> <TD COLSPAN="1" width="50%" align="MIDDLE" valign="TOP"> <IMG SRC="imgs/{@INSTANCE}.jpg" alt="{@INSTANCE} IP Image" border="0" vspace="10" hspace="0"/> </TD> <TR></TR> <TD COLSPAN="1" width="50%" align="LEFT" valign="TOP"> <xsl:call-template name="Peri_PinoutTable"/> </TD> </TABLE> </TD> <TD COLSPAN="1" width="50%" align="RIGHT" valign="BOTTOM"> <xsl:call-template name="Peri_InfoTable"/> </TD> </TABLE> </xsl:template> <!-- ======================= PERIHERAL TABLE PARTS =============================== --> <!-- Layout the Module's Information table --> <xsl:template name="Peri_InfoTable"> <TABLE BGCOLOR="{$PERI_COL_BLCK}" WIDTH="410" COLS="5" cellspacing="1" cellpadding="2" border="0"> <TH COLSPAN="5" width="100%" align="middle" bgcolor="{$PERI_COL_XPRP}"><SPAN style="color:{$PERI_COL_WHIT}; font: bold 12px Verdana,Arial,Helvetica,sans-serif">General</SPAN></TH> <TR></TR> <TH COLSPAN="3" width="60%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Type</SPAN></TH> <TH COLSPAN="2" width="40%" align="middle" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><A HREF="docs/{@MODTYPE}.pdf" style="text-decoration:none; color:{$PERI_COL_XPRP}"><xsl:value-of select="@MODTYPE"/></A></SPAN></TH> <TR></TR> <TH COLSPAN="3" width="60%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Version</SPAN></TH> <TH COLSPAN="2" width="40%" align="middle" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@HWVERSION"/></SPAN></TH> <TR></TR> <TH COLSPAN="5" width="100%" align="middle" bgcolor="{$PERI_COL_XPRP}"><SPAN style="color:{$PERI_COL_WHIT}; font: bold 12px Verdana,Arial,Helvetica,sans-serif">Parameters</SPAN></TH> <TR></TR> <TH COLSPAN="5" width="100%" align="left" bgcolor="{$PERI_COL_WHIT}"> <SPAN style="color:{$PERI_COL_INFO}; font: bold 9px Verdana,Arial,Helvetica,sans-serif"> The paramaters listed here are only those set in the MHS file. Refer to the IP <A HREF="docs/{@MODTYPE}.pdf" style="text-decoration:none; color:{$PERI_COL_XPRP}"> documentation </A>for complete information about module parameters. </SPAN> </TH> <TR></TR> <TH COLSPAN="3" width="60%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Name</SPAN></TH> <TH COLSPAN="2" width="40%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Value</SPAN></TH> <xsl:for-each select="PARAMETER"> <TR></TR> <TH COLSPAN="3" width="60%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@NAME"/></SPAN></TH> <TH COLSPAN="2" width="40%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@VALUE"/></SPAN></TH> </xsl:for-each> <TR></TR> <TH COLSPAN="5" width="100%" align="middle" bgcolor="{$PERI_COL_XPRP}"><SPAN style="color:{$PERI_COL_WHIT}; font: bold 12px Verdana,Arial,Helvetica,sans-serif">Device Utilization</SPAN></TH> <TR></TR> <xsl:choose> <xsl:when test="not(RESOURCES)"> <TH COLSPAN="5" width="100%" align="middle" bgcolor="{$PERI_COL_WHIT}"> <SPAN style="color:{$PERI_COL_INFO}; font: bold 9px Verdana,Arial,Helvetica,sans-serif"> Device utilization information is not available for this IP. </SPAN> </TH> </xsl:when> <xsl:otherwise> <TH COLSPAN="2" width="55%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Resource Type</SPAN></TH> <TH COLSPAN="1" width="15%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Used</SPAN></TH> <TH COLSPAN="1" width="15%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Available</SPAN></TH> <TH COLSPAN="1" width="15%" align="middle" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">Percent</SPAN></TH> <xsl:for-each select="RESOURCES/RESOURCE"> <TR></TR> <TH COLSPAN="2" width="55%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@TYPE"/></SPAN></TH> <TH COLSPAN="1" width="15%" align="middle" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@USED"/></SPAN></TH> <TH COLSPAN="1" width="15%" align="middle" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@TOTAL"/></SPAN></TH> <TH COLSPAN="1" width="15%" align="middle" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@PERCENT"/></SPAN></TH> </xsl:for-each> </xsl:otherwise> </xsl:choose> <TR></TR> <TH COLSPAN="5" width="100%" align="middle" bgcolor="{$PERI_COL_XPRP}"><SPAN style="color:{$PERI_COL_WHIT}; font: bold 12px Verdana,Arial,Helvetica,sans-serif"></SPAN></TH> </TABLE> </xsl:template> <!-- Layout the Module's pinout table --> <xsl:template name="Peri_PinoutTable"> <TABLE BGCOLOR="{$PERI_COL_BLCK}" WIDTH="310" COLS="6" cellspacing="1" cellpadding="2" border="0"> <TH COLSPAN="6" width="100%" align="middle" bgcolor="{$PERI_COL_XPRP}"><SPAN style="color:{$PERI_COL_WHIT}; font: bold 9px Verdana,Arial,Helvetica,sans-serif">PINOUT</SPAN></TH> <TR></TR> <TH COLSPAN="6" width="100%" align="left" bgcolor="{$PERI_COL_WHIT}"> <SPAN style="color:{$PERI_COL_INFO}; font: bold 9px Verdana,Arial,Helvetica,sans-serif"> The ports listed here are only those connected in the MHS file. Refer to the IP <A HREF="docs/{@MODTYPE}.pdf" style="text-decoration:none; color:{$PERI_COL_XPRP}"> documentation </A>for complete information about module ports. </SPAN> </TH> <TR></TR> <TH COLSPAN="1" width="5%" align="left" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">#</SPAN></TH> <TH COLSPAN="2" width="25%" align="left" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">NAME</SPAN></TH> <TH COLSPAN="1" width="10%" align="left" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">DIR</SPAN></TH> <TH COLSPAN="2" width="60%" align="left" bgcolor="{$PERI_COL_GREY}"><SPAN style="color:{$PERI_COL_XPRP}; font: bold 10px Verdana,Arial,Helvetica,sans-serif">SIGNAL</SPAN></TH> <xsl:for-each select="PORT[(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__'))]"> <xsl:sort data-type="number" select="@INDEX" order="ascending"/> <TR></TR> <TH COLSPAN="1" width="5%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@INDEX"/></SPAN></TH> <TH COLSPAN="2" width="25%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@NAME"/></SPAN></TH> <TH COLSPAN="1" width="10%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@DIR"/></SPAN></TH> <TH COLSPAN="2" width="60%" align="left" bgcolor="{$PERI_COL_WHIT}"><SPAN style="color:{$PERI_COL_BLCK}; font: bold 10px Verdana,Arial,Helvetica,sans-serif"><xsl:value-of select="@SIGNAME"/></SPAN></TH> </xsl:for-each> </TABLE> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?> <numbers> <number>1578</number> <number>4828</number> <number>1154</number> <number>4950</number> <number>6497</number> <number>2355</number> <number>9341</number> <number>1927</number> <number>8720</number> <number>4490</number> <number>1218</number> <number>6675</number> <number>8181</number> <number>1403</number> <number>4637</number> </numbers>
<reponame>npocmaka/Windows-Server-2003 <?xml version="1.0" encoding="iso-8859-1"?> <!-- simple xslt file: sce-rollback-inf.xsl --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ssr="http://microsoft.com/sce/ssr" > <xsl:import href="../CommonLib/ExtFunctions.xsl"/> <xsl:output method="text" indent="no"/> <msxsl:script language="JScript" implements-prefix="ssr"> <!-- do not analyze xml syntax --> <![CDATA[ function CreateRbkTemplate (InFilePath, OutFilePath, LogFilePath) { try { var SCEAgent = new ActiveXObject("Ssr.SCEAgent"); SCEAgent.CreateRollbackTemplate(InFilePath, OutFilePath, LogFilePath); return 1; } catch (e) { return e; } } ]]> </msxsl:script> <xsl:template match="/SSRSecurityPolicy/Services"> <xsl:variable name="CfgInf" select="ssr:GetFileLocation('Configure', 'SCE.inf')"/> <xsl:variable name="RbkInf" select="ssr:GetFileLocation('Rollback', 'SCE.inf')"/> <xsl:variable name="Rbklog" select="ssr:GetFileLocation('Rollback', 'SCE-Rollback.log')"/> 'rollback template is <xsl:value-of select="$RbkInf"/> DIM RbkTempCreated RbkTempCreated = <xsl:value-of select="ssr:CreateRbkTemplate($CfgInf, $RbkInf, $Rbklog)"/> If RbkTempCreated &lt;&gt; 0 Then WScript.Echo "Rollback template failed to be created. Quit" WScript.Quit 1 End If </xsl:template> </xsl:stylesheet>
<reponame>mullikine/RosettaCodeData <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- XSLT Mandelbrot - written by <NAME> 2007, http://iki.fi/bisqwit/ --> <xsl:output method="html" indent="no" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/REC-html40/strict.dtd" /> <xsl:template match="/fractal"> <html> <head> <title>XSLT fractal</title> <style type="text/css"> body { color:#55F; background:#000 } pre { font-family:monospace; font-size:7px } pre span { background:<xsl:value-of select="background" /> } </style> </head> <body> <div style="position:absolute;top:20px;left:20em"> Copyright © 1992,2007 <NAME> (<a href="http://iki.fi/bisqwit/">http://iki.fi/bisqwit/</a>) </div> <h1 style="margin:0px">XSLT fractal</h1> <pre><xsl:call-template name="bisqwit-mandelbrot" /></pre> </body> </html> </xsl:template> <xsl:template name="bisqwit-mandelbrot" ><xsl:call-template name="bisqwit-mandelbrot-line"> <xsl:with-param name="y" select="y/min"/> </xsl:call-template ></xsl:template> <xsl:template name="bisqwit-mandelbrot-line" ><xsl:param name="y" /><xsl:call-template name="bisqwit-mandelbrot-column"> <xsl:with-param name="x" select="x/min"/> <xsl:with-param name="y" select="$y"/> </xsl:call-template ><xsl:if test="$y < y/max" ><br /><xsl:call-template name="bisqwit-mandelbrot-line"> <xsl:with-param name="y" select="$y + y/step"/> </xsl:call-template ></xsl:if ></xsl:template> <xsl:template name="bisqwit-mandelbrot-column" ><xsl:param name="x" /><xsl:param name="y" /><xsl:call-template name="bisqwit-mandelbrot-slot"> <xsl:with-param name="x" select="$x" /> <xsl:with-param name="y" select="$y" /> <xsl:with-param name="zr" select="$x" /> <xsl:with-param name="zi" select="$y" /> </xsl:call-template ><xsl:if test="$x < x/max" ><xsl:call-template name="bisqwit-mandelbrot-column"> <xsl:with-param name="x" select="$x + x/step"/> <xsl:with-param name="y" select="$y" /> </xsl:call-template ></xsl:if ></xsl:template> <xsl:template name="bisqwit-mandelbrot-slot" ><xsl:param name="x" /><xsl:param name="y" /><xsl:param name="zr" /><xsl:param name="zi" /><xsl:param name="iter" select="0" /><xsl:variable name="zrsqr" select="($zr * $zr)" /><xsl:variable name="zisqr" select="($zi * $zi)" /><xsl:choose> <xsl:when test="(4*scale*scale >= $zrsqr + $zisqr) and (maxiter > $iter+1)" ><xsl:call-template name="bisqwit-mandelbrot-slot"> <xsl:with-param name="x" select="$x" /> <xsl:with-param name="y" select="$y" /> <xsl:with-param name="zi" select="(2 * $zr * $zi) div scale + $y" /> <xsl:with-param name="zr" select="($zrsqr - $zisqr) div scale + $x" /> <xsl:with-param name="iter" select="$iter + 1" /> </xsl:call-template ></xsl:when> <xsl:otherwise ><xsl:variable name="magnitude" select="magnitude[@value=$iter]" /><span style="color:{$magnitude/color}" ><xsl:value-of select="$magnitude/symbol" /></span></xsl:otherwise> </xsl:choose ></xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="iso-8859-15"?> <!-- This file is freely distributable, created by <NAME> (<EMAIL>) This is just a simple XSLT file that converts some HTML pages to a XBEL bookmarklist. It is included here to test the new XSLT highlighting by <NAME>. TODO: add better test file. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:h="http://www.w3.org/1999/xhtml"> <xsl:output method="xml" encoding="iso-8859-15" indent="yes" doctype-public="+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" doctype-system="http://www.python.org/topics/xml/dtds/xbel-1.0.dtd" /> <!-- main --> <xsl:template match="/"> <xbel><folder><title>Linux at Home Links</title> <xsl:for-each select="//*[@id='maincontents']//h:li"> <xsl:variable name="f" select="document(h:a/@href)/h:html"/> <folder> <title><xsl:value-of select="h:a/h:strong"/></title> <desc><xsl:value-of select="normalize-space(h:a/text())"/></desc> <xsl:for-each select="$f//h:div[@id='maincontents']"> <xsl:call-template name="getbookmarks"/> </xsl:for-each> </folder> </xsl:for-each> </folder></xbel> </xsl:template> <!-- end of main --> <!-- get bookmarks from a page --> <xsl:template name="getbookmarks"> <xsl:choose> <!-- harvest links from p or li elements --> <xsl:when test="self::h:li or self::h:p"> <xsl:variable name="t" select="normalize-space()"/> <xsl:for-each select=".//h:a[1]"> <xsl:call-template name="bookmark"> <xsl:with-param name="desc" select="$t"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select=".//h:a[position()!=1]"> <xsl:call-template name="bookmark"/> </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:for-each select="*"> <xsl:call-template name="getbookmarks"/> </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="bookmark"> <xsl:param name="href" select="@href"/> <xsl:param name="desc" select="''"/> <xsl:param name="title" select="normalize-space()"/> <xsl:variable name="realdesc"> <xsl:choose> <xsl:when test="starts-with($desc,$title)"> <xsl:choose> <xsl:when test="starts-with(translate(substring-after($desc,$title),',.;','...'),'.')"> <xsl:value-of select="substring($desc,string-length($title) + 2)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="substring-after($desc,$title)"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:value-of select="$desc"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <bookmark> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="starts-with($href,'http://') or starts-with($href,'ftp://') or starts-with($href,'mailto:')"> <xsl:value-of select="$href"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat('http://www.xs4all.nl/~wbsoft/linux/links/',$href)"/> </xsl:otherwise> </xsl:choose> </xsl:attribute> <title><xsl:value-of select="normalize-space($title)"/></title> <xsl:if test="normalize-space($realdesc) != ''"> <desc><xsl:value-of select="normalize-space($realdesc)"/></desc> </xsl:if> </bookmark> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="/"> <html> <head> <style> body { font-family:arial; font-size:10pt; text-align:left; } h1, h2 { padding-top: 30px; } h3 { padding-top: 20px; } h4, h5, h6 { padding-top: 10px; font-size:12pt; } table { font-family:arial; font-size:10pt; text-align:left; border-color:#B0B0B0; border-style:solid; border-width:1px; border-collapse:collapse; } table th, table td { font-family:arial; font-size:10pt; text-align:left; border-color:#B0B0B0; border-style:solid; border-width:1px; padding: 4px; } </style> </head> <body> <xsl:apply-templates/> </body></html> </xsl:template> <xsl:template match="/doc/title"> <h1 align="center"> <xsl:apply-templates/> </h1> </xsl:template> <xsl:template match="text"> <p> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="/doc/section"> <h2> <xsl:apply-templates select="name"/> </h2> <xsl:apply-templates select="table|text|list|section"/> </xsl:template> <xsl:template match="/doc/section/section"> <h3> <xsl:apply-templates select="name"/> </h3> <xsl:apply-templates select="table|text|list|section"/> </xsl:template> <xsl:template match="/doc/section/section/section"> <h4> <xsl:apply-templates select="name"/> </h4> <xsl:apply-templates select="table|text|list|section"/> </xsl:template> <xsl:template match="/doc/section/section/section/section"> <h5> <xsl:apply-templates select="name"/> </h5> <xsl:apply-templates select="table|text|list|section"/> </xsl:template> <xsl:template match="/doc/section/section/section/section/section"> <h6> <xsl:apply-templates select="name"/> </h6> <xsl:apply-templates select="table|text|list"/> </xsl:template> <xsl:template match="section/name"> <xsl:apply-templates/> </xsl:template> <xsl:template match="table"> <table cellpadding="4"> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="header"> <tr> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="header/cell"> <th> <xsl:apply-templates/> </th> </xsl:template> <xsl:template match="row"> <tr> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="row/cell"> <td> <xsl:apply-templates/> </td> </xsl:template> </xsl:stylesheet>
<reponame>SoCdesign/audiomixer <?xml version="1.0" standalone="no"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math dyn exsl xlink"> <xsl:variable name="G_ROOT" select="/"/> <!-- =========================================================================== CALCULATE GLOBAL VARIABLES BASED ON BLKDIAGRAM DEF IN INPUT XML =========================================================================== --> <xsl:variable name="G_Total_StandAloneMpmc_H"> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE"> <xsl:value-of select="($BLKD_MPMC_MOD_H + $BLKD_MPMC2PROC_GAP)"/> </xsl:if> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/CMPLXSHAPES/MPMCSHAPE)">0</xsl:if> </xsl:variable> <xsl:variable name="G_Max_Stack_BlwSbs_H"> <xsl:call-template name="F_Calc_Max_Stack_BlwSbs_Height"/> </xsl:variable> <xsl:variable name="G_Max_Stack_AbvSbs_H"> <xsl:call-template name="F_Calc_Max_Stack_AbvSbs_Height"/> </xsl:variable> <xsl:variable name="G_Total_Stacks_W"> <xsl:call-template name="F_Calc_Stack_X"> <xsl:with-param name="iStackIdx" select="($G_ROOT/EDKSYSTEM/BLKDIAGRAM/@STACK_HORIZ_WIDTH)"/> </xsl:call-template> </xsl:variable> <xsl:variable name="G_NumOfSharedBusses" select="count($G_ROOT/EDKSYSTEM/BLKDIAGRAM/SBSSHAPES/MODULE)"/> <xsl:variable name="G_Total_SharedBus_H" select="($G_NumOfSharedBusses * $BLKD_SBS_LANE_H)"/> <xsl:variable name="G_NumOfBridges" select="count($G_ROOT/EDKSYSTEM/BLKDIAGRAM/BRIDGESHAPES/MODULE)"/> <xsl:variable name="G_Total_Bridges_W" select="(($G_NumOfBridges * ($BLKD_MOD_W + ($BLKD_BUS_LANE_W * 2))) + $BLKD_BRIDGE_GAP)"/> <xsl:variable name="G_Total_DrawArea_CLC" select="($G_Total_Stacks_W + $G_Total_Bridges_W + ($BLKD_INNER_GAP * 2))"/> <xsl:variable name="G_Total_DrawArea_W"> <xsl:if test="$G_Total_DrawArea_CLC &gt; ($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)"> <xsl:value-of select="$G_Total_DrawArea_CLC"/> </xsl:if> <xsl:if test="not($G_Total_DrawArea_CLC &gt; ($BLKD_KEY_W + $BLKD_SPECS2KEY_GAP + $BLKD_SPECS_W))"> <xsl:value-of select="($BLKD_KEY_W + $BLKD_SPECS_W + $BLKD_SPECS2KEY_GAP)"/> </xsl:if> </xsl:variable> <xsl:variable name="G_IpBucketMods_H"> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET/@MODS_H"><xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET/@MODS_H"/></xsl:if> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/IPBUCKET/@MODS_H)">0</xsl:if> </xsl:variable> <xsl:variable name="G_Total_IpBucket_H" select="($G_IpBucketMods_H * ($BLKD_MOD_H + $BLKD_BIF_H))"/> <xsl:variable name="G_Total_UnkBucket_H"> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET"> <xsl:variable name="unkBucketMods_H_"> <xsl:if test="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@MODS_H"><xsl:value-of select="$G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@MODS_H"/></xsl:if> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@MODS_H)">0</xsl:if> </xsl:variable> <xsl:variable name="total_UnkMod_H_" select="($unkBucketMods_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/> <xsl:variable name="unkBucketBifs_H_"> <xsl:if test="/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@BIFS_H"><xsl:value-of select="/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@BIFS_H"/></xsl:if> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET/@BIFS_H)">0</xsl:if> </xsl:variable> <xsl:variable name="total_UnkBif_H_" select="($unkBucketBifs_H_ * ($BLKD_MOD_H + $BLKD_BIF_H))"/> <xsl:value-of select="($total_UnkBif_H_ + $total_UnkMod_H_)"/> </xsl:if> <xsl:if test="not($G_ROOT/EDKSYSTEM/BLKDIAGRAM/UNKBUCKET)">0</xsl:if> </xsl:variable> <xsl:variable name="G_SharedBus_Y" select="($BLKD_INNER_Y + $G_Total_StandAloneMpmc_H + $G_Max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP)"/> <!-- =========================================================================== Calculate the width of the Block Diagram based on the total number of buslanes and modules in the design. If there are no buslanes or modules, a default width, just wide enough to display the KEY and SPECS is used =========================================================================== --> <xsl:variable name="G_Total_Blkd_W" select="($G_Total_DrawArea_W + (($BLKD_PRTCHAN_W + $BLKD_IORCHAN_W)* 2))"/> <xsl:variable name="G_Total_Diag_W" select="$G_Total_Blkd_W"/> <!-- =========================================================================== --> <!-- Calculate the height of the Block Diagram based on the total number of --> <!-- buslanes and modules in the design. Take into account special shapes such --> <!-- as MultiProc shapes. --> <!-- =========================================================================== --> <xsl:variable name="G_Total_DrawArea_H" select="($G_Total_StandAloneMpmc_H + $G_Max_Stack_AbvSbs_H + $BLKD_PROC2SBS_GAP + $G_Total_SharedBus_H + $G_Max_Stack_BlwSbs_H + $BLKD_SBS2IP_GAP + $G_Total_IpBucket_H + $BLKD_IP2UNK_GAP + $G_Total_UnkBucket_H + ($BLKD_INNER_GAP * 2))"/> <xsl:variable name="G_Total_Blkd_H" select="($G_Total_DrawArea_H + (($BLKD_PRTCHAN_H + $BLKD_IORCHAN_H)* 2))"/> <xsl:variable name="G_Total_Diag_H"> <xsl:if test="($IN_TESTMODE = 'TRUE')"> <xsl:message>Generating Blkdiagram in TestMode </xsl:message> <xsl:value-of select="$G_Total_Blkd_H"/> </xsl:if> <xsl:if test="(not($IN_TESTMODE) or ($IN_TESTMODE = 'FALSE'))"> <xsl:value-of select="($G_Total_Blkd_H + $BLKD_DRAWAREA2KEY_GAP + $BLKD_KEY_H)"/> </xsl:if> </xsl:variable> </xsl:stylesheet>
<gh_stars>10-100 <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <!-- Root template selects all children of the CIM/DECLARATIONS tag --> <xsl:template match="/"> <xsl:apply-templates select="CIM//CLASS"/> </xsl:template> <xsl:template match="CLASS"> <xsl:element name="METHOD"> <xsl:attribute name="id"><xsl:value-of select="@NAME"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <!-- METHOD template formats a single CIM method --> <xsl:template match="METHOD"> <xsl:element name="METHOD"> <xsl:attribute name="NAME"><xsl:value-of select="@NAME"/></xsl:attribute> <xsl:for-each select="METHODPARAMETER"> <xsl:element name="METHODPARAMETER"> <xsl:attribute name="NAME"><xsl:value-of select="@NAME"/></xsl:attribute> <xsl:for-each select="PARAMETER"> <xsl:attribute name="TYPE"><xsl:value-of select="@TYPE"/></xsl:attribute> </xsl:for-each> </xsl:element> </xsl:for-each> </xsl:element> </xsl:template> </xsl:stylesheet>
<filename>ZedBoard_Linux_Design/hw/xps_proj/__xps/edw2xtl_sav_view_port.xsl <?xml version="1.0" standalone="no"?> <!DOCTYPE stylesheet [ <!ENTITY UPPERCASE "ABCDEFGHIJKLMNOPQRSTUVWXYZ"> <!ENTITY LOWERCASE "abcdefghijklmnopqrstuvwxyz"> <!ENTITY UPPER2LOWER " '&UPPERCASE;' , '&LOWERCASE;' "> <!ENTITY LOWER2UPPER " '&LOWERCASE;' , '&UPPERCASE;' "> <!ENTITY ALPHALOWER "ABCDEFxX0123456789"> <!ENTITY HEXUPPER "ABCDEFxX0123456789"> <!ENTITY HEXLOWER "abcdefxX0123456789"> <!ENTITY HEXU2L " '&HEXLOWER;' , '&HEXUPPER;' "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math dyn exsl xlink"> <!-- ================================================================================ Generate XTeller for PORTS ================================================================================ --> <xsl:param name="SHOW_IOIF" select="'TRUE'"/> <xsl:param name="SHOW_BUSIF" select="'TRUE'"/> <xsl:template name="WRITE_VIEW_PORT_TREE"> <xsl:variable name="num_of_ext_ports_" select="count($G_SYS_EXPS/PORT)"/> <xsl:if test="$G_DEBUG='TRUE'"> <xsl:message>WRITING PORT in MODE :<xsl:value-of select="@MODE"/></xsl:message> <!-- <xsl:message>EXTERNAL PORT <xsl:value-of select="$num_of_ext_ports_"/></xsl:message> --> </xsl:if> <xsl:if test="$num_of_ext_ports_ &gt; 0"> <xsl:call-template name="WRITE_VIEW_EXTP_TREE_SET"/> </xsl:if> <xsl:for-each select="$G_SYS_MODS/MODULE"> <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/> <xsl:variable name= "instName_" select="@INSTANCE"/> <xsl:variable name="moduleRef_" select="self::node()"/> <xsl:call-template name="WRITE_VIEW_PORT_TREE_SET"> <xsl:with-param name="iModRef" select="$moduleRef_"/> </xsl:call-template> </xsl:for-each> <!-- End of MODULES loop --> </xsl:template> <xsl:template name="WRITE_VIEW_EXTP_TREE_SET"> <xsl:element name="SET"> <xsl:attribute name="ID">ExternalPorts</xsl:attribute> <xsl:attribute name="CLASS">MODULE</xsl:attribute> <xsl:for-each select="$G_SYS_EXPS"> <xsl:element name="VARIABLE"> <xsl:attribute name="NAME">Name</xsl:attribute> <xsl:attribute name="VALUE">External Ports</xsl:attribute> <xsl:attribute name="VIEWDISP">Name</xsl:attribute> <xsl:attribute name="VIEWTYPE">STATIC</xsl:attribute> </xsl:element> <xsl:for-each select="PORT"> <xsl:sort select="@NAME" order="ascending"/> <!-- <xsl:sort data-type="number" select="@MHS_INDEX" order="ascending"/> --> <xsl:element name="SET"> <xsl:attribute name="ID"><xsl:value-of select="@NAME"/></xsl:attribute> <xsl:attribute name="CLASS">PORT</xsl:attribute> <xsl:attribute name="ROW_INDEX"><xsl:value-of select="(position() - 1)"/></xsl:attribute> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_EDITABLE="TRUE"/> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name" NAME="NAME" VALUE="{@NAME}"/> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Direction" NAME="DIR" VALUE="{@DIR}"/> <xsl:if test="(@SIGIS)"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="{@SIGIS}"/> </xsl:if> <xsl:if test="not(@SIGIS)"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="NONE"/> </xsl:if> <xsl:choose> <xsl:when test="@LEFT and @RIGHT"> <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@LEFT"/>:<xsl:value-of select="@RIGHT"/>]</xsl:variable> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"> <TOOLTIP><qt><xsl:value-of select="$vecformula_txt_"/></qt></TOOLTIP> </VARIABLE> </xsl:when> <xsl:when test="@MSB and @LSB"> <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:variable> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"> <TOOLTIP><qt><xsl:value-of select="$vecformula_txt_"/></qt></TOOLTIP> </VARIABLE> </xsl:when> <xsl:when test="(not(@MSB) and not(@LSB) and not(@SIGIS = 'CLK') and not(@SIGIS = 'CLOCK') and not(@SIGIS = 'DCMCLK') and not(@SIGIS = 'RST') and not(@SIGIS = 'RESET'))"> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE=""/> </xsl:when> </xsl:choose> <xsl:if test="((@SIGIS = 'CLK') or (@SIGIS = 'CLOCK') or (@SIGIS = 'DCMCLK'))"> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Frequency(Hz)" NAME="CLKFREQUENCY" VALUE="{@CLKFREQUENCY}"/> </xsl:if> <xsl:if test="((@SIGIS = 'CLK') or (@SIGIS = 'CLOCK') or (@SIGIS = 'DCMCLK'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Differential Polarity" NAME="DIFFPOLARITY" VALUE="{@DIFFPOLARITY}"/> </xsl:if> <xsl:if test="(@SIGIS = 'RST' or @SIGIS = 'RESET')"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Reset Polarity" NAME="RSTPOLARITY" VALUE="{@RSTPOLARITY}"/> </xsl:if> <xsl:if test="(@SIGIS = 'INTERRUPT')"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/> </xsl:if> <!-- Add connectivity information--> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" /> <xsl:variable name="noOFConnections" select="count(CONNECTIONS/CONNECTION)" /> <xsl:if test="$noOFConnections != 0" > <!--VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" /--> <CONNECTIONS> <xsl:for-each select="CONNECTIONS/CONNECTION" > <xsl:variable name="iInstance" select="@INSTANCE"/> <xsl:variable name="iPort" select="@PORT"/> <xsl:choose> <xsl:when test="@BUSINTERFACE"> <xsl:variable name="iBusName" select="@BUSINTERFACE"/> <CONNECTION INSTANCE="{$iInstance}" PORT="{$iPort}" BUSINTERFACE="{$iBusName}"/> </xsl:when> <xsl:when test="@PORT"> <CONNECTION INSTANCE="{$iInstance}" PORT="{$iPort}"/> </xsl:when> <xsl:otherwise> <CONNECTION INSTANCE="{$iInstance}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </CONNECTIONS> </xsl:if> </xsl:element> </xsl:for-each> <!-- End of EXTERNAL PORTS loop --> </xsl:for-each> <!-- End of EXTERNAL PORTS loop --> </xsl:element> <!-- End of EXTERNAL PORTS SET --> </xsl:template> <xsl:template name="WRITE_VIEW_PORT_TREE_SET"> <xsl:param name="iModRef" select="'__NONE__'"/> <xsl:variable name="m_inst_" select="$iModRef/@INSTANCE"/> <xsl:variable name="m_class_" select="$iModRef/@MODCLASS"/> <xsl:variable name="m_type_" select="$iModRef/@MODTYPE"/> <xsl:variable name="m_type_lc_" select="translate($m_type_,&UPPER2LOWER;)"/> <xsl:variable name="m_version_" select="$iModRef/@HWVERSION"/> <xsl:variable name="m_licinfo_" select="$iModRef/LICENSEINFO"/> <xsl:variable name="m_ports_" select="$iModRef/PORTS"/> <xsl:variable name="is_axi_interconnect_"> <xsl:choose> <xsl:when test="$m_type_ = 'axi_interconnect'">TRUE</xsl:when> <xsl:when test="$m_type_lc_ = 'axi_interconnect'">TRUE</xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:for-each select="$G_SYS_MODS"> <!-- To put things in the right scope for the keys below --> <xsl:variable name="m_iofs_all_" select="key('G_MAP_ALL_IOFS', $m_inst_)"/> <xsl:variable name="m_bifs_all_" select="key('G_MAP_ALL_BIFS', $m_inst_)"/> <xsl:variable name="m_ports_def_" select="key('G_MAP_DEF_PORTS',$m_inst_)"/> <xsl:variable name="m_ports_ndf_" select="key('G_MAP_NDF_PORTS',$m_inst_)"/> <!-- <xsl:if test="$G_DEBUG = 'TRUE'"> <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_bifs_all_)"/> valid bifs </xsl:message> <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_iofs_all_)"/> valid iofs </xsl:message> <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_ports_def_)"/> default ports </xsl:message> <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_ports_ndf_)"/> non default ports </xsl:message> <xsl:message></xsl:message> </xsl:if> --> <SET ID="{$m_inst_}" CLASS="MODULE" MODCLASS="{$m_class_}"> <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. --> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Name" NAME="INSTANCE" VALUE="{$m_inst_}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type" NAME="MODTYPE" VALUE="{$m_type_}" VIEWICON="{$m_licinfo_/@ICON_NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$m_version_}"/> <!-- CR582477, (among others) special case of axi_interconnect_aclk which is a member of a bus interface, but should be treated as a non interface port, (i.e. appear even if the bus interfaces its a member of is invalid. --> <xsl:if test="($is_axi_interconnect_ = 'TRUE')"> <!-- do it this way so we also catch the lower-upper case mismatches --> <xsl:for-each select="key('G_MAP_ALL_PORTS',$m_inst_)[contains(@SIGIS,'CLK')]"> <xsl:variable name="uc_portName_" select="translate(@NAME,&LOWER2UPPER;)"/> <xsl:if test="($uc_portName_= 'INTERCONNECT_ACLK')"> <!-- <xsl:message><xsl:value-of select="$m_inst_"/>.<xsl:value-of select="@NAME"/> = <xsl:value-of select="@SIGIS"/></xsl:message> --> <xsl:variable name="portName_" select="@NAME"/> <xsl:variable name="portDir_" select="@DIR"/> <xsl:variable name="portSig_" select="@SIGNAME"/> <xsl:variable name="portSigIs_"> <xsl:choose> <xsl:when test="not(@SIGIS)">__NONE__</xsl:when> <xsl:otherwise><xsl:value-of select="@SIGIS"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portSensi_"> <xsl:choose> <xsl:when test="(@SENSITIVITY)"><xsl:value-of select="@SENSITIVIITY"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portVecFormula_"> <xsl:choose> <xsl:when test="@VECFORMULA"><xsl:value-of select="@VECFORMULA"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portRange_"> <xsl:choose> <xsl:when test="@MSB and @LSB">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="WRITE_PORT_SET"> <xsl:with-param name="iName" select="$portName_"/> <xsl:with-param name="iDir" select="$portDir_"/> <xsl:with-param name="iSigName" select="$portSig_"/> <xsl:with-param name="iSigIs" select="$portSigIs_"/> <xsl:with-param name="iSensitivity" select="$portSensi_"/> <xsl:with-param name="iVecFormula" select="$portVecFormula_"/> <xsl:with-param name="iPortRange" select="$portRange_"/> </xsl:call-template> </xsl:if> </xsl:for-each> </xsl:if> <!-- PORTS not part of an INTERFACE --> <xsl:for-each select="$m_ports_ndf_"> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> <xsl:variable name="uc_portName_" select="translate(@NAME,&LOWER2UPPER;)"/> <!-- <xsl:if test="((not(@BUS) and not(@IOS)) or (($is_axi_interconnect_ = 'TRUE') and ($uc_portName_= 'INTERCONNECT_ACLK')))"> </xsl:if> --> <xsl:variable name="portName_" select="@NAME"/> <xsl:variable name="portDir_" select="@DIR"/> <xsl:variable name="portSig_" select="@SIGNAME"/> <xsl:variable name="portSigIs_"> <xsl:choose> <xsl:when test="not(@SIGIS)">__NONE__</xsl:when> <xsl:otherwise><xsl:value-of select="@SIGIS"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portSensi_"> <xsl:choose> <xsl:when test="(@SENSITIVITY)"><xsl:value-of select="@SENSITIVITY"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portVecFormula_"> <xsl:choose> <xsl:when test="@VECFORMULA"><xsl:value-of select="@VECFORMULA"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portRange_"> <xsl:choose> <xsl:when test="@MSB and @LSB">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="WRITE_PORT_SET"> <xsl:with-param name="iName" select="$portName_"/> <xsl:with-param name="iDir" select="$portDir_"/> <xsl:with-param name="iSigName" select="$portSig_"/> <xsl:with-param name="iSigIs" select="$portSigIs_"/> <xsl:with-param name="iSensitivity" select="$portSensi_"/> <xsl:with-param name="iVecFormula" select="$portVecFormula_"/> <xsl:with-param name="iPortRange" select="$portRange_"/> </xsl:call-template> </xsl:for-each> <!-- END of PORTS NOT OF INTERFACE --> <!-- PORTS part of a BUSINTERFACE --> <xsl:if test="$SHOW_BUSIF = 'TRUE'"> <xsl:for-each select="$m_bifs_all_"> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> <xsl:variable name="bifName_" select="@NAME"/> <xsl:variable name="bifRef_" select="self::node()"/> <xsl:variable name="portmapsRef_" select="$bifRef_/PORTMAPS"/> <!-- <xsl:variable name="bpmsCnt_" select="count($bpmsRef_/PORTMAP)"/> <xsl:message><xsl:value-of select="$instName_"/>.<xsl:value-of select="$bifName_"/>.<xsl:value-of select="$bpmsCnt_"/></xsl:message> --> <xsl:variable name="is_external_"> <xsl:call-template name="F_IS_Interface_External"> <xsl:with-param name="iInstRef" select="$iModRef"/> <xsl:with-param name="iIntfRef" select="$bifRef_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="bif_connection_"> <xsl:choose> <xsl:when test="not(@BUSNAME = '__NOC__')">Connected to BUS <xsl:value-of select="@BUSNAME"/></xsl:when> <xsl:when test="($is_external_ = 'TRUE')">Connected to External Ports</xsl:when> <xsl:otherwise>Not connected to BUS or External Ports</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- <SET ID="{@NAME}" CLASS="BUSINTERFACE.PORTS"/> --> <xsl:element name="SET"> <xsl:attribute name="ID"><xsl:value-of select="@NAME"/></xsl:attribute> <xsl:attribute name="CLASS">BUSINTERFACE.PORTS</xsl:attribute> <xsl:if test="$is_external_ = 'TRUE'"> <xsl:attribute name="IS_EXTERNAL">TRUE</xsl:attribute> </xsl:if> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="(BUS_IF) {@NAME}"/> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="BUSINTERFACE.CONNECTION" VALUE="{$bif_connection_}"/> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="{$bif_connection_}"/> <xsl:for-each select="$portmapsRef_/PORTMAP"> <xsl:variable name="portDir_" select="@DIR"/> <xsl:variable name="portName_" select="@PHYSICAL"/> <xsl:if test="$m_ports_def_[(@NAME = $portName_)]"><!-- Only in map if port is valid --> <!-- <xsl:if test="(not($portRef_/@IS_VALID) or ($portRef_/@IS_VALID = 'TRUE'))"/> <xsl:sort select="@MPD_INDEX" order="ascending"/> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> --> <xsl:variable name="portRef_" select="$m_ports_def_[(@NAME = $portName_)]"/> <xsl:variable name="portSig_" select="$portRef_/@SIGNAME"/> <xsl:variable name="portSigIs_"> <xsl:choose> <xsl:when test="not($portRef_/@SIGIS)">__NONE__</xsl:when> <xsl:otherwise><xsl:value-of select="$portRef_/@SIGIS"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portSensi_"> <xsl:choose> <xsl:when test="($portRef_/@SENSITIVITY)"><xsl:value-of select="$portRef_/@SENSITIVITY"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portVecFormula_"> <xsl:choose> <xsl:when test="$portRef_/@VECFORMULA"><xsl:value-of select="$portRef_/@VECFORMULA"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portRange_"> <xsl:choose> <xsl:when test="$portRef_/@MSB and $portRef_/@LSB">[<xsl:value-of select="$portRef_/@MSB"/>:<xsl:value-of select="$portRef_/@LSB"/>]</xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="WRITE_PORT_SET"> <xsl:with-param name="iName" select="$portName_"/> <xsl:with-param name="iDir" select="$portDir_"/> <xsl:with-param name="iSigName" select="$portSig_"/> <xsl:with-param name="iSigIs" select="$portSigIs_"/> <xsl:with-param name="iSensitivity" select="$portSensi_"/> <xsl:with-param name="iVecFormula" select="$portVecFormula_"/> <xsl:with-param name="iBifPortRef" select="$portRef_"/> <xsl:with-param name="iPortRange" select="$portRange_"/> </xsl:call-template> </xsl:if> </xsl:for-each> <!-- END BIF PORTMAPS LOOP --> </xsl:element> </xsl:for-each> <!-- END BIFS LOOP --> </xsl:if> <!-- END IF SHOW_BUSIFS --> <!-- PORTS part of a IOINTERFACE --> <xsl:if test="$SHOW_IOIF = 'TRUE'"> <xsl:for-each select="$m_iofs_all_[PORTMAPS/PORTMAP]"> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> <xsl:variable name="iifName_" select="@NAME"/> <xsl:variable name="iifRef_" select="self::node()"/> <xsl:variable name="portmapsRef_" select="$iifRef_/PORTMAPS"/> <xsl:variable name="is_external_"> <xsl:call-template name="F_IS_Interface_External"> <xsl:with-param name="iInstRef" select="$iModRef"/> <xsl:with-param name="iIntfRef" select="$iifRef_"/> </xsl:call-template> </xsl:variable> <xsl:variable name="iif_connection_"> <xsl:choose> <xsl:when test="($is_external_ ='TRUE')">Connected to External Ports</xsl:when> <xsl:otherwise>Not connected to External Ports</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:element name="SET"> <xsl:attribute name="ID"><xsl:value-of select="@NAME"/></xsl:attribute> <xsl:attribute name="CLASS">IOINTERFACE.PORTS</xsl:attribute> <xsl:if test="$is_external_ = 'TRUE'"> <xsl:attribute name="IS_EXTERNAL">TRUE</xsl:attribute> </xsl:if> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="(IO_IF) {@NAME}"/> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="IOINTERFACE.CONNECTION" VALUE="{$iif_connection_}"/> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="{$iif_connection_}"/> <xsl:for-each select="$portmapsRef_/PORTMAP"> <xsl:variable name="portName_" select="@PHYSICAL"/> <xsl:variable name="portDir_" select="@DIR"/> <!-- <xsl:variable name="port_is_valid_"> <xsl:choose> <xsl:when test="$portRef_/@IS_VALID = 'FALSE'">FALSE</xsl:when> <xsl:otherwise>TRUE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:message><xsl:value-of select="$portName_"/> : <xsl:value-of select="$port_is_valid_"/> : <xsl:value-of select="$portRef_/@IS_VALID"/></xsl:message> --> <xsl:if test="$m_ports_def_[(@NAME = $portName_)]"> <!-- Only in map if port is valid --> <!-- <xsl:message><xsl:value-of select="$portName_"/> </xsl:message> --> <xsl:variable name="portRef_" select="$m_ports_def_[(@NAME = $portName_)]"/> <xsl:variable name="portSig_" select="$portRef_/@SIGNAME"/> <xsl:variable name="portSigIs_"> <xsl:choose> <xsl:when test="not($portRef_/@SIGIS)">__NONE__</xsl:when> <xsl:otherwise><xsl:value-of select="$portRef_/@SIGIS"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portSensi_"> <xsl:choose> <xsl:when test="($portRef_/@SENSITIVITY)"><xsl:value-of select="$portRef_/@SENSITIVITY"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portVecFormula_"> <xsl:choose> <xsl:when test="$portRef_/@VECFORMULA"><xsl:value-of select="$portRef_/@VECFORMULA"/></xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="portRange_"> <xsl:choose> <xsl:when test="$portRef_/@MSB and $portRef_/@LSB">[<xsl:value-of select="$portRef_/@MSB"/>:<xsl:value-of select="$portRef_/@LSB"/>]</xsl:when> <xsl:otherwise>__NONE__</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="WRITE_PORT_SET"> <xsl:with-param name="iName" select="$portName_"/> <xsl:with-param name="iDir" select="$portDir_"/> <xsl:with-param name="iSigName" select="$portSig_"/> <xsl:with-param name="iSigIs" select="$portSigIs_"/> <xsl:with-param name="iSensitivity" select="$portSensi_"/> <xsl:with-param name="iVecFormula" select="$portVecFormula_"/> <xsl:with-param name="iBifPortRef" select="$portRef_"/> <xsl:with-param name="iPortRange" select="$portRange_"/> </xsl:call-template> </xsl:if> <!-- End of port is valid check --> </xsl:for-each> <!-- END IO INTERFACE PORTMAPS LOOP --> </xsl:element> </xsl:for-each> <!-- END IIFS LOOP --> </xsl:if> <!-- END IF SHOW_IOIFS --> </SET> </xsl:for-each> <!-- End of the scoping for key functions--> </xsl:template> <xsl:template name="WRITE_VIEW_PORT_FLAT"> <xsl:if test="$G_DEBUG='TRUE'"> <xsl:message>WRITING PORT MODE <xsl:value-of select="@MODE"/></xsl:message> </xsl:if> <xsl:variable name="num_of_ext_ports_" select="count($G_SYS_EXPS/PORT)"/> <xsl:if test="$num_of_ext_ports_ &gt; 0"> <xsl:call-template name="WRITE_VIEW_EXTP_FLAT_SET"/> </xsl:if> <xsl:for-each select="$G_SYS_MODS/MODULE"> <xsl:sort data-type="number" select="@ROW_INDEX" order="ascending"/> <xsl:variable name="instName_" select="@INSTANCE"/> <xsl:variable name="moduleRef_" select="self::node()"/> <xsl:call-template name="WRITE_VIEW_PORT_FLAT_SET"> <xsl:with-param name="iModRef" select="$moduleRef_"/> </xsl:call-template> </xsl:for-each> <!-- End of Modules Loop --> </xsl:template> <xsl:template name="WRITE_VIEW_EXTP_FLAT_SET"> <xsl:for-each select="$G_SYS_EXPS"> <xsl:for-each select="PORT[(not(@IS_VALID) or (@IS_VALID = 'TRUE'))]"> <xsl:sort data-type="number" select="@MHS_INDEX" order="ascending"/> <xsl:variable name="ext_is_interrupt_"> <xsl:if test="@SIGIS = 'INTERRUPT'">TRUE</xsl:if> <xsl:if test="not(@SIGIS = 'INTERRUPT')">FALSE</xsl:if> </xsl:variable> <SET ID="{@NAME}" CLASS="PORT"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE" VALUE="External Ports"/> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Port Name" NAME="NAME" VALUE="{@NAME}"/> <xsl:choose> <xsl:when test="@LEFT and @RIGHT"> <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@LEFT"/>:<xsl:value-of select="@RIGHT"/>]</xsl:variable> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"> <TOOLTIP><qt><xsl:value-of select="$vecformula_txt_"/></qt></TOOLTIP> </VARIABLE> </xsl:when> <xsl:when test="@MSB and @LSB"> <xsl:variable name="vecformula_txt_">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:variable> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$vecformula_txt_}"> <TOOLTIP><qt><xsl:value-of select="$vecformula_txt_"/></qt></TOOLTIP> </VARIABLE> </xsl:when> <xsl:when test="(not(@MSB) and not(@LSB) and not(@SIGIS = 'CLK') and not(@SIGIS = 'CLOCK') and not(@SIGIS = 'DCMCLK') and not(@SIGIS = 'RST') and not(@SIGIS = 'RESET'))"> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Range" NAME="VECFORMULA" VALUE=""/> </xsl:when> </xsl:choose> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_EDITABLE="TRUE"/> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Direction" NAME="DIR" VALUE="{@DIR}"/> <xsl:if test="(@SIGIS)"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="{@SIGIS}"/> </xsl:if> <xsl:if test="not(@SIGIS)"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Class" NAME="SIGIS" VALUE="NONE"/> </xsl:if> <xsl:if test="(@SIGIS = 'RST' or @SIGIS = 'RESET')"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Reset Polarity" NAME="RSTPOLARITY" VALUE="{@RSTPOLARITY}"/> </xsl:if> <xsl:if test="((@SIGIS = 'CLK') or (@SIGIS = 'CLOCK') or (@SIGIS = 'DCMCLK'))"> <VARIABLE VIEWTYPE="TEXTBOX" VIEWDISP="Frequency(Hz)" NAME="CLKFREQUENCY" VALUE="{@CLKFREQUENCY}"/> </xsl:if> <xsl:if test="((@SIGIS = 'CLK') or (@SIGIS = 'CLOCK') or (@SIGIS = 'DCMCLK'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Differential Polarity" NAME="DIFFPOLARITY" VALUE="{@DIFFPOLARITY}"/> </xsl:if> <!-- SENSITIVITY Settings on Interrupt ports --> <xsl:choose> <xsl:when test="((@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and not(@SENSITIVITY))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE=""/> </xsl:when> <xsl:when test="((@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and (@SENSITIVITY))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/> </xsl:when> <xsl:when test="((@SIGNAME = '__DEF__') and ($ext_is_interrupt_ = 'TRUE') and not(@SENSITIVITY))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE=""/> </xsl:when> <xsl:when test="((@SIGNAME = '__DEF__') and ($ext_is_interrupt_ = 'TRUE') and (@SENSITIVITY))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/> </xsl:when> <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and not(@SENSITIVITY))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE=""/> </xsl:when> <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($ext_is_interrupt_ = 'TRUE') and (@SENSITIVITY))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/> </xsl:when> </xsl:choose> </SET> </xsl:for-each> </xsl:for-each> </xsl:template> <xsl:template name="WRITE_VIEW_PORT_FLAT_SET"> <xsl:param name="iModRef" select="'__NONE__'"/> <xsl:variable name="m_inst_" select="$iModRef/@INSTANCE"/> <xsl:variable name="m_class_" select="$iModRef/@MODCLASS"/> <xsl:variable name="m_type_" select="$iModRef/@MODTYPE"/> <xsl:variable name="m_type_lc_" select="translate($m_type_,&UPPER2LOWER;)"/> <xsl:variable name="m_version_" select="$iModRef/@HWVERSION"/> <xsl:variable name="m_licinfo_" select="$iModRef/LICENSEINFO"/> <xsl:variable name="is_axi_interconnect_"> <xsl:choose> <xsl:when test="$m_type_ = 'axi_interconnect'">TRUE</xsl:when> <xsl:when test="$m_type_lc_ = 'axi_interconnect'">TRUE</xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:for-each select="$G_SYS_MODS"> <!-- To put things in the right scope for the keys below --> <xsl:variable name="m_bifs_all_" select="key('G_MAP_ALL_BIFS', $m_inst_)"/> <xsl:variable name="m_ports_all_" select="key('G_MAP_ALL_PORTS',$m_inst_)"/> <xsl:if test="$G_DEBUG = 'TRUE'"> <xsl:message><xsl:value-of select="$m_inst_"/> has <xsl:value-of select="count($m_ports_all_)"/> valid ports </xsl:message> </xsl:if> <xsl:for-each select="$m_ports_all_"> <xsl:sort data-type="number" select="@MPD_INDEX" order="ascending"/> <!-- <xsl:message>PORTNM : <xsl:value-of select="@NAME"/></xsl:message> --> <xsl:variable name="p_nm_uc_" select="translate(@NAME,&LOWER2UPPER;)"/> <xsl:variable name="p_bif_" select="@BUS"/> <xsl:variable name="port_is_valid_"> <xsl:choose> <xsl:when test="@IS_VALID = 'FALSE'">FALSE</xsl:when> <xsl:when test="(($is_axi_interconnect_ = 'TRUE') and ($p_nm_uc_= 'INTERCONNECT_ACLK'))">TRUE</xsl:when> <xsl:when test="not(@BUS) or (@BUS and key('G_MAP_ALL_BIFS', $m_inst_)[(@NAME = $p_bif_)])">TRUE</xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:if test="$port_is_valid_ = 'TRUE'"> <!-- <xsl:message>PORT <xsl:value-of select="@BUS"/>.<xsl:value-of select="@NAME"/></xsl:message> --> <SET ID="{@NAME}" CLASS="PORT"> <!-- CR452579 Can only modify INSTANCE name in Hierarchal view. --> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Instance" NAME="INSTANCE" VALUE="{$m_inst_}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Type" NAME="MODTYPE" VALUE="{$m_type_}" VIEWICON="{$m_licinfo_/@ICON_NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="IP Version" NAME="HWVERSION" VALUE="{$m_version_}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Port Name" NAME="NAME" VALUE="{@NAME}"/> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Direction" NAME="DIR" VALUE="{@DIR}"/> <xsl:if test="@SIGIS"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Class" NAME="SIGIS" VALUE="{@SIGIS}"/> </xsl:if> <xsl:choose> <xsl:when test="@MSB and @LSB"> <xsl:variable name="portRange_txt_">[<xsl:value-of select="@MSB"/>:<xsl:value-of select="@LSB"/>]</xsl:variable> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$portRange_txt_}"> <TOOLTIP><qt><xsl:value-of select="@VECFORMULA"/></qt> </TOOLTIP> </VARIABLE> </xsl:when> </xsl:choose> <xsl:if test="@SENSITIVITY"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{@SENSITIVITY}"/> </xsl:if> <xsl:variable name="is_interrupt"> <xsl:if test="@SIGIS = 'INTERRUPT'">TRUE</xsl:if> <xsl:if test="not(@SIGIS = 'INTERRUPT')">FALSE</xsl:if> </xsl:variable> <xsl:variable name="is_input"> <xsl:choose> <xsl:when test="(@DIR= 'I')">TRUE</xsl:when> <xsl:when test="(@DIR= 'IN')">TRUE</xsl:when> <xsl:when test="(@DIR= 'INPUT')">TRUE</xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- VECFORMULA Settings if Interrupt settings --> <xsl:choose> <xsl:when test="((@SIGNAME = '__NOC__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and not(@VECFORMULA))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:when test="((@SIGNAME = '__NOC__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and (@VECFORMULA))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="@SIGNAME = '__NOC__'"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_EDITABLE="TRUE"/> </xsl:when> <xsl:when test="((@SIGNAME = '__DEF__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and not(@VECFORMULA))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:when test="((@SIGNAME = '__DEF__') and ($is_interrupt = 'TRUE') and ($is_input = 'TRUE') and (@VECFORMULA))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="@SIGNAME = '__DEF__'"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection"/> </xsl:when> <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and (@VECFORMULA))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="(not(@SIGNAME = '__DEF__') and not(@SIGNAME = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:otherwise> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{@SIGNAME}" IS_EDITABLE="TRUE"/> </xsl:otherwise> </xsl:choose> </SET> </xsl:if> <!-- End of port validity check --> </xsl:for-each> <!-- End of Ports Loop --> </xsl:for-each> </xsl:template> <xsl:template name="WRITE_PORT_SET"> <xsl:param name="iName" select="'__NONE__'"/> <xsl:param name="iDir" select="'__NONE__'"/> <xsl:param name="iSigName" select="'__NONE__'"/> <xsl:param name="iSigIs" select="'__NONE__'"/> <xsl:param name="iVecFormula" select="'__NONE__'"/> <xsl:param name="iSensitivity" select="'__NONE__'"/> <xsl:param name="iBifPortRef" select="'__NONE__'"/> <xsl:param name="iPortRange" select="'__NONE__'"/> <SET ID="{$iName}" CLASS="PORT"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="NAME" NAME="NAME" VALUE="{$iName}"/> <xsl:variable name="is_interrupt"> <xsl:if test="$iSigIs = 'INTERRUPT'">TRUE</xsl:if> <xsl:if test="not($iSigIs = 'INTERRUPT')">FALSE</xsl:if> </xsl:variable> <xsl:variable name="is_input"> <xsl:choose> <xsl:when test="($iDir = 'I')">TRUE</xsl:when> <xsl:when test="($iDir = 'IN')">TRUE</xsl:when> <xsl:when test="($iDir = 'INPUT')">TRUE</xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="(($iSigName = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and ($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:when test="(($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="$iSigName = '__NOC__'"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="No Connection" IS_EDITABLE="TRUE"/> </xsl:when> <xsl:when test="(($iSigName = '__DEF__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and ($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:when test="(($iSigName = '__DEF__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="($iSigName = '__DEF__')"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="Default Connection"/> </xsl:when> <xsl:when test="(not($iSigName = '__DEF__') and not($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{$iSigName}" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="(not($iSigName = '__DEF__') and not($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE'))"> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{$iSigName}" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:otherwise> <VARIABLE VIEWTYPE="DROPDOWN" VIEWDISP="Net" NAME="SIGNAME" VALUE="{$iSigName}" IS_EDITABLE="TRUE"/> </xsl:otherwise> </xsl:choose> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Direction" NAME="DIR" VALUE="{$iDir}"/> <xsl:if test="not($iSigIs = '__NONE__')"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Class" NAME="SIGIS" VALUE="{$iSigIs}"/> </xsl:if> <xsl:if test="not($iPortRange = '__NONE__')"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Range" NAME="VECFORMULA" VALUE="{$iPortRange}" > <TOOLTIP><qt><xsl:value-of select="$iVecFormula"/></qt></TOOLTIP> </VARIABLE> </xsl:if> <xsl:if test="not($iSensitivity = '__NONE__')"> <VARIABLE VIEWTYPE="STATIC" VIEWDISP="Sensitivity" NAME="SENSITIVITY" VALUE="{$iSensitivity}"/> </xsl:if> <xsl:choose> <xsl:when test="(($iSigName = '__NOC__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and ($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:when test="(($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="No Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="(($iSigName = '__DEF__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and ($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:when test="(($iSigName = '__DEF__') and ($is_input = 'TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="Default Connection" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="(not($iSigName = '__DEF__') and not($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE') and not($iVecFormula = '__NONE__'))"> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="{$iSigName}" IS_INTERRUPT="{$is_interrupt}" IS_RANGE="TRUE"/> </xsl:when> <xsl:when test="(not($iSigName = '__DEF__') and not($iSigName = '__NOC__') and ($is_input ='TRUE') and ($is_interrupt = 'TRUE'))"> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" VALUE="{$iSigName}" IS_INTERRUPT="{$is_interrupt}"/> </xsl:when> <xsl:otherwise> <VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" /> </xsl:otherwise> </xsl:choose> <xsl:variable name="noOFConnections" select="count(CONNECTIONS/CONNECTION)" /> <xsl:if test="$noOFConnections != 0" > <!--VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" /--> <CONNECTIONS> <xsl:for-each select="CONNECTIONS/CONNECTION" > <xsl:variable name="iInstance" select="@INSTANCE"/> <xsl:variable name="iPort" select="@PORT"/> <xsl:choose> <xsl:when test="@BUSINTERFACE"> <xsl:variable name="iBusName" select="@BUSINTERFACE"/> <CONNECTION INSTANCE="{$iInstance}" PORT="{$iPort}" BUSINTERFACE="{$iBusName}"/> </xsl:when> <xsl:when test="@PORT"> <CONNECTION INSTANCE="{$iInstance}" PORT="{$iPort}"/> </xsl:when> <xsl:otherwise> <CONNECTION INSTANCE="{$iInstance}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </CONNECTIONS> </xsl:if> <!-->xsl:message Check for bus interface ports --> <xsl:if test="$iBifPortRef != '__NONE__'"> <!--ANUJDEBUG VALUE="WRITINF INTERFACE PORT"/--> <xsl:variable name="noOfIfConnections" select="$iBifPortRef/CONNECTIONS/CONNECTION"/> <xsl:if test="$noOfIfConnections != 0"> <!--VARIABLE VIEWTYPE="LISTVIEW" VIEWDISP="Connected Port" NAME="CONNECTIVITY" /--> <CONNECTIONS> <xsl:for-each select="$iBifPortRef/CONNECTIONS/CONNECTION" > <xsl:variable name="iInstance" select="@INSTANCE"/> <xsl:variable name="iPort" select="@PORT"/> <xsl:choose> <xsl:when test="@BUSINTERFACE"> <xsl:variable name="iBusName" select="@BUSINTERFACE"/> <CONNECTION INSTANCE="{$iInstance}" PORT="{$iPort}" BUSINTERFACE="{$iBusName}"/> </xsl:when> <xsl:otherwise> <CONNECTION INSTANCE="{$iInstance}" PORT="{$iPort}"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </CONNECTIONS> </xsl:if> </xsl:if> </SET> </xsl:template> </xsl:stylesheet>
<reponame>hanshuebner/cadr2<filename>doc/lmman-6ed-xml/to-fo.xsl<gh_stars>10-100 <?xml version="1.0" encoding="iso-8859-1" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" > <xsl:output indent="yes" /> <xsl:template match="/document-root"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="A4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="2cm" margin-left="2.5cm" margin-right="2.5cm"> <fo:region-body margin-top="3cm"/> <fo:region-before extent="3cm"/> <fo:region-after extent="3cm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="A4"> <fo:static-content flow-name="xsl-region-after"> <fo:block text-align="end">Page <fo:page-number/></fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <xsl:apply-templates/> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="document-part"> <xsl:apply-templates/> </xsl:template> <!-- including other files --> <xsl:template match="include"> <xsl:apply-templates select="document(concat(@file, '.xml'))"/> </xsl:template> <!-- structural elements --> <xsl:template match="chapter"> <fo:block font-family="sans-serif" font-size="25pt" break-before="page"> <xsl:value-of select="@number"/>.<xsl:value-of select="' '"/><xsl:value-of select="@title"/> </fo:block> <xsl:apply-templates/> </xsl:template> <xsl:template match="section"> <!-- <a name="{@name}-section"/> xxx --> <fo:block id="{@name}-section" font-family="sans-serif" font-size="20pt" space-before="24pt" space-after="12pt"> <xsl:value-of select="@chapter-number"/>.<xsl:value-of select="@number"/><xsl:value-of select="' '"/><xsl:value-of select="@title"/> </fo:block> <xsl:apply-templates/> </xsl:template> <xsl:template match="p"> <fo:block text-align="start" font-family="serif" margin-left="5mm" space-after="12pt"> <xsl:if test="@indent = '1'"> <xsl:attribute text-indent="5mm">indented</xsl:attribute> </xsl:if> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="group"> <fo:block font-family="serif"> <!-- xxx --> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="pre"> <fo:block font-family="monospace" white-space-collapse="false" wrap-option="no-wrap"> <xsl:apply-templates select="*|text()"/> </fo:block> </xsl:template> <xsl:template match="center"> <fo:block font-family="sans-serif" font-size="16pt"><xsl:apply-templates/></fo:block> </xsl:template> <!-- hyperlinks --> <xsl:template match="a"> <!-- <fo:block line-height="0pt" space-after="0pt" font-size="0pt" id="{@name}"/> --> <!-- <a name="{@name}"/> xxx --> </xsl:template> <xsl:template match="index-entry"> <!-- <fo:block line-height="0pt" space-after="0pt" font-size="0pt" id="{@title}"/> --> <!-- <a name="{@title}"/> xxx --> </xsl:template> <xsl:template match="definition"> <fo:block space-before="12pt"> <!-- xxx --> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="define"> <fo:block id="{@key}"> <!-- xxx --> <fo:block> <!-- <a name="{@key}"/> --> <fo:inline font-weight="bold"><xsl:value-of select="@name"/></fo:inline> <xsl:value-of select="' '"/> <xsl:apply-templates/> <xsl:value-of select="' '"/> <fo:inline font-family="serif" font-style="italic" text-align="end"> <xsl:choose> <xsl:when test="@type = 'message'">Message</xsl:when> <xsl:when test="@type = 'fun'">Function</xsl:when> <xsl:when test="@type = 'method'">Method</xsl:when> <xsl:when test="@type = 'metamethod'">Meta-Method</xsl:when> <xsl:when test="@type = 'const'">Constant</xsl:when> <xsl:when test="@type = 'condition'">Condition</xsl:when> <xsl:when test="@type = 'spec'">Special Form</xsl:when> <xsl:when test="@type = 'mac'">Macro</xsl:when> <xsl:when test="@type = 'flavor'">Flavor</xsl:when> <xsl:when test="@type = 'flavor-condition'">Flavor Condition</xsl:when> <xsl:when test="@type = 'condition-flavor'">Condition Flavor</xsl:when> <xsl:when test="@type = 'var'">Variable</xsl:when> <xsl:when test="@type = 'initoption'">Initialization Option</xsl:when> <xsl:when test="@type = 'meter'">Meter</xsl:when> <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise> </xsl:choose> </fo:inline> </fo:block> </fo:block> </xsl:template> <xsl:template match="args"> <fo:inline font-family="serif"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="description"> <fo:block font-family="serif" margin-left="1cm" space-before="6pt"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="ref"> <xsl:if test="@key != ''"> <fo:basic-link color="blue" internal-destination="@{key}">Page <fo:page-number-citation ref-id="{@key}"/></fo:basic-link> </xsl:if> <!-- <a href="{@definition-in-file}.xml#{@key}"><xsl:value-of select="@title"/></a> xxx --> </xsl:template> <xsl:template match="a"> <!-- <a href="{@href}"><xsl:apply-templates/></a> xxx --> </xsl:template> <!-- font selections --> <xsl:template match="standard"> <fo:inline font-family="serif"><xsl:apply-templates/></fo:inline> </xsl:template> <xsl:template match="obj"> <fo:inline font-family="sans-serif" font-size="80%"><xsl:apply-templates/></fo:inline> </xsl:template> <xsl:template match="arg"> <fo:inline font-style="italic"><xsl:apply-templates/></fo:inline> </xsl:template> <xsl:template match="lisp"> <fo:block font-family="monospace" white-space-collapse="false" wrap-option="no-wrap"><xsl:apply-templates select="*|text()"/></fo:block> </xsl:template> <!-- tables --> <xsl:template match="table"> <!-- <table> <tbody> --> <fo:block> <xsl:apply-templates/> </fo:block> <!-- </tbody> </table> --> </xsl:template> <xsl:template match="tr"> <!-- <tr> --> <xsl:apply-templates/> <!-- </tr> --> </xsl:template> <xsl:template match="td"> <!-- <td> --> <xsl:apply-templates/> <!-- </td> --> </xsl:template> </xsl:stylesheet>
<reponame>npocmaka/Windows-Server-2003 <?xml version="1.0" encoding="iso-8859-1"?> <!-- simple xslt file: sce_inf.xsl --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ssr="http://microsoft.com/sce/ssr" > <!-- These are some XSLT extension functions --> <xsl:import href="../CommonLib/ExtFunctions.xsl"/> <xsl:output method="text" indent="no"/> <msxsl:script language="JScript" implements-prefix="ssr"> <!-- do not analyze xml syntax --> <![CDATA[ // // We need to use 2, 3, and 4 for automatic, manual, and disabled // startup mode inside INF template. // function GetStartupMode(svc) { var strMode = AttribValue(svc, "StartupMode").toUpperCase(); if (strMode == "AUTOMATIC") return 2; else if (strMode == "MANUAL") return 3; else if (strMode == "DISABLED") return 4; else return 0; } ]]> </msxsl:script> <xsl:template match="/SSRSecurityPolicy/Services"> [Unicode] Unicode=yes [Version] signature="$CHICAGO$" Revision=1 ' This section will setup the services according to the settings of the ' security policy. 2 = automatic, 3 = manual, and 4 = disabled [Service General Setting] <xsl:for-each select="Service"> <xsl:variable name="svc" select="."/> <xsl:variable name="startupmode" select="ssr:GetStartupMode($svc)"/> <xsl:if test="$startupmode != 0"> <xsl:value-of select="ssr:AttribValue($svc, 'Name')"/>,<xsl:value-of select="$startupmode"/>,"" </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>
<reponame>LaudateCorpus1/RosettaCodeData <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:m="http://rosettacode.org/wiki/Stable_marriage_problem" xmlns:t="http://rosettacode.org/wiki/Stable_marriage_problem/temp" exclude-result-prefixes="xsl xs fn t m"> <xsl:output indent="yes" encoding="UTF-8" omit-xml-declaration="yes" /> <xsl:strip-space elements="*" /> <xsl:template match="*"> <xsl:copy> <xsl:apply-templates select="@*,node()" /> </xsl:copy> </xsl:template> <xsl:template match="@*|comment()|processing-instruction()"> <xsl:copy /> </xsl:template> <xsl:template match="m:interest" mode="match-making"> <m:engagement> <m:dude name="{../@name}" /><m:maid name="{.}" /> </m:engagement> </xsl:template> <xsl:template match="m:dude" mode="match-making"> <!-- 3. Reject suitors cross-off the maids that spurned them. --> <xsl:param name="eliminations" select="()" /> <m:dude name="{@name}"> <xsl:copy-of select="for $b in @name return m:interest[not(. = $eliminations[m:dude/@name=$b]/m:maid/@name)]" /> </m:dude> </xsl:template> <xsl:template match="*" mode="perturbation"> <xsl:copy> <xsl:apply-templates select="@*,node()" mode="perturbation"/> </xsl:copy> </xsl:template> <xsl:template match="@*" mode="perturbation"> <xsl:copy /> </xsl:template> <xsl:template match="m:engagement[position() lt 3]/m:maid/@name" mode="perturbation"> <!-- Swap maids 1 and 2. --> <xsl:copy-of select="for $c in count(../../preceding-sibling::m:engagement) return ../../../m:engagement[2 - $c]/m:maid/@name" /> </xsl:template> <xsl:template match="m:stable-marriage-problem"> <xsl:variable name="population" select="m:dude|m:maid" /> <xsl:variable name="solution"> <xsl:call-template name="solve-it"> <xsl:with-param name="dudes" select="m:dude" /> <xsl:with-param name="maids" select="m:maid" tunnel="yes" /> </xsl:call-template> </xsl:variable> <xsl:variable name="perturbed"> <xsl:apply-templates select="$solution/*" mode="perturbation" /> </xsl:variable> <m:stable-marriage-problem-result> <m:solution is-stable="{t:is-stable( $population, $solution/*)}"> <xsl:copy-of select="$solution/*" /> </m:solution> <m:message>Perturbing the matches! Swapping <xsl:value-of select="$solution/*[1]/m:maid/@name" /> for <xsl:value-of select="$solution/*[2]/m:maid/@name" /></m:message> <m:message><xsl:choose> <xsl:when test="t:is-stable( $population, $perturbed/*)"> <xsl:text>The perturbed configuration is stable.</xsl:text> </xsl:when> <xsl:otherwise>The perturbed configuration is unstable.</xsl:otherwise> </xsl:choose></m:message> </m:stable-marriage-problem-result> </xsl:template> <xsl:template name="solve-it"> <xsl:param name="dudes" as="element()*" /> <!-- Sequence of m:dude --> <xsl:param name="maids" as="element()*" tunnel="yes" /> <!-- Sequence of m:maid --> <xsl:param name="engagements" as="element()*" select="()" /> <!-- Sequence of m:engagement --> <!-- 1. For each dude not yet engaged, and has a preference, propose to his top preference. --> <xsl:variable name="fresh-proposals"> <xsl:apply-templates select="$dudes[not(@name = $engagements/m:dude/@name)]/m:interest[1]" mode="match-making" /> </xsl:variable> <xsl:variable name="proposals" select="$engagements | $fresh-proposals/m:engagement" /> <!-- 2. For each maid with conflicting suitors, reject all but the most attractive (for her) proposal. --> <xsl:variable name="acceptable" select="$proposals[ for $g in m:maid/@name, $b in m:dude/@name, $this-interest in $maids[@name=$g]/m:interest[.=$b] return every $interest in for $other-b in $proposals[m:maid[@name=$g]]/m:dude/@name[. ne $b] return $maids[@name=$g]/m:interest[.=$other-b] satisfies $interest >> $this-interest ]" /> <!-- 3. Reject suitors cross-off the maids that spurned them. --> <xsl:variable name="new-dudes"> <xsl:apply-templates select="$dudes" mode="match-making"> <xsl:with-param name="eliminations" select="$fresh-proposals/m:engagement" /> </xsl:apply-templates> </xsl:variable> <!-- 4. Test for finish. If not, loop back for another round of proposals. --> <xsl:choose> <xsl:when test="$dudes[not(for $b in @name return $acceptable[m:dude/@name=$b])]"> <xsl:call-template name="solve-it"> <xsl:with-param name="dudes" select="$new-dudes/m:dude" /> <xsl:with-param name="engagements" select="$acceptable" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$acceptable" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:function name="t:is-stable" as="xs:boolean"> <xsl:param name="population" as="element()*" /> <xsl:param name="engagements" as="element()*" /> <xsl:sequence select=" every $e in $engagements, $b in string($e/m:dude/@name), $g in string($e/m:maid/@name), $desired-g in $population/self::m:dude[@name=$b]/m:interest[$g=following-sibling::m:interest], $desired-maid in $population/self::m:maid[@name=$desired-g] satisfies not( $desired-maid/m:interest[.=$b] &lt;&lt; $desired-maid/m:interest[.=$engagements[m:maid[@name=$desired-g]]/m:dude/@name]) " /> </xsl:function> </xsl:stylesheet>
<gh_stars>10-100 <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <DIV STYLE="padding:.3in .1in .3in .3in; font-family:Arial Black; background-color:chocolate; background-image=URL(swallows.jpg)"> <xsl:for-each select="CIM//VALUE.NAMEDOBJECT/INSTANCE"> <TABLE> <TR> <TD COLSPAN="2"> <xsl:apply-templates select="PROPERTY[@NAME='Description']"/> </TD> <TD STYLE="padding-left:1em"> <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow"> Device ID <SPAN STYLE="color:white"><xsl:value-of select="PROPERTY[@NAME='DeviceID']/VALUE"/></SPAN> </DIV> <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; margin-top:1em; font-style:italic; font-size:18pt; color:white"> <xsl:value-of select="PROPERTY[@NAME='Description']/VALUE"/> </DIV> </TD> </TR> <TR> <TD><DIV STYLE="color:white; font:10pt. Verdana; font-style:italic; font-weight:normal"><xsl:value-of select="PROPERTY[@NAME='FileSystem']/VALUE"/></DIV></TD> <TD><DIV STYLE="text-align:right; color:white; font:10pt. Verdana; font-style:italic; font-weight:normal"><xsl:value-of select="PROPERTY[@NAME='VolumeSerialNumber']/VALUE"/></DIV></TD> <TD></TD> </TR> <TR> <TD COLSPAN="2"> <DIV STYLE="margin:2px; padding:0em .5em; background-color:orange; color:white"> Size: <xsl:value-of select="PROPERTY[@NAME='Size']/VALUE"/> </DIV> <DIV STYLE="margin:2px; padding:0em .5em; background-color:orange; color:white"> FreeSpace: <xsl:value-of select="PROPERTY[@NAME='FreeSpace']/VALUE"/> </DIV> </TD> <TD STYLE="text-align:right; font:10pt Verdana; font-style:italic; color:yellow"> <DIV STYLE="margin-top:.5em; font-weight:bold"> <xsl:apply-templates select="PROPERTY[@NAME='SupportsFileBasedCompression']"/> </DIV> </TD> </TR> </TABLE> </xsl:for-each> </DIV> </xsl:template> <xsl:template match="PROPERTY[@NAME='Description']"> <xsl:choose> <xsl:when test="VALUE[. $eq$ '3 1/2 Inch Floppy Drive']"> <IMG src="J0174139.WMF" width="200" height="200"></IMG> </xsl:when> <xsl:when test="VALUE[. $eq$ 'CD-ROM Disc']"> <IMG src="J0174137.WMF" width="200" height="200"></IMG> </xsl:when> <xsl:when test="VALUE[. $eq$ 'Network Connection']"> <IMG src="BS00369.WMF" width="200" height="200"></IMG> </xsl:when> <xsl:otherwise> <IMG src="J0174133.WMF" width="200" height="200"></IMG> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="PROPERTY[@NAME='SupportsFileBasedCompression']"> <xsl:choose> <xsl:when test="VALUE[. $eq$ 'TRUE']">This device supports file-based compression</xsl:when> <xsl:otherwise>This device does NOT support file-based compression</xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:include href="./licenselocale.xsl"/> <xsl:include href="./support.xsl" /> <xsl:output method="xml" encoding="utf-8" indent="yes"/> <xsl:template match="answers"> <xsl:apply-templates/> </xsl:template> <xsl:variable name="license-base" select="'http://creativecommons.org/licenses/'"/> <xsl:template match="work-info"/> <xsl:template match="locale" /> <xsl:template match="license-standard"> <xsl:variable name="license-uri"> <xsl:variable name="jurisdiction"> <xsl:if test="./jurisdiction != '' and ./jurisdiction != '-'"><xsl:value-of select="concat(./jurisdiction,'/')"/></xsl:if> </xsl:variable> <xsl:variable name="version"> <xsl:call-template name="version"> <xsl:with-param name="specified_version" select="./version"/> <xsl:with-param name="jurisdiction" select="./jurisdiction" /> </xsl:call-template> </xsl:variable> <xsl:variable name="noncommercial"> <xsl:if test="./commercial='n'">-nc</xsl:if> </xsl:variable> <xsl:variable name="derivatives"> <xsl:choose> <xsl:when test="./derivatives='n'">-nd</xsl:when> <xsl:when test="./derivatives='sa'">-sa</xsl:when> </xsl:choose> </xsl:variable> <xsl:value-of select="concat($license-base,'by',$noncommercial,$derivatives,'/',$version,'/',$jurisdiction)"/> </xsl:variable> <xsl:variable name="license-name"> <xsl:variable name="jurisdiction"> <xsl:variable name="j_name"> <xsl:call-template name="license-jurisdiction"> <xsl:with-param name="jurisdiction" select="./jurisdiction"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat(' ', $j_name)" /> </xsl:variable> <xsl:variable name="version"> <xsl:variable name="version_num"> <xsl:call-template name="version"> <xsl:with-param name="specified_version" select="./version"/> <xsl:with-param name="jurisdiction" select="./jurisdiction" /> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat(' ', $version_num)"/> </xsl:variable> <xsl:variable name="attribution"> <xsl:call-template name="attribution"/> </xsl:variable> <xsl:variable name="noncommercial"> <xsl:call-template name="noncommercial"> <xsl:with-param name="commercial" select="./commercial"/> </xsl:call-template> </xsl:variable> <xsl:variable name="derivatives"> <xsl:call-template name="derivatives"> <xsl:with-param name="derivs" select="./derivatives"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="concat($attribution,$noncommercial,$derivatives,$version,$jurisdiction)"/> </xsl:variable> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="$license-uri"/> <xsl:with-param name="license-name" select="$license-name"/> </xsl:call-template> </xsl:template> <xsl:template match="license-publicdomain"> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="concat($license-base,'publicdomain/')"/> <xsl:with-param name="license-name" select="'Public Domain'"/> </xsl:call-template> </xsl:template> <xsl:template match="license-recombo"> <xsl:variable name="license-uri"> <xsl:variable name="stype"> <xsl:if test="./sampling='sampling'">sampling</xsl:if> <xsl:if test="./sampling='samplingplus'">sampling+</xsl:if> <xsl:if test="./sampling='ncsamplingplus'">nc-sampling+</xsl:if> </xsl:variable> <xsl:variable name="jurisdiction"> <xsl:choose> <xsl:when test="(./sampling='ncsamplingplus' and ./jurisdiction='br') or (./sampling!='samplingplus' and ./jurisdiction='de')"/> <xsl:when test="./jurisdiction != '' and ./jurisdiction != '-'"><xsl:value-of select="concat(./jurisdiction,'/')"/></xsl:when> <xsl:otherwise/> </xsl:choose> </xsl:variable> <xsl:value-of select="concat($license-base,$stype,'/1.0/',$jurisdiction)"/> </xsl:variable> <xsl:variable name="license-name"> <xsl:if test="./sampling='sampling'">Sampling 1.0</xsl:if> <xsl:if test="./sampling='samplingplus'">Sampling Plus 1.0</xsl:if> <xsl:if test="./sampling='ncsamplingplus'">NonCommercial Sampling Plus 1.0</xsl:if> </xsl:variable> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="$license-uri"/> <xsl:with-param name="license-name" select="$license-name"/> </xsl:call-template> </xsl:template> <xsl:template match="license-gpl"> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="concat($license-base,'GPL/2.0/')"/> <xsl:with-param name="license-name" select="'GNU General Public License'"/> </xsl:call-template> </xsl:template> <xsl:template match="license-lgpl"> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="concat($license-base,'LGPL/2.1/')"/> <xsl:with-param name="license-name" select="'GNU Lesser General Public License'"/> </xsl:call-template> </xsl:template> <xsl:template match="license-bsd"> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="concat($license-base,'BSD/')"/> <xsl:with-param name="license-name" select="'BSD License'"/> </xsl:call-template> </xsl:template> <xsl:template match="license-devnations"> <xsl:call-template name="output"> <xsl:with-param name="license-uri" select="concat($license-base, 'devnations/2.0/')"/> <xsl:with-param name="license-name" select="'Developing Nations License'"/> </xsl:call-template> </xsl:template> <xsl:template name="rdf"> <xsl:param name="license-uri"/> <xsl:variable name="license-uri-rdf"> <xsl:value-of select="$license-uri"/> </xsl:variable> <rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <Work rdf:about="{/answers/work-info/work-url}"> <xsl:if test="/answers/work-info/title"> <dc:title><xsl:value-of select="/answers/work-info/title"/></dc:title> </xsl:if> <xsl:if test="/answers/work-info/type"> <dc:type rdf:resource="http://purl.org/dc/dcmitype/{/answers/work-info/type}"/> </xsl:if> <xsl:if test="/answers/work-info/year"> <dc:date><xsl:value-of select="/answers/work-info/year" /></dc:date> </xsl:if> <xsl:if test="/answers/work-info/description"> <dc:description><xsl:value-of select="/answers/work-info/description" /></dc:description> </xsl:if> <xsl:if test="/answers/work-info/creator"> <dc:creator><Agent><xsl:value-of select="/answers/work-info/creator" /></Agent></dc:creator> </xsl:if> <xsl:if test="/answers/work-info/holder"> <dc:rights><Agent><xsl:value-of select="/answers/work-info/holder" /></Agent></dc:rights> </xsl:if> <xsl:if test="/answers/work-info/source-url"> <dc:source rdf:resource="{/answers/work-info/source-url}" /> </xsl:if> <license rdf:resource="{$license-uri-rdf}"/> </Work> <License rdf:about="{$license-uri-rdf}"> <permits rdf:resource="http://creativecommons.org/ns#Reproduction"/> <xsl:choose> <xsl:when test="starts-with($license-uri,concat($license-base,'sampling+/'))"> <permits rdf:resource="http://creativecommons.org/ns#Sharing"/> </xsl:when> <xsl:when test="not(starts-with($license-uri,concat($license-base,'sampling/')))"> <permits rdf:resource="http://creativecommons.org/ns#Distribution"/> </xsl:when> </xsl:choose> <xsl:choose> <xsl:when test="contains($license-uri,'publicdomain')"> <rdfs:subClassOf rdf:resource="http://creativecommons.org/ns#PublicDomain"/> </xsl:when> <xsl:otherwise> <requires rdf:resource="http://creativecommons.org/ns#Notice"/> </xsl:otherwise> </xsl:choose> <xsl:if test="not(contains($license-uri,'publicdomain') or contains($license-uri,'GPL'))"> <requires rdf:resource="http://creativecommons.org/ns#Attribution"/> </xsl:if> <xsl:if test="contains($license-uri,'GPL') or contains($license-uri,'BSD')"> <requires rdf:resource="http://creativecommons.org/ns#SourceCode" /> </xsl:if> <xsl:if test="contains($license-uri,'-nc') or contains($license-uri, 'nc-')"> <prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse"/> </xsl:if> <xsl:if test="not(contains($license-uri,'-nd'))"> <permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/> </xsl:if> <xsl:if test="(contains($license-uri,'-sa') or contains($license-uri, 'GPL'))"> <requires rdf:resource="http://creativecommons.org/ns#ShareAlike"/> </xsl:if> </License> </rdf:RDF> </xsl:template> <xsl:template name="licenserdf"> <xsl:param name="license-uri"/> <xsl:variable name="license-uri-rdf"> <xsl:value-of select="$license-uri"/> </xsl:variable> <rdf:RDF xmlns="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <License rdf:about="{$license-uri-rdf}"> <permits rdf:resource="http://creativecommons.org/ns#Reproduction"/> <xsl:choose> <xsl:when test="starts-with($license-uri,concat($license-base,'sampling+/'))"> <permits rdf:resource="http://creativecommons.org/ns#Sharing"/> </xsl:when> <xsl:when test="not(starts-with($license-uri,concat($license-base,'sampling/')))"> <permits rdf:resource="http://creativecommons.org/ns#Distribution"/> </xsl:when> </xsl:choose> <xsl:if test="not(contains($license-uri,'publicdomain'))"> <requires rdf:resource="http://creativecommons.org/ns#Notice"/> </xsl:if> <xsl:if test="not(contains($license-uri,'publicdomain') or contains($license-uri,'GPL'))"> <requires rdf:resource="http://creativecommons.org/ns#Attribution"/> </xsl:if> <xsl:if test="contains($license-uri,'-nc')"> <prohibits rdf:resource="http://creativecommons.org/ns#CommercialUse"/> </xsl:if> <xsl:if test="contains($license-uri,'GPL') or contains($license-uri,'BSD')"> <requires rdf:resource="http://creativecommons.org/ns#SourceCode" /> </xsl:if> <xsl:if test="not(contains($license-uri,'-nd'))"> <permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/> </xsl:if> <xsl:if test="(contains($license-uri,'-sa') or contains($license-uri, 'GPL'))"> <requires rdf:resource="http://creativecommons.org/ns#ShareAlike"/> </xsl:if> <xsl:if test="contains($license-uri, 'devnations')"> <prohibits rdf:resource="http://creativecommons.org/ns#HighIncomeNationUse"/> </xsl:if> </License> </rdf:RDF> </xsl:template> <xsl:template name="html"> <xsl:param name="license-uri"/> <xsl:param name="license-name"/> <xsl:param name="rdf"/> <xsl:variable name="license-button"> <xsl:choose> <xsl:when test="contains($license-uri,'GPL')">http://i.creativecommons.org/l<xsl:value-of select="substring-after($license-uri,'http://creativecommons.org/licenses')"/>88x62.png</xsl:when> <xsl:otherwise>http://i.creativecommons.org/l<xsl:value-of select="substring-after($license-uri,'http://creativecommons.org/licenses')"/>88x31.png</xsl:otherwise> </xsl:choose> </xsl:variable> <a rel="license" href="{$license-uri}"><img alt="Creative Commons License" style="border-width:0" src="{$license-button}" /></a><br/> <xsl:call-template name="thiswork"> <xsl:with-param name="license_name" select="$license-name" /> <xsl:with-param name="license_url" select="$license-uri" /> </xsl:call-template> </xsl:template> <xsl:template name="output"> <xsl:param name="license-uri"/> <xsl:param name="license-name"/> <xsl:variable name="rdf"> <xsl:call-template name="rdf"> <xsl:with-param name="license-uri" select="$license-uri"/> </xsl:call-template> </xsl:variable> <xsl:variable name="licenserdf"> <xsl:call-template name="licenserdf"> <xsl:with-param name="license-uri" select="$license-uri"/> </xsl:call-template> </xsl:variable> <xsl:variable name="html"> <xsl:call-template name="html"> <xsl:with-param name="license-uri" select="$license-uri"/> <xsl:with-param name="license-name" select="$license-name"/> <xsl:with-param name="rdf" select="$rdf"/> </xsl:call-template> </xsl:variable> <result> <license-uri><xsl:value-of select="$license-uri"/></license-uri> <license-name><xsl:value-of select="$license-name"/></license-name> <rdf><xsl:copy-of select="$rdf"/></rdf> <licenserdf><xsl:copy-of select="$licenserdf"/></licenserdf> <html><xsl:copy-of select="$html"/></html> </result> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:str="http://exslt.org/strings" extension-element-prefixes="str"> <xsl:template match="/testsuite"> <html> <body> <style type="text/css"> body { /*max-width: 1200px;*/ /*margin: auto;*/ margin-left: 5%; margin-right: 10%; background-color: #446F6F; color: #121D1D; font-family: "Merriweather Sans", sans-serif; } section { background-color: white; margin-top: 1em; padding: 0em 0em 1em 0em; border-left: 4px solid #A8C2C2; box-shadow: 0px 0px 10px 2px black; } section.good { border-left-color: #18AF18; } section.bad-true { border-left-color: #DB1D1D; } section.bad-true.errwhole header { background-color: #DB1D1D; } section:last-child:after { display: block; clear: both; } header { margin: 0 0 0.5em 0; padding: 1em 1em 0.5em 1em; background-color: #A8C2C2; color: black; font-family: Merriweather, serif; font-weight: bold; } .entry, .message { padding: 0 1em 0 1em; } .entry, .message, .foldable { clear: both; } .entry > .value { display: block; float: right; } th, td { text-align: left; padding: 0 1em 0 1em; font-weight: normal; } table { width: 100%; } td { text-align: right; } tr.bad-true > td, .bad-true.message { font-weight: bold; color: #BD1515; } tr.good > td, .good.message { font-weight: bold; color: #109710; } .foldable > .control { padding: 0.5em 1em 0 1em; text-decoration: underline; color: #118383; } .foldable > .control:hover { color: #44C3C3; cursor: pointer; } .foldable > .contents { padding: 0.5em 1em 0.5em 1em; margin: 0.5em 0 0 0; background-color: #CDD3D3; color: black; font-family: Consolas, "Courier New", Courier, monospace; font-size: small; overflow-x: auto; white-space: nowrap; } .arrow { /*margin-left: 0.5em;*/ font-size: 75%; margin-right: 0.25em; } </style> <script type="text/javascript"> function getFirstChildWithClass(clazz, parent) { return document.evaluate("./*[contains(concat(' ', normalize-space(@class), ' '), ' "+clazz+" ')]", parent, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; } function toggleVisible(ctl, target) { var arrow = getFirstChildWithClass('arrow', ctl); if (target.style.display != 'none') { target.style.display = 'none'; arrow.textContent = '&#x25b6;'; } else { target.style.display = 'block'; arrow.textContent = '&#x25bc;'; } } </script> <!-- Summary section --> <section class="errwhole bad-{@errors &gt; 0 or @failures &gt; 0}"> <header>Summary</header> <table> <tr><th>Tests:</th><td><xsl:value-of select="@tests"/></td></tr> <tr class="bad-{@errors &gt; 0}"><th>Errors:</th><td><xsl:value-of select="@errors"/></td></tr> <tr class="bad-{@failures &gt; 0}"><th>Failures:</th><td><xsl:value-of select="@failures"/></td></tr> <tr><th>Skipped:</th><td><xsl:value-of select="@skipped"/></td></tr> </table> </section> <!-- Failed tests (if present) --> <xsl:if test="testcase/failure"> <section class="bad-true"> <header>Failed tests</header> <xsl:for-each select="testcase[failure]"> <xsl:sort select="concat(@classname, '.', @name)" /> <xsl:apply-templates select='.' /> </xsl:for-each> </section> </xsl:if> <!-- Passed tests tests --> <section class="good"> <header>Passed tests</header> <xsl:for-each select="testcase[not(failure)]"> <xsl:sort select="concat(@classname, '.', @name)" /> <xsl:apply-templates select='.' /> </xsl:for-each> </section> <script type="text/javascript"> document.querySelectorAll('.foldable').forEach((e) => { var ctl = getFirstChildWithClass('control', e); var target = getFirstChildWithClass('contents', e); ctl.onclick = function() {toggleVisible(ctl, target);}; ctl.click(); }); </script> </body> </html> </xsl:template> <!-- Transform one test case --> <xsl:template match="testcase"> <xsl:variable name="clazz"> <xsl:choose> <xsl:when test='./failure'>bad-true</xsl:when> <xsl:otherwise>good</xsl:otherwise> </xsl:choose> </xsl:variable> <div class="{$clazz} foldable testcase"> <div class="control"> <div style="float:left" class="arrow"></div> <div style="float:left"> <xsl:value-of select="@classname"/>.<xsl:value-of select="@name"/> </div> <div style="float:right"> <xsl:value-of select="@time"/> </div> <div style="clear:both"></div> </div> <div class="contents"> <xsl:apply-templates select="system-out"/> </div> </div> </xsl:template> <!-- Strip absolute paths from test output --> <xsl:template match="system-out"> <xsl:for-each select='str:tokenize(./text(), "&#10;")'> <xsl:choose> <xsl:when test="contains(., 'CTU_CAN_FD/')"><xsl:value-of select="substring-after(., 'CTU_CAN_FD/')" /></xsl:when> <xsl:when test="contains(., 'CAN_FD_IP_Core/')"><xsl:value-of select="substring-after(., 'CAN_FD_IP_Core/')" /></xsl:when> <xsl:otherwise><xsl:value-of select="." /></xsl:otherwise> </xsl:choose><br /> </xsl:for-each> </xsl:template> </xsl:stylesheet>
<gh_stars>1-10 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" /> <xsl:template match="/"> <!-- 1. first item element --> <xsl:text> The first item element is</xsl:text> <xsl:value-of select="//item[1]" /> <!-- 2. Print each price element --> <xsl:text> The prices are: </xsl:text> <xsl:for-each select="//price"> <xsl:text> </xsl:text> <xsl:copy-of select="." /> </xsl:for-each> <!-- 3. Collect all the name elements --> <xsl:text> The names are: </xsl:text> <xsl:copy-of select="//name" /> </xsl:template> </xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" /> <xsl:variable name="alpha">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</xsl:variable> <xsl:variable name="rot13">NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm</xsl:variable> <xsl:template match="body"> <xsl:apply-templates/> </xsl:template> <xsl:template match="rot13"> <xsl:value-of select="translate(.,$alpha,$rot13)"/> </xsl:template> </xsl:stylesheet>
<filename>install/web_includes/sfw_ulselect.xsl <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" version="1.0" indent="yes" omit-xml-declaration="yes" encoding="UTF-8"/> <!-- The control consists of a three-part cluster, followed by a temporary drop-down section with a list of options. The three-part cluster consists of the following: 1. A "defacto" span element that shows the dereferenced selection value(s), 2. An unnamed input element used to accept the user's typed input, and 3. A named, disabled, and invisible input element whose contents are sent to the server as part of the form POST. --> <!-- Modeless attribute match for like-named field of proper type in hosting schema. --> <xsl:template match="@*[local-name()=ancestor::schema/field[@type='ulselect']/@name]"> <xsl:variable name="field" select="ancestor::schema/field[@name=local-name(current())]" /> <xsl:call-template name="fill_ulselect_defacto"> <xsl:with-param name="field" select="$field" /> <xsl:with-param name="str" select="." /> </xsl:call-template> </xsl:template> <!-- Generic template for rebuilding the options list --> <xsl:template match="field[@type='ulselect']"> <xsl:variable name="result" select="/*/*[@rndx][local-name()=current()/@result]" /> <xsl:variable name="value"> <xsl:apply-templates select="." mode="get_ulselect_value" /> </xsl:variable> <xsl:if test="$value and $result"> <xsl:apply-templates select="$result/*" mode="construct_ulselect_option"> <xsl:with-param name="list" select="concat(',',$value,',')" /> </xsl:apply-templates> </xsl:if> </xsl:template> <!-- Template to display error if the field does not include a result attribute. --> <xsl:template match="field[@type='ulselect']" mode="construct_input"> <span>The ulselect field <xsl:value-of select="@name" /> failed to specify a result.</span> </xsl:template> <!-- ulselect templates are in sfw_ulselect.xsl. In order to use the contents of sfw_ulselect.xsl, the following template, whose priority ensures appropriate selection, accesses the imported templates explicitly. --> <xsl:template match="field[@type='ulselect'][@result]" mode="construct_input"> <xsl:param name="data" /> <xsl:call-template name="construct_ulselect_input"> <xsl:with-param name="field" select="." /> <xsl:with-param name="data" select="$data" /> </xsl:call-template> </xsl:template> <xsl:template match="field" mode="get_ulselect_value"> <xsl:variable name="sresult" select="../following-sibling::*[@rndx][1]" /> <xsl:variable name="hresult" select="../parent::*[not($sresult)][@rndx]" /> <xsl:variable name="result" select="$sresult|$hresult" /> <xsl:if test="$result"> <xsl:variable name="rname" select="$result/@row-name" /> <xsl:variable name="attr" select="$result/*[local-name()=$rname]/@*[local-name()=current()/@name]" /> <xsl:if test="$attr"> <xsl:value-of select="$attr" /> </xsl:if> </xsl:if> </xsl:template> <!-- This template builds the entire structure when building the form. That is: - The host ul with identifying attributes, - one li with: - a span to display the translated selections, - an input for saving and posting the ulselect's value - a second li with an ul containing the list of options For ease of parsing, a comma is added to the beginning and end of the value, so that all numbers in the value will start and end with a comma. --> <xsl:template name="construct_ulselect_input"> <xsl:param name="field" /> <xsl:param name="data" /> <xsl:variable name="value" select="$data/@*[local-name()=$field/@name]" /> <xsl:variable name="list" select="concat(',',$value,',')" /> <xsl:variable name="lu_result" select="/*/*[local-name()=$field/@result]" /> <xsl:element name="ul"> <xsl:attribute name="name"><xsl:value-of select="$field/@name" /></xsl:attribute> <xsl:attribute name="class">ulselect</xsl:attribute> <xsl:attribute name="tabindex">0</xsl:attribute> <xsl:attribute name="data-sfw-class">ulselect</xsl:attribute> <xsl:attribute name="data-sfw-input">input</xsl:attribute> <xsl:if test="$field/@style='multiple'"> <xsl:attribute name="data-multiple">yes</xsl:attribute> </xsl:if> <xsl:if test="$field/@on_add"> <xsl:apply-templates select="$field/@on_add" mode="add_resolved_data_attribute" /> </xsl:if> <!-- <ul name="{$field/@name}" class="ulselect" --> <!-- data-sfw-class="ulselect" data-sfw-input="true"> --> <li class="cluster" tabindex="0"> <xsl:text>&#160;</xsl:text> <xsl:choose> <xsl:when test="$field/@style='multiple'"> <xsl:apply-templates select="$lu_result" mode="construct_ulselect_cluster_multiple"> <xsl:with-param name="field" select="$field" /> <xsl:with-param name="value" select="$value" /> </xsl:apply-templates> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="$lu_result" mode="construct_ulselect_cluster_single"> <xsl:with-param name="field" select="$field" /> <xsl:with-param name="value" select="$value" /> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </li> <li class="options_host"> <div> <ul class="ulselect_options"> <xsl:if test="not($field/@options='off')"> <xsl:apply-templates select="$lu_result/*" mode="construct_ulselect_option"> <xsl:with-param name="list" select="$list" /> <xsl:with-param name="style" select="$field/@style" /> </xsl:apply-templates> </xsl:if> </ul> </div> </li> </xsl:element> </xsl:template> <!-- Template matches a lookup result. --> <xsl:template match="*[@rndx]" mode="construct_ulselect_cluster_single"> <xsl:param name="field" /> <xsl:param name="value" /> <span class="defacto"> <xsl:text> </xsl:text> <xsl:variable name="sel" select="*[@id=$value]" /> <xsl:apply-templates select="$sel" mode="construct_ulselect_defacto_item" /> </span> <input type="text" class="typing" style="width:100%"/> <input type="text" disabled="disabled" class="transfer" name="{$field/@name}" value="{$value}" /> </xsl:template> <!-- This template should match a lookup result for reconciling the integer values in the $value parameter. Adds a space to ensure that an empty li element doesn't collapse. --> <xsl:template match="*[@rndx]" mode="construct_ulselect_cluster_multiple"> <xsl:param name="field" /> <xsl:param name="value" /> <span class="defacto"> <xsl:call-template name="fill_ulselect_defacto" > <xsl:with-param name="field" select="$field" /> <xsl:with-param name="lookup" select="." /> <xsl:with-param name="str" select="$value" /> </xsl:call-template> </span> <xsl:text> </xsl:text> <input type="text" class="typing" /> <input type="text" disabled="disabled" class="transfer" name="{$field/@name}" value="{$value}" /> </xsl:template> <!-- Recursive template that adds items to the "current selections" element. --> <xsl:template name="fill_ulselect_defacto"> <xsl:param name="field" /> <xsl:param name="str" /> <xsl:param name="lookup" select="/.." /> <xsl:text> </xsl:text> <xsl:variable name="found_lookup" select="/*[not($lookup)]/*[local-name()=$field/@result]" /> <xsl:variable name="result" select="$lookup|$found_lookup" /> <xsl:variable name="hascomma" select="contains($str,',')" /> <xsl:variable name="id"> <xsl:choose> <xsl:when test="$hascomma"> <xsl:value-of select="substring-before($str,',')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$str" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:apply-templates select="$result/*[@id=$id]" mode="construct_ulselect_defacto_item"> <xsl:with-param name="style" select="$field/@style" /> </xsl:apply-templates> <xsl:if test="$hascomma"> <xsl:call-template name="fill_ulselect_defacto"> <xsl:with-param name="field" select="$field" /> <xsl:with-param name="lookup" select="$result" /> <xsl:with-param name="str" select="substring-after($str,',')" /> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="*[@id]" mode="construct_ulselect_defacto_item"> <span>ulselect result <xsl:value-of select="local-name()" /> is missing a lookup attribute.</span> </xsl:template> <!-- Used by fill_ulselect_defacto to fill the "current selections" element. --> <xsl:template match="*[@id][../@lookup]" mode="construct_ulselect_defacto_item"> <xsl:param name="style" /> <xsl:variable name="aname" select="../@lookup" /> <span class="item"> <xsl:value-of select="@*[local-name()=$aname]" /> <xsl:if test="$style='multiple'"> <xsl:element name="span"> <xsl:attribute name="data-id"><xsl:value-of select="@id" /></xsl:attribute> <xsl:text>&#215;</xsl:text> </xsl:element> </xsl:if> </span> </xsl:template> <!-- This template should match a lookup result to reconcile integer values in $list with name strings. Fills a UL with available selection options. --> <xsl:template match="*" mode="construct_ulselect_option"> <xsl:param name="list" /> <xsl:param name="style" /> <xsl:variable name="aname" select="../@lookup" /> <xsl:element name="li"> <xsl:attribute name="data-value"><xsl:value-of select="@id" /></xsl:attribute> <xsl:attribute name="class"> <xsl:choose> <xsl:when test="contains($list,concat(',',@id,','))">in</xsl:when> <xsl:otherwise>out</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:value-of select="@*[local-name()=$aname]" /> </xsl:element> </xsl:template> <!-- Table field template --> <xsl:template match="schema/field[@type='ulselect']" mode="write_cell_content"> <xsl:param name="data" /> <xsl:call-template name="ulselect_write_cell_content"> <xsl:with-param name="str" select="$data/@*[local-name()=current()/@name]" /> <xsl:with-param name="lookup" select="/*/*[local-name()=current()/@result]" /> </xsl:call-template> </xsl:template> <xsl:template name="ulselect_write_cell_content"> <xsl:param name="lookup" /> <xsl:param name="str" /> <xsl:variable name="hascomma" select="contains($str,',')" /> <xsl:variable name="aname" select="$lookup/@lookup" /> <xsl:variable name="vid"> <xsl:choose> <xsl:when test="$hascomma"> <xsl:value-of select="substring-before($str,',')" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$str" /> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="$lookup/*[@id=$vid]/@*[local-name()=$aname]" /> <xsl:if test="$hascomma"> <xsl:text>, </xsl:text> <xsl:call-template name="ulselect_write_cell_content"> <xsl:with-param name="lookup" select="$lookup" /> <xsl:with-param name="str" select="substring-after($str,',')" /> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <xsl:apply-templates select="//IRETURNVALUE/VALUE"/> </xsl:template> <xsl:template match="VALUE"> The returned value is <STRONG><xsl:value-of/></STRONG> </xsl:template> </xsl:stylesheet>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <!-- Copyright (c) Microsoft Corporation. All rights reserved. --> <xsl:script language="VBScript"><![CDATA[ Option Explicit 'This stylesheet formats DMTF XML encoded CIM objects into a tabular 'format using carriage returns and space characters only. Dim sPXML Dim propname(128) Dim lenarr(128) Dim bN(128) Dim iLens Dim iLensMax Dim propvalue(2048, 128) Dim iRow iRow = -1 Dim iResultCount Function CountResults(n) iResultCount = iResultCount + 1 End Function Function PadIt(ilen) Dim i Dim pads i = ilen + 2 pads = " " while (i > len(pads)) pads = pads & pads wend PadIt = Left(pads, i) End Function Function GotInstance() iLensMax = iLens iLens = 0 iRow = iRow + 1 End Function Function GetValues(n) Dim child, iNum, i, strType If iRow = 0 Then 'this is the first row - set up the headers propname(iLens) = Me.Attributes.GetNamedItem("NAME").Value Else If propname(iLens) <> Me.Attributes.GetNamedItem("NAME").Value Then 'This is going to be messy - Find it or add it on the end End If End If If strcomp(Me.NodeName,"Property.Array",1) = 0 Then if (Me.hasChildNodes) then propvalue(iRow, iLens) = "{" iNum = Me.FirstChild.ChildNodes.Length i = 1 strType = Me.attributes.getNamedItem("TYPE").nodeValue For each child in Me.FirstChild.ChildNodes if (strType = "string") then propvalue(iRow, iLens) = propvalue(iRow, iLens) & """" & child.nodeTypedValue & """" elseif (strType = "char16") then propvalue(iRow, iLens) = propvalue(iRow, iLens) & "'" & child.nodeTypedValue & "'" else propvalue(iRow, iLens) = propvalue(iRow, iLens) & child.nodeTypedValue end if if (i <> iNum) then propvalue(iRow, iLens) = propvalue(iRow, iLens) & ", " end if i = i + 1 Next propvalue(iRow, iLens) = propvalue(iRow, iLens) & "}" end if ElseIf strcomp(Me.NodeName,"Property.Reference",1) = 0 Then dim valref, node, hostnode, localnamespace, namespacenode, keybindings, keybinding for each valref in Me.selectNodes("VALUE.REFERENCE") for each node in valref.selectNodes(".//NAMESPACEPATH") set hostnode = node.selectsinglenode("HOST") if not hostnode is nothing then propvalue(irow, ilens) = "\\" & hostnode.text end if set localnamespace = node.selectsinglenode("LOCALNAMESPACEPATH") if not localnamespace is nothing then for each namespacenode in localnamespace.selectnodes("NAMESPACE") propvalue(irow,ilens) = propvalue(irow,ilens) & "\" & namespacenode.attributes.getNamedItem("NAME").nodeValue next end if propvalue(irow,ilens) = propvalue(irow,ilens) & ":" next for each node in valref.selectNodes(".//INSTANCENAME") propvalue(irow,ilens) = propvalue(irow,ilens) & node.attributes.getNamedItem("CLASSNAME").nodevalue set keybindings = node.selectnodes("KEYBINDING") i = 0 for each keybinding in keybindings i = i + 1 if (i = 1) then propvalue(irow,ilens) = propvalue(irow,ilens) & "." end if propvalue(irow,ilens) = propvalue(irow,ilens) & keybinding.attributes.getnameditem("NAME").nodeValue & "=""" & _ keybinding.selectsinglenode("KEYVALUE").text & """" if (i <> keybindings.length) then propvalue(irow,ilens) = propvalue(irow,ilens) & "," end if next next next Else propvalue(iRow, iLens) = replace(replace(Me.nodeTypedValue, vbCr, ""), vbLF, "") End If iLens = iLens + 1 End Function Function DisplayValues(n) Dim sT Dim sV Dim i Dim j Dim k 'Determine the column widths 'look at the column headers first iLensMax = iLens iLens = 0 iRow = iRow + 1 i = 0 While i < iLensMax k = getlength(propname(i)) If k > lenarr(i) Then lenarr(i) = k End If i = i + 1 Wend 'look at the values i = 0 While i < iRow j = 0 While j < iLensMax k = getlength(propvalue(i, j)) If k > lenarr(j) Then lenarr(j) = k End If j = j + 1 Wend i = i + 1 Wend 'set up the column headers i = 0 While i < iLensMax j = lenarr(i) - getlength(propname(i)) sT = sT & propname(i) & PadIt(j) i = i + 1 Wend i = 0 While i < iRow j = 0 While j < iLensMax k = lenarr(j) - getlength(propvalue(i, j)) if bN(j)= 1 then sV = sV & PadIt(k-2) & propvalue(i, j) & " " Else sV = sV & propvalue(i, j) & PadIt(k) End If j = j + 1 Wend sV = sV & vbCrLf i = i + 1 Wend DisplayValues = sT & vbCrLf & sV End Function Function GetLength(str) Dim i, ch 'we have to manually compute length GetLength = 0 For i = 1 to len(str) ch = ascw(mid(str,i,1)) if (ch > 255) or (ch < 0) then GetLength = GetLength + 2 'assume two byte spaces else GetLength = GetLength + 1 end if Next End Function ]]></xsl:script> <xsl:template match="/"><xsl:apply-templates select="//RESULTS"/><xsl:apply-templates select="//INSTANCE"/><xsl:eval no-entities="true" language="VBScript">DisplayValues(this)</xsl:eval></xsl:template> <xsl:template match="RESULTS"><xsl:eval no-entities="true" language="VBScript">CountResults(this)</xsl:eval></xsl:template> <xsl:template match="INSTANCE"><xsl:eval language="VBScript">GotInstance()</xsl:eval><xsl:apply-templates select="PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE"/></xsl:template> <xsl:template match="PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE"><xsl:eval no-entities="true" language="VBScript">GetValues(this)</xsl:eval></xsl:template> </xsl:stylesheet>
<!-- 13 lines 7 code 4 comments 2 blanks --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Some comment --> <xsl:template match="A"> <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="iso-8859-1" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:import href="common.xsl"/> <xsl:param name="mode">xml</xsl:param> <xsl:key name="index" match="index-entry" use="@index"/> <xsl:output method="html" indent="yes" omit-xml-declaration="yes" doctype-public="-//W3C//DTD HTML 4.0 Strict//EN" /> <xsl:template match="/index"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Lisp Machine Manual - Index</title> <link rel="stylesheet" type="text/css" href="lmman.css" /> <script src="javascript.js" language="javascript" type="text/javascript"> </script> </head> <body> <xsl:call-template name="navigation"/> <h1>Concepts</h1> <ul> <xsl:apply-templates select="key('index', 'concepts')"> <xsl:sort select="@title"/> </xsl:apply-templates> </ul> <h1>Functions</h1> <ul> <xsl:apply-templates select="key('index', 'functions')"> <xsl:sort select="@title"/> </xsl:apply-templates> </ul> </body> </html> </xsl:template> <xsl:template match="index-entry"> <li><a index="{@index}" href="{@file}.xml#{@title}"><xsl:value-of select="@title"/></a></li> </xsl:template> <xsl:template match="text()" mode="toc"></xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <xsl:import href="sfw_uuescape.xsl" /> <!-- This template produces a string from the "str" param with tokens replaced with values included in document. --> <xsl:template name="resolve_refs"> <xsl:param name="str" /> <xsl:param name="row" select="/.." /> <xsl:param name="enclose" /> <xsl:param name="escape" /> <!-- The 'delim' is the character just after the { that indicates how the following work is interpreted. --> <xsl:variable name="delim"> <xsl:variable name="after" select="substring(substring-after($str,'{'),1,1)" /> <xsl:if test="$after and contains('@$!', $after)"> <xsl:value-of select="concat('{',$after)" /> </xsl:if> </xsl:variable> <xsl:variable name="before"> <xsl:if test="$delim"> <xsl:value-of select="substring-before($str, $delim)" /> </xsl:if> </xsl:variable> <xsl:variable name ="len_before" select="string-length($before)" /> <xsl:variable name="raw_ref"> <xsl:if test="starts-with($str,$delim)"> <xsl:variable name="end" select="substring-before($str,'}')" /> <xsl:if test="$end and not (contains($end,' '))"> <xsl:value-of select="substring($end, 3)" /> </xsl:if> </xsl:if> </xsl:variable> <xsl:variable name="ref_hints" select="substring-after($raw_ref,';')" /> <xsl:variable name="b_ref" select="substring-before($raw_ref,';')" /> <xsl:variable name="s_ref" select="substring($raw_ref,1 div boolean(string-length($b_ref)=0))" /> <xsl:variable name="ref" select="concat($b_ref, $s_ref)" /> <xsl:variable name="pval"> <xsl:choose> <xsl:when test="$len_before"> <xsl:value-of select="$before" /> </xsl:when> <xsl:when test="string-length($ref)"> <xsl:variable name="type" select="substring($str,1,2)" /> <xsl:choose> <xsl:when test="$type='{$'"> <xsl:call-template name="get_var_value"> <xsl:with-param name="name" select="$ref" /> </xsl:call-template> </xsl:when> <xsl:when test="$type='{@'"> <xsl:call-template name="get_data_value"> <xsl:with-param name="name" select="$ref" /> </xsl:call-template> </xsl:when> <xsl:when test="$type='{!'"> <xsl:choose> <xsl:when test="$row"> <xsl:apply-templates select="$row" mode="get_value_from_row"> <xsl:with-param name="name" select="$ref" /> </xsl:apply-templates> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat($delim, $ref, '}')" /> </xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> </xsl:when> <xsl:otherwise><xsl:value-of select="$str" /></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="val"> <xsl:choose> <!-- if in escape mode, replace references will be URL-escaped --> <xsl:when test="$escape='1' and string-length($raw_ref) and contains('$@',substring($delim,2,1))"> <xsl:call-template name="uuescape"> <xsl:with-param name="str" select="$pval" /> </xsl:call-template> </xsl:when> <xsl:otherwise><xsl:value-of select="$pval" /></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="after"> <xsl:choose> <xsl:when test="string-length($raw_ref) &gt; 0"> <xsl:value-of select="substring($str,string-length($raw_ref)+4)" /> </xsl:when> <xsl:when test="$len_before &gt; 0"> <xsl:value-of select="substring($str,($len_before)+1)" /> </xsl:when> </xsl:choose> </xsl:variable> <!-- Preserve and compress, if necessary, spaces on either end of the string, by surrounding the string with #s and removing them afterwards: --> <xsl:variable name="trimmed"> <xsl:variable name="extra" select="normalize-space(concat('#',$val,'#'))" /> <xsl:value-of select="substring($extra,2,string-length($extra) - 2)" /> </xsl:variable> <xsl:if test="string-length($trimmed) &gt; 0"> <xsl:choose> <xsl:when test="$enclose"> <xsl:call-template name="enclose_val"> <xsl:with-param name="str" select="$trimmed" /> <xsl:with-param name="tag" select="$enclose" /> <xsl:with-param name="hints" select="$ref_hints" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$trimmed" /> </xsl:otherwise> </xsl:choose> </xsl:if> <xsl:if test="string-length($after) &gt; 0"> <xsl:call-template name="resolve_refs"> <xsl:with-param name="str" select="$after" /> <xsl:with-param name="row" select="$row" /> <xsl:with-param name="enclose" select="$enclose" /> <xsl:with-param name="escape" select="$escape" /> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template match="@*" mode="resolve_refs"> <xsl:param name="escape" /> <xsl:call-template name="resolve_refs"> <xsl:with-param name="str" select="." /> <xsl:with-param name="escape" select="$escape" /> </xsl:call-template> </xsl:template> <!-- For resolving a @ reference, named attribute in a form-type result. --> <xsl:template name="get_data_value"> <xsl:param name="name" /> <xsl:variable name="results" select="/*/*[@rndx and not(@type='variables')]" /> <xsl:variable name="formrs" select="$results[count(*[local-name()=../@row-name])=1]" /> <xsl:variable name="rows" select="$formrs/*[local-name()=../@row-name]" /> <xsl:variable name="attrs" select="$rows/@*[local-name()=$name]" /> <xsl:if test="count($attrs)"> <xsl:value-of select="$attrs[1]" /> </xsl:if> </xsl:template> <xsl:template match="*[@rndx]" mode="get_var_value"> <xsl:param name="name" /> <xsl:variable name="row" select="*[local-name()=current()/@row-name]" /> <xsl:if test="$row"> <xsl:variable name="val" select="$row[1]/@*[local-name()=$name]" /> <xsl:if test="$val"> <xsl:value-of select="$val" /> </xsl:if> </xsl:if> </xsl:template> <xsl:template name="get_var_value"> <xsl:param name="name" /> <xsl:variable name="prime"> <xsl:apply-templates select="$vars" mode="get_var_value"> <xsl:with-param name="name" select="$name" /> </xsl:apply-templates> </xsl:variable> <xsl:choose> <xsl:when test="string-length($prime)"> <xsl:value-of select="$prime" /> </xsl:when> <xsl:when test="count($alt_vars) &gt; 0"> <xsl:apply-templates select="$alt_vars" mode="get_var_value"> <xsl:with-param name="name" select="$name" /> </xsl:apply-templates> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="*" mode="get_value_from_row"> <xsl:param name="name" /> <xsl:value-of select="current()/@*[local-name()=$name]" /> </xsl:template> <xsl:template name="add_enclose_attributes"> <xsl:param name="hints" /> <xsl:variable name="c_hint" select="substring-before($hints,'|')" /> <xsl:variable name="s_hint" select="substring($hints,1 div boolean(string-length($c_hint)=0))" /> <xsl:variable name="hint" select="concat($c_hint,$s_hint)" /> <xsl:variable name="name" select="normalize-space(substring-before($hint,'='))" /> <xsl:variable name="val" select="substring-after($hint,'=')" /> <xsl:attribute name="{$name}"> <xsl:value-of select="$val" /> </xsl:attribute> <xsl:if test="string-length($c_hint)&gt;0"> <xsl:call-template name="add_enclose_attributes"> <xsl:with-param name="hints" select="substring-after($hints,'|')" /> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="enclose_val"> <xsl:param name="str" /> <xsl:param name="tag" /> <xsl:param name="hints" /> <xsl:element name="{$tag}"> <xsl:if test="string-length($hints)&gt;0"> <xsl:call-template name="add_enclose_attributes"> <xsl:with-param name="hints" select="$hints" /> </xsl:call-template> </xsl:if> <xsl:value-of select="$str" /> </xsl:element> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>design,library,cell</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:apply-templates select="/edif/design"/> </xsl:template> <xsl:template match="design"> <xsl:value-of select="@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="cellref/libraryref/@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="cellref/@name"/> <xsl:text>&#10;</xsl:text> </xsl:template> </xsl:stylesheet>
<gh_stars>1-10 <xsl:template name="sort"> <xsl:param name="table" /> <xsl:param name="ordering" select="'lexicographic'" /> <xsl:param name="column" select="1" /> <xsl:param name="reversed" select="false()" /> ... </xsl:template>
<?xml version="1.0"?> <!-- edif2xml.exe test.edif xsl/test_refs.xsl @refs=data.txt 1. test.edif ファイルを読み込み 2. test_refs.xsl で変換 3. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:param name="refs"/> <xsl:template match="/"> <xsl:apply-templates select="$refs/data"/> </xsl:template> <xsl:template match="data"> <xsl:apply-templates select="dl"/> </xsl:template> <xsl:template match="dl"> <xsl:apply-templates select="dd"/> </xsl:template> <xsl:template match="dd"> <xsl:value-of select="text()"/> <xsl:text>&#10;</xsl:text> </xsl:template> </xsl:stylesheet>
<reponame>josema62/Memoria<gh_stars>1-10 <!-- from http://www.roesler-ac.de/wolfram/hello.htm --> <?xml version="1.0" encoding="utf-8"?> <!-- Hello World in XSL-FO --> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="LetterPage" page-width="8.5in" page-height="11in">? <fo:region-body region-name="PageBody" margin="0.7in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="LetterPage"> <fo:flow flow-name="PageBody"> <fo:block font-size="12pt" font-family="courier">Hello, World</fo:block> </fo:flow> </fo:page-sequence> </fo:root>
<reponame>LaudateCorpus1/RosettaCodeData<filename>Task/Function-definition/XSLT/function-definition.xslt <xsl:template name="product"> <xsl:param name="a" select="2"/> <xsl:param name="b" select="3"/> <fo:block>product = <xsl:value-of select="$a * $b"/></fo:block> </xsl:template> <xsl:call-template name="product"> <xsl:with-param name="a">4</xsl:with-param> <xsl:with-param name="b">5</xsl:with-param> </xsl:call-template>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" indent="yes" omit-xml-declaration="no"/> <xsl:strip-space elements="*"/> <xsl:param name="FPGA_DEVICE"/> <xsl:param name="CONSTRAINTS_FILE"/> <xsl:param name="STRATEGY_FILE"/> <xsl:param name="XCF_FILE"/> <xsl:param name="TOP_MODULE"/> <xsl:param name="TOP_MODULE_FILE"/> <xsl:param name="VERILOG_FILES"/> <xsl:param name="VHDL_FILES"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="BaliProject/@device"> <xsl:attribute name="device"> <xsl:value-of select="$FPGA_DEVICE"/> </xsl:attribute> </xsl:template> <xsl:template match="BaliProject/Implementation/Options/@top"> <xsl:attribute name="top"> <xsl:value-of select="$TOP_MODULE"/> </xsl:attribute> </xsl:template> <xsl:template match="BaliProject/Implementation/Options/@def_top"> <xsl:attribute name="def_top"> <xsl:value-of select="$TOP_MODULE"/> </xsl:attribute> </xsl:template> <xsl:template match="BaliProject/Implementation/Source[@type_short='LPF']/@name"> <xsl:attribute name="name"> <xsl:value-of select="$CONSTRAINTS_FILE"/> </xsl:attribute> </xsl:template> <xsl:template match="BaliProject/Implementation/Source[@type_short='Programming']/@name"> <xsl:attribute name="name"> <xsl:value-of select="$XCF_FILE"/> </xsl:attribute> </xsl:template> <xsl:template match="BaliProject/Strategy/@file"> <xsl:attribute name="file"> <xsl:value-of select="$STRATEGY_FILE"/> </xsl:attribute> </xsl:template> <xsl:template match="BaliProject/Implementation/Options"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> <xsl:call-template name="tokenize"> <xsl:with-param name="string" select="normalize-space($VHDL_FILES)"/> <xsl:with-param name="type" select="'VHDL'"/> </xsl:call-template> <xsl:call-template name="tokenize"> <xsl:with-param name="string" select="normalize-space($VERILOG_FILES)"/> <xsl:with-param name="type" select="'Verilog'"/> </xsl:call-template> </xsl:template> <xsl:template name="tokenize"> <xsl:param name="string"/> <xsl:param name="type"/> <xsl:choose> <xsl:when test="contains($string,' ')"> <xsl:element name="Source"> <xsl:attribute name="name"> <xsl:value-of select="substring-before($string,' ')"/> </xsl:attribute> <xsl:attribute name="type"> <xsl:value-of select="$type"/> </xsl:attribute> <xsl:attribute name="type_short"> <xsl:value-of select="$type"/> </xsl:attribute> <xsl:element name="Options"> <xsl:if test="substring-before($string,' ')=$TOP_MODULE_FILE"> <xsl:attribute name="top_module"> <xsl:value-of select="$TOP_MODULE"/> </xsl:attribute> </xsl:if> </xsl:element> </xsl:element> <xsl:call-template name="tokenize"> <xsl:with-param name="string" select="substring-after($string,' ')"/> <xsl:with-param name="type" select="$type"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:if test="$string != ''"> <xsl:element name="Source"> <xsl:attribute name="name"> <xsl:value-of select="$string"/> </xsl:attribute> <xsl:attribute name="type"> <xsl:value-of select="$type"/> </xsl:attribute> <xsl:attribute name="type_short"> <xsl:value-of select="$type"/> </xsl:attribute> <xsl:element name="Options"> <xsl:if test="$string=$TOP_MODULE_FILE"> <xsl:attribute name="top_module"> <xsl:value-of select="$TOP_MODULE"/> </xsl:attribute> </xsl:if> </xsl:element> </xsl:element> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
<reponame>mullikine/RosettaCodeData <xsl:template name="arithmetic"> <xsl:param name="a">5</xsl:param> <xsl:param name="b">2</xsl:param> <fo:block>a + b = <xsl:value-of select="$a + $b"/></fo:block> <fo:block>a - b = <xsl:value-of select="$a - $b"/></fo:block> <fo:block>a * b = <xsl:value-of select="$a * $b"/></fo:block> <fo:block>a / b = <xsl:value-of select="round($a div $b)"/></fo:block> <fo:block>a mod b = <xsl:value-of select="$a mod $b"/></fo:block> </xsl:template>
<filename>rtl/proj/lattice/include/scripts/xcf.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" indent="yes" omit-xml-declaration="no" doctype-system="IspXCF.dtd" /> <xsl:strip-space elements="*"/> <xsl:param name="FPGA_CHIP"/> <xsl:param name="CHIP_ID"/> <xsl:param name="MASK_FILE"/> <xsl:param name="BITSTREAM_FILE"/> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="ispXCF/Chain/Device/Name"> <Name><xsl:value-of select="$FPGA_CHIP"/></Name> </xsl:template> <xsl:template match="ispXCF/Chain/Device/PON"> <PON><xsl:value-of select="$FPGA_CHIP"/></PON> </xsl:template> <xsl:template match="ispXCF/Chain/Device/IDCode"> <IDCode><xsl:value-of select="$CHIP_ID"/></IDCode> </xsl:template> <xsl:template match="ispXCF/Chain/Device/File"> <File><xsl:value-of select="$BITSTREAM_FILE"/></File> </xsl:template> <xsl:template match="ispXCF/Chain/Device/FPGALoader/CPLDDevice/Device/Name"> <Name><xsl:value-of select="$FPGA_CHIP"/></Name> </xsl:template> <xsl:template match="ispXCF/Chain/Device/FPGALoader/CPLDDevice/Device/PON"> <PON><xsl:value-of select="$FPGA_CHIP"/></PON> </xsl:template> <xsl:template match="ispXCF/Chain/Device/FPGALoader/CPLDDevice/Device/IDCode"> <IDCode><xsl:value-of select="$CHIP_ID"/></IDCode> </xsl:template> <xsl:template match="ispXCF/Chain/Device/FPGALoader/CPLDDevice/Device/MaskFile"> <MaskFile><xsl:value-of select="$MASK_FILE"/></MaskFile> </xsl:template> <xsl:template match="ispXCF/Chain/Device/FPGALoader/FlashDevice/Device/File"> <File><xsl:value-of select="$BITSTREAM_FILE"/></File> </xsl:template> <xsl:template match="ispXCF/Chain/Device/FPGALoader/FPGADevice/Device/LocalChainList/LocalDevice/@file"> <xsl:attribute name="file"> <xsl:value-of select="$BITSTREAM_FILE"/> </xsl:attribute> </xsl:template> </xsl:stylesheet>
<filename>Task/Matrix-multiplication/XSLT-1.0/matrix-multiplication-2.xslt <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="html"/> <xsl:template match="/mult"> <table> <tr><td>╭</td><td colspan="{count(*[2]/*[1]/*)}"/><td>╮</td></tr> <xsl:call-template name="prodMM"> <xsl:with-param name="A" select="*[1]/*"/> <xsl:with-param name="B" select="*[2]/*"/> </xsl:call-template> <tr><td>╰</td><td colspan="{count(*[2]/*[1]/*)}"/><td>╯</td></tr> </table> </xsl:template> <xsl:template name="prodMM"> <xsl:param name="A"/> <xsl:param name="B"/> <xsl:if test="$A/*"> <tr> <td>│</td> <xsl:call-template name="prodVM"> <xsl:with-param name="a" select="$A[1]/*"/> <xsl:with-param name="B" select="$B"/> </xsl:call-template> <td>│</td> </tr> <xsl:call-template name="prodMM"> <xsl:with-param name="A" select="$A[position()>1]"/> <xsl:with-param name="B" select="$B"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="prodVM"> <xsl:param name="a"/> <xsl:param name="B"/> <xsl:param name="col" select="1"/> <xsl:if test="$B/*[$col]"> <td align="right"> <xsl:call-template name="prod"> <xsl:with-param name="a" select="$a"/> <xsl:with-param name="b" select="$B/*[$col]"/> </xsl:call-template> </td> <xsl:call-template name="prodVM"> <xsl:with-param name="a" select="$a"/> <xsl:with-param name="B" select="$B"/> <xsl:with-param name="col" select="$col+1"/> </xsl:call-template> </xsl:if> </xsl:template> <xsl:template name="prod"> <xsl:param name="a"/> <xsl:param name="b"/> <xsl:if test="not($a)">0</xsl:if> <xsl:if test="$a"> <xsl:variable name="res"> <xsl:call-template name="prod"> <xsl:with-param name="a" select="$a[position()>1]"/> <xsl:with-param name="b" select="$b[position()>1]"/> </xsl:call-template> </xsl:variable> <xsl:value-of select="$a[1] * $b[1] + $res"/> </xsl:if> </xsl:template> </xsl:stylesheet>
<reponame>tomo3136a/hw_utils <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="common.xsl"/> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>library,name</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:apply-templates select="edif/library"/> </xsl:template> <xsl:template match="library"> <xsl:value-of select="@name"/> <xsl:text>,</xsl:text> <xsl:apply-templates select="." mode="_name"/> <xsl:text>&#10;</xsl:text> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="arguments"> <xsl:for-each select="args"> <div> <xsl:value-of select="m"/>, <xsl:value-of select="n"/>: <xsl:call-template name="ackermann"> <xsl:with-param name="m" select="m"/> <xsl:with-param name="n" select="n"/> </xsl:call-template> </div> </xsl:for-each> </xsl:template> <xsl:template name="ackermann"> <xsl:param name="m"/> <xsl:param name="n"/> <xsl:choose> <xsl:when test="$m = 0"> <xsl:value-of select="$n+1"/> </xsl:when> <xsl:when test="$n = 0"> <xsl:call-template name="ackermann"> <xsl:with-param name="m" select="$m - 1"/> <xsl:with-param name="n" select="'1'"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:variable name="p"> <xsl:call-template name="ackermann"> <xsl:with-param name="m" select="$m"/> <xsl:with-param name="n" select="$n - 1"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="ackermann"> <xsl:with-param name="m" select="$m - 1"/> <xsl:with-param name="n" select="$p"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="common.xsl"/> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>library,cell,name,type</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:apply-templates select="edif/library/cell"/> </xsl:template> <xsl:template match="cell"> <xsl:value-of select="ancestor::library/@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="@name"/> <xsl:text>,</xsl:text> <xsl:apply-templates select="." mode="_name"/> <xsl:text>,</xsl:text> <xsl:value-of select="celltype"/> <xsl:text>&#10;</xsl:text> </xsl:template> </xsl:stylesheet>
<reponame>tomo3136a/hw_utils <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="common.xsl"/> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>library,cell,view,port#,property#</xsl:text> <xsl:text>&#10;</xsl:text> <xsl:apply-templates select="edif/library/cell/view/interface"/> </xsl:template> <xsl:template match="interface"> <xsl:value-of select="ancestor::library/@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="ancestor::cell/@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="ancestor::view/@name"/> <xsl:text>,</xsl:text> <xsl:value-of select="count(port)"/> <xsl:text>,</xsl:text> <xsl:value-of select="count(property)"/> <xsl:text>&#10;</xsl:text> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <DIV STYLE="BACKGROUND-COLOR: green"> <H1 STYLE="font-family:'Times New Roman';color: yellow">Property Information for Disk <xsl:value-of select="CIM//PROPERTY[@NAME='Caption']/VALUE"/> </H1> <DD> <TABLE STYLE="BACKGROUND-COLOR: light green; BORDER-BOTTOM: yellow ridge; BORDER-LEFT: yellow ridge; BORDER-RIGHT: yellow ridge; BORDER-TOP: yellow ridge;WIDTH: 75%"> <TR STYLE="font-size:12pt; font-family:Impact;color: gold"> <TD>Property</TD> <TD>Type</TD> <TD>Originating Class</TD> <TD>Value</TD> </TR> <xsl:for-each select="CIM//PROPERTY"> <TR STYLE="font-family:Georgia; font-size:12pt; padding:0px 6px;color: white"> <TD><xsl:value-of select="@NAME"/></TD> <TD><xsl:value-of select="@TYPE"/></TD> <TD><xsl:value-of select="@CLASSORIGIN"/></TD> <TD STYLE="font-family:'Courier New';color: yellow"><xsl:value-of select="VALUE"/></TD> </TR> </xsl:for-each> </TABLE> </DD> </DIV> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- ; XDOC Documentation System for ACL2 ; Copyright (C) 2009-2011 Centaur Technology ; ; Contact: ; Centaur Technology Formal Verification Group ; 7600-C N. Capital of Texas Highway, Suite 300, Austin, TX 78731, USA. ; http://www.centtech.com/ ; ; License: (An MIT/X11-style license) ; ; Permission is hereby granted, free of charge, to any person obtaining a ; copy of this software and associated documentation files (the "Software"), ; to deal in the Software without restriction, including without limitation ; the rights to use, copy, modify, merge, publish, distribute, sublicense, ; and/or sell copies of the Software, and to permit persons to whom the ; Software is furnished to do so, subject to the following conditions: ; ; The above copyright notice and this permission notice shall be included in ; all copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ; DEALINGS IN THE SOFTWARE. ; ; Original author: <NAME> <<EMAIL>> html-topic.xsl Converts an xdoc topic page to a static html page. This is basically html-core.xsl, with .html file extensions on <see> links. --> <xsl:include href="html-core.xsl"/> <xsl:template match="parent"> <p>Parent: <a href="{@topic}.html"> <xsl:value-of select="."/> </a></p> </xsl:template> <xsl:template match="see"> <a href="{@topic}.html"> <xsl:apply-templates/> </a> </xsl:template> <xsl:template match="hindex"> <li><nobr><xsl:choose> <xsl:when test="@kind='leaf'"> <img src="leaf.png"/> </xsl:when> <xsl:when test="@kind='show'"> <a href="JavaScript:toggleVisible('{@id}')"> <img id="img-{@id}" src="minus.png" border="0"/> </a> </xsl:when> <xsl:when test="@kind='hide'"> <a href="JavaScript:toggleVisible('{@id}')"> <img id="img-{@id}" src="plus.png" border="0"/> </a> </xsl:when> </xsl:choose> <a href="{@topic}.html" title="{hindex_short}"> <xsl:value-of select="hindex_name"/> </a></nobr> <xsl:apply-templates/> </li> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method='text' standalone='yes' encoding="utf-8"/> <xsl:template match="/"> <xsl:variable name="col"><xsl:text> </xsl:text></xsl:variable> <xsl:variable name="offset"><xsl:value-of select="string-length($col)"/></xsl:variable> <xsl:for-each select="report/header"> +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:text>| Windows Event Trace Session Report v. </xsl:text> <xsl:value-of select="version"/> <xsl:text> |</xsl:text> +-----------------------------------------------------------------------------------------------------------------------------------+ | | <xsl:if test="string-length(build) > 0"> <xsl:text>| Build : </xsl:text><xsl:value-of select="build"/> <xsl:value-of select="substring($col, $offset - 116 + string-length(build) )"/>| </xsl:if> <xsl:if test="string-length(computer_name) > 0"> <xsl:text>| Computer : </xsl:text><xsl:value-of select="computer_name"/> <xsl:value-of select="substring($col, $offset - 116 + string-length(computer_name) )"/>| </xsl:if> <xsl:if test="string-length(processors) > 0"> <xsl:text>| Processors: </xsl:text><xsl:value-of select="processors"/> <xsl:value-of select="substring($col, $offset - 116 + string-length(processors) )"/>| </xsl:if> <xsl:if test="string-length(cpu_speed) > 0"> <xsl:text>| CPU Speed : </xsl:text><xsl:value-of select="cpu_speed"/><xsl:text> </xsl:text><xsl:value-of select="cpu_speed/@units"/> <xsl:value-of select="substring($col, $offset - 112 + string-length(cpu_speed) )"/>| </xsl:if> <xsl:if test="string-length(memory) > 0"> <xsl:text>| Memory : </xsl:text><xsl:value-of select="memory"/><xsl:text> </xsl:text><xsl:value-of select="memory/@units"/> <xsl:value-of select="substring($col, $offset - 113+ string-length(memory) )"/>| </xsl:if> <xsl:for-each select="trace"> <xsl:text>| |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| Trace Name: </xsl:text><xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 116 + string-length(@name) )"/>| <xsl:text>| File Name : </xsl:text><xsl:value-of select="file"/> <xsl:value-of select="substring($col, $offset - 116 + string-length(file) )"/>| <xsl:text>| Start Time: </xsl:text><xsl:value-of select="start"/><xsl:text> </xsl:text><xsl:value-of select="duration_window"/> <xsl:value-of select="substring($col, $offset - 112 + string-length(start) + string-length(duration_window) )"/>| <xsl:text>| End Time : </xsl:text><xsl:value-of select="end"/> <xsl:value-of select="substring($col, $offset - 116 + string-length(end) )"/>| <xsl:text>| Duration : </xsl:text><xsl:value-of select="duration"/><xsl:text> sec</xsl:text> <xsl:value-of select="substring($col, $offset - 112 + string-length(duration) )"/>| </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Http Requests Response Time Statistics']"> <xsl:variable name="total_rate"><xsl:value-of select="sum(requests/rate)"/></xsl:variable> +-----------------------------------------------------------------------------------------------------------------------------------+ | Http Requests Response Time Statistics | +---------------------+-------------------------------------------------------------------------------------------------------------+ | Request Type | Rate/sec Resp. Time (ms) Http.sys % W3 % Filter % ISAPI % ASP % CGI % | +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| Cached (Static) |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/rate) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='true' and @type='Static HTTP']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='true' and @type='Static HTTP']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(requests[@cached='true' and @type='Static HTTP']/response_time, '0.00')) )"/> <xsl:value-of select="format-number(requests[@cached='true' and @type='Static HTTP']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| Non Cached Requests |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/rate) )"/> <xsl:value-of select="summary[@cached='false']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 4 + string-length(format-number(summary[@cached='false']/rate/@percent, '0.0')) )"/> <xsl:value-of select="format-number( summary[@cached='false']/rate/@percent, '0.0' )"/> <xsl:text>%)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(summary[@cached='false']/response_time, '0.00')) )"/> <xsl:value-of select="format-number( summary[@cached='false']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(summary[@cached='false']/component[@name='UL']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='W3']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='W3Fltr']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='ISAPI']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='ASP']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='CGI']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| --- ASP |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='ASP']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='ASP']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(requests[@cached='false' and @type='ASP']/response_time,'0.00')) )"/> <xsl:value-of select="format-number(requests[@cached='false' and @type='ASP']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(requests[@cached='false' and @type='ASP']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| --- Static (miss) |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='Static HTTP']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='Static HTTP']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(requests[@cached='false' and @type='Static HTTP']/response_time,'0.00')) )"/> <xsl:value-of select="format-number(requests[@cached='false' and @type='Static HTTP']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| --- CGI |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='CGI']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='CGI']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(requests[@cached='false' and @type='CGI']/response_time, '0.00')) )"/> <xsl:value-of select="format-number(requests[@cached='false' and @type='CGI']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(requests[@cached='false' and @type='CGI']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> <xsl:if test="string-length(requests[@cached='false' and @type='Error']/rate)"> <xsl:value-of select="'&#xA;'"/> <xsl:text>| --- Error |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='Error']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='Error']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(requests[@cached='false' and @type='Error']/response_time, '0.00')) )"/> <xsl:value-of select="format-number(requests[@cached='false' and @type='Error']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(requests[@cached='false' and @type='Error']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> </xsl:if> +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| Total |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/rate) )"/> <xsl:value-of select="summary[@type='totals']/rate"/> <xsl:text> (100.0%)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(format-number(summary[@type='totals']/response_time, '0.00')) )"/> <xsl:value-of select="format-number(summary[@type='totals']/response_time, '0.00')"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(summary[@type='totals']/component[@name='UL']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='W3']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='W3Fltr']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='ISAPI']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='ASP']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='CGI']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> +---------------------+-------------------------------------------------------------------------------------------------------------+ </xsl:for-each> <xsl:for-each select="report/table[@title='Http Requests CPU Time Usage Statistics']"> <xsl:variable name="total_rate"><xsl:value-of select="sum(requests/rate)"/></xsl:variable> +-----------------------------------------------------------------------------------------------------------------------------------+ | Http Requests CPU Time Usage Statistics | +---------------------+-------------------------------------------------------------------------------------------------------------+ | Request Type | Rate/sec % CPU Http.sys % W3 % Filter % ISAPI % ASP % CGI % | +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| Cached (Static) |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/rate) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='true' and @type='Static HTTP']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='true' and @type='Static HTTP']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(requests[@cached='true' and @type='Static HTTP']/cpu) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='true' and @type='Static HTTP']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='true' and @type='Static HTTP']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| Non Cached Requests |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/rate) )"/> <xsl:value-of select="summary[@cached='false']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 4 + string-length(format-number(summary[@cached='false']/rate/@percent, '0.0')) )"/> <xsl:value-of select="format-number( summary[@cached='false']/rate/@percent, '0.0' )"/> <xsl:text>%)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(summary[@cached='false']/cpu) )"/> <xsl:value-of select="summary[@cached='false']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(summary[@cached='false']/component[@name='UL']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='W3']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='W3Fltr']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='ISAPI']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='ASP']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@cached='false']/component[@name='CGI']) )"/> <xsl:value-of select="summary[@cached='false']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| --- ASP |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='ASP']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='ASP']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(requests[@cached='false' and @type='ASP']/cpu) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(requests[@cached='false' and @type='ASP']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='ASP']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='ASP']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| --- Static (miss) |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='Static HTTP']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='Static HTTP']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(requests[@cached='false' and @type='Static HTTP']/cpu) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Static HTTP']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Static HTTP']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| --- CGI |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='CGI']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='CGI']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(requests[@cached='false' and @type='CGI']/cpu) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(requests[@cached='false' and @type='CGI']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='CGI']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='CGI']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> <xsl:if test="string-length(requests[@cached='false' and @type='Error']/rate)"> <xsl:value-of select="'&#xA;'"/> <xsl:text>| --- Error |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/rate) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/rate"/> <xsl:text> (</xsl:text> <xsl:value-of select="substring($col, $offset - 5 + string-length(format-number((requests[@cached='false' and @type='Error']/rate div $total_rate), '0.0%' )) )"/> <xsl:value-of select="format-number((requests[@cached='false' and @type='Error']/rate div $total_rate), '0.0%' )"/> <xsl:text>)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(requests[@cached='false' and @type='Error']/cpu) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(requests[@cached='false' and @type='Error']/component[@name='UL']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='W3']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='W3Fltr']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='ISAPI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='ASP']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(requests[@cached='false' and @type='Error']/component[@name='CGI']) )"/> <xsl:value-of select="requests[@cached='false' and @type='Error']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> </xsl:if> +---------------------+-------------------------------------------------------------------------------------------------------------+ <xsl:text>| Total |</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/rate) )"/> <xsl:value-of select="summary[@type='totals']/rate"/> <xsl:text> (100.0%)</xsl:text> <xsl:value-of select="substring($col, $offset - 19 + string-length(summary[@type='totals']/cpu) )"/> <xsl:value-of select="summary[@type='totals']/cpu"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 11 + string-length(summary[@type='totals']/component[@name='UL']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='UL']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='W3']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='W3']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='W3Fltr']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='W3Fltr']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='ISAPI']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='ISAPI']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='ASP']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='ASP']"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 9 + string-length(summary[@type='totals']/component[@name='CGI']) )"/> <xsl:value-of select="summary[@type='totals']/component[@name='CGI']"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text> +---------------------+-------------------------------------------------------------------------------------------------------------+ </xsl:for-each> <xsl:for-each select="report/table[@title='Most Requested URLs']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Most Requested URLs | +----------------------------------------------------------------------------------+------------------------------------------------+ | URL | SiteID Rate/sec Cached Resp Time(ms)| +----------------------------------------------------------------------------------+------------------------------------------------+ <xsl:for-each select="url"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 80 + string-length(@name) )"/> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(site_id) )"/> <xsl:value-of select="site_id"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(cache_hit) )"/> <xsl:value-of select="cache_hit"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+----------------------------------------------------------------------------------+------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Most Requested Static URLs']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Most Requested Static URLs | +----------------------------------------------------------------------------------+------------------------------------------------+ | URL | SiteID Rate/sec Cached Resp Time(ms)| +----------------------------------------------------------------------------------+------------------------------------------------+ <xsl:for-each select="url"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 80 + string-length(@name) )"/> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(site_id) )"/> <xsl:value-of select="site_id"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(cache_hit) )"/> <xsl:value-of select="cache_hit"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+----------------------------------------------------------------------------------+------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Slowest URLs']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Slowest URLs | +----------------------------------------------------------------------------------+------------------------------------------------+ | URL | SiteID Rate/sec Cached Resp Time(ms)| +----------------------------------------------------------------------------------+------------------------------------------------+ <xsl:for-each select="url"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 80 + string-length(@name) )"/> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(site_id) )"/> <xsl:value-of select="site_id"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(cache_hit) )"/> <xsl:value-of select="cache_hit"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+----------------------------------------------------------------------------------+------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='URLs with the Most CPU Usage']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 URLs with the Most CPU Usage | +----------------------------------------------------------------------------------+------------------------------------------------+ | URL | SiteID Rate/sec CPU % | +----------------------------------------------------------------------------------+------------------------------------------------+ <xsl:for-each select="url"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 80 + string-length(@name) )"/> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(site_id) )"/> <xsl:value-of select="site_id"/> <xsl:value-of select="substring($col, $offset - 17 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 15 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:text>% |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+----------------------------------------------------------------------------------+------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='URLs with the Most Bytes Sent']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 URLs with the Most Bytes Sent | +----------------------------------------------------------------------------------+------------------------------------------------+ | URL | SiteID Rate/sec Cached Bytes Sent/sec | +----------------------------------------------------------------------------------+------------------------------------------------+ <xsl:for-each select="url"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 80 + string-length(@name) )"/> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(site_id) )"/> <xsl:value-of select="site_id"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(cache_hit) )"/> <xsl:value-of select="cache_hit"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(bytes_sent_per_sec) )"/> <xsl:value-of select="bytes_sent_per_sec"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+----------------------------------------------------------------------------------+------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Clients with the Most Requests']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Clients with the Most Requests | +-----------------------------------------------------------------------------------------------------------------------------------+ | IP Address Rate/sec Cached Resp Time (ms) | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="client"> <xsl:text>| </xsl:text> <xsl:value-of select="@ip"/> <xsl:value-of select="substring($col, $offset - 74 + string-length(@ip) + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 15 + string-length(cache_hit) )"/> <xsl:value-of select="cache_hit"/> <xsl:value-of select="substring($col, $offset - 25 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Clients with the Slowest Responses']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Clients with the Slowest Responses | +-----------------------------------------------------------------------------------------------------------------------------------+ | IP Address Rate/sec Cached Resp Time (ms) | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="client"> <xsl:text>| </xsl:text> <xsl:value-of select="@ip"/> <xsl:value-of select="substring($col, $offset - 74 + string-length(@ip) + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 15 + string-length(cache_hit) )"/> <xsl:value-of select="cache_hit"/> <xsl:value-of select="substring($col, $offset - 25 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Sites with the Most Requests']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Sites with the Most Requests | +-----------------------------------------------------------------------------------------------------------------------------------+ | Site ID Rates (/s) Resp Time (ms) Cached Requests Static File CGI ASP | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="site"> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - 8 + string-length(@id) )"/> <xsl:value-of select="@id"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 35 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:value-of select="substring($col, $offset - 24 + string-length(cache_hits) )"/> <xsl:value-of select="cache_hits"/> <xsl:value-of select="substring($col, $offset - 14 + string-length(static) )"/> <xsl:value-of select="static"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(cgi) )"/> <xsl:value-of select="cgi"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(asp) )"/> <xsl:value-of select="asp"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Sites with the Slowest Responses']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Sites with the Slowest Responses | +-----------------------------------------------------------------------------------------------------------------------------------+ | Site ID Rates/sec Resp Time (ms) Cached Requests Static File CGI ASP | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="site"> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - 8 + string-length(@id) )"/> <xsl:value-of select="@id"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 35 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:value-of select="substring($col, $offset - 24 + string-length(cache_hits) )"/> <xsl:value-of select="cache_hits"/> <xsl:value-of select="substring($col, $offset - 14 + string-length(static) )"/> <xsl:value-of select="static"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(cgi) )"/> <xsl:value-of select="cgi"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(asp) )"/> <xsl:value-of select="asp"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Sites with the Most CPU Time Usage']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Sites with the Most CPU Time Usage | +-----------------------------------------------------------------------------------------------------------------------------------+ | Site ID Rate/sec Cached Resp Time (ms) CPU Time (ms) % CPU | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="site"> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - 8 + string-length(@id) )"/> <xsl:value-of select="@id"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(cache_hits) )"/> <xsl:value-of select="cache_hits"/> <xsl:value-of select="substring($col, $offset - 20 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:value-of select="substring($col, $offset - 24 + string-length(cpu_time) )"/> <xsl:value-of select="cpu_time"/> <xsl:value-of select="substring($col, $offset - 28 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Sites with the Most Bytes Sent']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Sites with the Most Bytes Sent | +-----------------------------------------------------------------------------------------------------------------------------------+ | Site ID Rate/sec Bytes Sent/sec Cached Requests Static File CGI ASP | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="site"> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - 8 + string-length(@id) )"/> <xsl:value-of select="@id"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 35 + string-length(bytes) )"/> <xsl:value-of select="bytes"/> <xsl:value-of select="substring($col, $offset - 24 + string-length(cache_hits) )"/> <xsl:value-of select="cache_hits"/> <xsl:value-of select="substring($col, $offset - 14 + string-length(static) )"/> <xsl:value-of select="static"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(cgi) )"/> <xsl:value-of select="cgi"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(asp) )"/> <xsl:value-of select="asp"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Transaction Statistics']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Transaction Statistics | +-----------------------------------------------------------------------------------------------------------------------------------+ | Transaction Trans Response Transaction CPU % Disk/Trans Tcp/Trans | | Time(ms) Rate/sec Reads Writes Sends Receives | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="transaction"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 40 + string-length(@name) )"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(count) )"/> <xsl:value-of select="count"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(disk_read_per_trans) )"/> <xsl:value-of select="disk_read_per_trans"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(disk_write_per_trans) )"/> <xsl:value-of select="disk_write_per_trans"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(tcp_send_per_trans) )"/> <xsl:value-of select="tcp_send_per_trans"/> <xsl:value-of select="substring($col, $offset - 7 + string-length(tcp_recv_per_trans) )"/> <xsl:value-of select="tcp_recv_per_trans"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Transaction CPU Utilization']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Transaction CPU Utilization | +-----------------------------------------------------------------------------------------------------------------------------------+ | Transaction Trans/sec Minimum CPU(ms) Maximum CPU(ms) Per Transaction(ms) Total(ms) CPU% | | Kernel User Kernel User Kernel User Kernel User | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="transaction"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 38 + string-length(@name) )"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(min_kernel) )"/> <xsl:value-of select="min_kernel"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(min_user) )"/> <xsl:value-of select="min_user"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(max_kernel) )"/> <xsl:value-of select="max_kernel"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(max_user) )"/> <xsl:value-of select="max_user"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(per_trans_kernel) )"/> <xsl:value-of select="per_trans_kernel"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(per_trans_user) )"/> <xsl:value-of select="per_trans_user"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(total_kernel) )"/> <xsl:value-of select="total_kernel"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(total_user) )"/> <xsl:value-of select="total_user"/> <xsl:value-of select="substring($col, $offset - 6 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Transaction Instance (Job) Statistics']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Transaction Instance (Job) Statistics | +-----------------------------------------------------------------------------------------------------------------------------------+ | Job Id Start Time Dequeue Time End Time Resp Time(ms) CPU Time(ms) | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="job"> <xsl:text>| </xsl:text> <xsl:value-of select="@id"/> <xsl:value-of select="substring($col, $offset - 6 + string-length(@id) )"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(start) )"/> <xsl:value-of select="start"/> <xsl:value-of select="substring($col, $offset - 14 + string-length(dequeue) )"/> <xsl:value-of select="dequeue"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(end) )"/> <xsl:value-of select="end"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(response_time) )"/> <xsl:value-of select="response_time"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(count(job)) )"/> <xsl:value-of select="count(job)"/> <xsl:value-of select="substring($col, $offset - 53 + string-length(format-number( sum(job/response_time) div count(job), '#' )) )"/> <xsl:value-of select="format-number( sum(job/response_time) div count(job), '#' )"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(sum(job/cpu)) )"/> <xsl:value-of select="sum(job/cpu)"/> <xsl:text> |</xsl:text> +-----------------------------------------------------------------------------------------------------------------------------------+ </xsl:for-each> <xsl:for-each select="report/table[@title='Spooler Transaction Instance (Job) Data']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Spooler Transaction Instance (Job) Data | +-----------------------------------------------------------------------------------------------------------------------------------+ | Job Id Type Job Size(Kb) Pages PPS Files GdiSize Color XRes YRes Qlty Copy TTOpt Threads | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="job"> <xsl:text>| </xsl:text> <xsl:value-of select="@id"/> <xsl:value-of select="substring($col, $offset - 5 + string-length(@id) )"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(type) )"/> <xsl:value-of select="type"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(size) )"/> <xsl:value-of select="size"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(pages) )"/> <xsl:value-of select="pages"/> <xsl:value-of select="substring($col, $offset - 6 + string-length(PPS) )"/> <xsl:value-of select="PPS"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(files) )"/> <xsl:value-of select="files"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(gdisize) )"/> <xsl:value-of select="gdisize"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(color) )"/> <xsl:value-of select="color"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(xres) )"/> <xsl:value-of select="xres"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(yres) )"/> <xsl:value-of select="yres"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(qlty) )"/> <xsl:value-of select="qlty"/> <xsl:value-of select="substring($col, $offset - 7+ string-length(copies) )"/> <xsl:value-of select="copies"/> <xsl:value-of select="substring($col, $offset - 7+ string-length(ttopt) )"/> <xsl:value-of select="ttopt"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(threads) )"/> <xsl:value-of select="threads"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Exclusive Transactions Per Process']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Exclusive Transactions Per Process | +-----------------------------------------------------------------------------------------------------------------------------------+ | Exclusive/Trans CPU(ms) | | Name PID Trans Trans/sec Kernel User Process CPU% CPU% | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="process"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 20 + string-length(@name) )"/> <xsl:value-of select="pid"/> <xsl:value-of select="substring($col, $offset - 108 + string-length(pid) )"/> <xsl:text>|</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:for-each select="transaction"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 40 + string-length(@name) )"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(count) )"/> <xsl:value-of select="count"/> <xsl:value-of select="substring($col, $offset - 9 + string-length(rate) )"/> <xsl:value-of select="rate"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(kernel) )"/> <xsl:value-of select="kernel"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(user) )"/> <xsl:value-of select="user"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(process_cpu) )"/> <xsl:value-of select="process_cpu"/> <xsl:value-of select="substring($col, $offset - 15 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>| ------- ------ |</xsl:text> <xsl:value-of select="'&#xA;'"/> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 104 + string-length(format-number( sum(transaction/process_cpu), '0.00' )) )"/> <xsl:value-of select="format-number( sum(transaction/process_cpu), '0.00' )"/><xsl:text>%</xsl:text> <xsl:value-of select="substring($col, $offset - 14 + string-length(format-number( sum(transaction/cpu), '0.00' )) )"/> <xsl:value-of select="format-number( sum(transaction/cpu), '0.00' )"/><xsl:text>%</xsl:text> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:text>| |</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Inclusive Transactions Per Process']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Inclusive Transactions Per Process | +-----------------------------------------------------------------------------------------------------------------------------------+ | Inclusive (ms) | | Name PID Count Kernel User | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="process"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 30 + string-length(@name) )"/> <xsl:value-of select="pid"/> <xsl:value-of select="substring($col, $offset - 98 + string-length(pid) )"/> <xsl:text>|</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:for-each select=".//transaction"> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - (@level * 2) )"/> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 60 + string-length(@name) + (@level * 2) )"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(count) )"/> <xsl:value-of select="count"/> <xsl:value-of select="substring($col, $offset - 10 + string-length(kernel) )"/> <xsl:value-of select="kernel"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(user) )"/> <xsl:value-of select="user"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Image Statistics']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Image Statistics | +-----------------------------------------------------------------------------------------------------------------------------------+ | Image Name PID Threads Process(ms) Transaction(ms) CPU% | | Launched Used Kernel User Kernel User | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="image"> <xsl:sort select="cpu" data-type="number" order="descending"/> <xsl:if test="position() != 1"><xsl:value-of select="'&#xA;'"/></xsl:if> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/><xsl:value-of select="substring($col, $offset - 22 + string-length(@name) )"/> <xsl:value-of select="pid"/><xsl:value-of select="substring($col, $offset - 9 + string-length(threads) )"/> <xsl:value-of select="threads"/><xsl:value-of select="substring($col, $offset - 9 + string-length(used_threads) )"/> <xsl:value-of select="used_threads"/><xsl:value-of select="substring($col, $offset - 10 + string-length(process_kernel) )"/> <xsl:value-of select="process_kernel"/><xsl:value-of select="substring($col, $offset - 10 + string-length(process_user) )"/> <xsl:value-of select="process_user"/><xsl:value-of select="substring($col, $offset - 10 + string-length(transaction_kernel) )"/> <xsl:value-of select="transaction_kernel"/><xsl:value-of select="substring($col, $offset - 10 + string-length(transaction_user) )"/> <xsl:value-of select="transaction_user"/><xsl:value-of select="substring($col, $offset - 15 + string-length(cpu) )"/> <xsl:value-of select="cpu"/> <xsl:text> |</xsl:text> </xsl:for-each> +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:text>|</xsl:text><xsl:value-of select="substring($col, $offset - 43 + string-length(string(sum(image/threads))) )"/> <xsl:value-of select="sum(image/threads)"/><xsl:value-of select="substring($col, $offset - 9 + string-length(string(sum(image/used_threads))) )"/> <xsl:value-of select="sum(image/used_threads)"/><xsl:value-of select="substring($col, $offset - 10 + string-length(string(sum(image/process_kernel))) )"/> <xsl:value-of select="sum(image/process_kernel)"/><xsl:value-of select="substring($col, $offset - 10 + string-length(string(sum(image/process_user))) )"/> <xsl:value-of select="sum(image/process_user)"/><xsl:value-of select="substring($col, $offset - 10 + string-length(string(sum(image/transaction_kernel))) )"/> <xsl:value-of select="sum(image/transaction_kernel)"/><xsl:value-of select="substring($col, $offset - 10 + string-length(string(sum(image/transaction_user))) )"/> <xsl:value-of select="sum(image/transaction_user)"/><xsl:value-of select="substring($col, $offset - 15 + string-length(string(format-number(sum(image/cpu), '#.00'))) )"/> <xsl:value-of select="format-number(sum(image/cpu), '#.00')"/> <xsl:text>% |</xsl:text> +-----------------------------------------------------------------------------------------------------------------------------------+ </xsl:for-each> <xsl:for-each select="report/table[@title='Disk Totals']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Disk Totals | +-----------------------------------------------------------------------------------------------------------------------------------+ | Disk Name Read Rate/sec Kb/Read Write Rate/sec Kb/Write | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="disk"> <xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 6 + string-length(@number) )"/> <xsl:value-of select="@number"/> <xsl:value-of select="substring($col, $offset - 19 + string-length(read_rate) )"/> <xsl:value-of select="read_rate"/> <xsl:value-of select="substring($col, $offset - 30 + string-length(read_size) )"/> <xsl:value-of select="read_size"/> <xsl:value-of select="substring($col, $offset - 25 + string-length(write_rate) )"/> <xsl:value-of select="write_rate"/> <xsl:value-of select="substring($col, $offset - 31 + string-length(write_size) )"/> <xsl:value-of select="write_size"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Disk']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | Disk <xsl:value-of select="@number"/><xsl:value-of select="substring($col, $offset - 112 + string-length(@number) )"/> | +-----------------------------------------------------------------------------------------------------------------------------------+ | Image Name PID Authority Read Write | | Rate/sec Kb/Read Rate/sec Kb/Write | +-----------------------------------------------------------------------------------------------------------------------------------+ <xsl:for-each select="image"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 20 + string-length(@name) )"/> <xsl:value-of select="pid"/> <xsl:text> </xsl:text> <xsl:value-of select="authority"/> <xsl:value-of select="substring($col, $offset - 32 + string-length(authority) )"/> <xsl:value-of select="substring($col, $offset - 6 + string-length(read_rate) )"/> <xsl:value-of select="read_rate"/> <xsl:value-of select="substring($col, $offset - 13 + string-length(read_size) )"/> <xsl:value-of select="read_size"/> <xsl:value-of select="substring($col, $offset - 12 + string-length(write_rate) )"/> <xsl:value-of select="write_rate"/> <xsl:value-of select="substring($col, $offset - 11 + string-length(write_size) )"/> <xsl:value-of select="write_size"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------------------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:for-each select="report/table[@title='Files Causing Most Disk IOs']"> +-----------------------------------------------------------------------------------------------------------------------------------+ | 10 Files Causing Most Disk IOs | +-----------------------------------------------------------------------------------------------+-----------------------------------+ | Disk Drive File Name | Read Kb/ Write Kb/ | | Process Name ID |Rate/sec Read Rate/sec Write| +-----------------------------------------------------------------------------------------------+-----------------------------------+ <xsl:for-each select="file"> <xsl:text>| </xsl:text> <xsl:value-of select="substring($col, $offset - 3 + string-length(disk) )"/> <xsl:value-of select="disk"/><xsl:text> </xsl:text> <xsl:value-of select="drive"/><xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 82 + (string-length(@name)+string-length(drive)) )"/><xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 7 + string-length(read_rate) )"/> <xsl:value-of select="read_rate"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(read_size) )"/> <xsl:value-of select="read_size"/> <xsl:value-of select="substring($col, $offset - 7 + string-length(write_rate) )"/> <xsl:value-of select="write_rate"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(write_size) )"/> <xsl:value-of select="write_size"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> <xsl:for-each select="image"> <xsl:text>| </xsl:text> <xsl:value-of select="@name"/> <xsl:value-of select="substring($col, $offset - 18 + string-length(@name) )"/> <xsl:value-of select="pid"/> <xsl:value-of select="substring($col, $offset - 58 + string-length(pid) )"/><xsl:text>|</xsl:text> <xsl:value-of select="substring($col, $offset - 7 + string-length(read_rate) )"/> <xsl:value-of select="read_rate"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(read_size) )"/> <xsl:value-of select="read_size"/> <xsl:value-of select="substring($col, $offset - 7 + string-length(write_rate) )"/> <xsl:value-of select="write_rate"/> <xsl:value-of select="substring($col, $offset - 8 + string-length(write_size) )"/> <xsl:value-of select="write_size"/> <xsl:text> |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>| | |</xsl:text><xsl:value-of select="'&#xA;'"/> </xsl:for-each> <xsl:text>+-----------------------------------------------------------------------------------------------+-----------------------------------+</xsl:text> <xsl:value-of select="'&#xA;'"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
<reponame>SoCdesign/audiomixer<gh_stars>1-10 <?xml version="1.0" standalone="no"?> <!DOCTYPE stylesheet [ <!ENTITY UPPERCASE "ABCDEFGHIJKLMNOPQRSTUVWXYZ"> <!ENTITY LOWERCASE "abcdefghijklmnopqrstuvwxyz"> <!ENTITY UPPER2LOWER " '&UPPERCASE;' , '&LOWERCASE;' "> <!ENTITY LOWER2UPPER " '&LOWERCASE;' , '&UPPERCASE;' "> <!ENTITY ALPHALOWER "ABCDEFxX0123456789"> <!ENTITY HEXUPPER "ABCDEFxX0123456789"> <!ENTITY HEXLOWER "abcdefxX0123456789"> <!ENTITY HEXU2L " '&HEXLOWER;' , '&HEXUPPER;' "> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:dyn="http://exslt.org/dynamic" xmlns:math="http://exslt.org/math" xmlns:xlink="http://www.w3.org/1999/xlink" extension-element-prefixes="math exsl dyn xlink"> <xsl:include href="edw2xtl_sav_globals.xsl"/> <xsl:include href="edw2xtl_sav_view_addr.xsl"/> <xsl:include href="edw2xtl_sav_view_busif.xsl"/> <xsl:include href="edw2xtl_sav_view_port.xsl"/> <xsl:include href="edw2xtl_sav_view_groups.xsl"/> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:param name="P_SYSTEM_XML" select= "'__UNDEF__'"/> <xsl:param name="P_GROUPS_XML" select= "'__UNDEF__'"/> <xsl:param name="G_DEBUG" select="'FALSE'"/> <xsl:param name="G_ADD_CHOICES" select="'TRUE'"/> <!-- <xsl:param name="P_VIEW" select="'__UNDEF__'"/> <xsl:param name="P_MODE" select="'__UNDEF__'"/> <xsl:param name="P_SCOPE" select="'__UNDEF__'"/> --> <!-- MAIN TEMPLATE --> <xsl:template match="SAV[@VIEW]"> <xsl:if test="$G_DEBUG='TRUE'"> <xsl:message>SAV VIEW <xsl:value-of select="@VIEW"/></xsl:message> <xsl:message>SAV MODE <xsl:value-of select="@MODE"/></xsl:message> <xsl:message>SAV SCOPE <xsl:value-of select="@SCOPE"/></xsl:message> </xsl:if> <xsl:choose> <xsl:when test="not(@VIEW = 'PORT') and not(@VIEW = 'BUSINTERFACE') and not(@VIEW = 'ADDRESS')"> <xsl:message>EDW2SAV XTELLER ERROR: UNDEFINED VIEW <xsl:value-of select="@VIEW"/></xsl:message> </xsl:when> <xsl:when test="(@MODE and not(@MODE = 'FLAT') and not(@MODE = 'TREE') and not(@MODE = 'GROUPS'))"> <xsl:message>EDW2SAV XTELLER ERROR: UNDEFINED MODE <xsl:value-of select="@MODE"/></xsl:message> </xsl:when> <xsl:when test="(@SCOPE and not(@SCOPE = 'FULL') and not(@SCOPE= 'FOCUS'))"> <xsl:message>EDW2SAV XTELLER ERROR: UNDEFINED SCOPE <xsl:value-of select="@SCOPE"/></xsl:message> </xsl:when> <xsl:when test="$P_SYSTEM_XML ='__UNDEF__'"> <xsl:message>EDW2SAV XTELLER ERROR: SYSTEM XML UNDEFINED</xsl:message> </xsl:when> <xsl:when test="not($G_SYS)" > <xsl:message>EDW2SAV XTELLER ERROR: EDKSYSTEM MISSING in SYSTEM XML <xsl:value-of select="$P_SYSTEM_XML"/></xsl:message> </xsl:when> <xsl:when test="($P_GROUPS_XML ='__UNDEF__') and (@MODE = 'GROUPS')" > <xsl:message>EDW2SAV XTELLER ERROR: GROUP XML UNDEFINED for FOCUS</xsl:message> </xsl:when> <xsl:when test="($P_GROUPS_XML ='__UNDEF__') and (@SCOPE = 'FOCUS') and (@VIEW = 'BUSINTERFACE')" > <xsl:message>EDW2SAV XTELLER ERROR: GROUP XML UNDEFINED for SCOPE</xsl:message> </xsl:when> <xsl:otherwise> <xsl:if test="$G_DEBUG='TRUE'"> <xsl:message>SYSTEM XML <xsl:value-of select="$P_SYSTEM_XML"/></xsl:message> <xsl:message>GROUPS XML <xsl:value-of select="$P_GROUPS_XML"/></xsl:message> </xsl:if> <xsl:variable name="use_mode_"> <xsl:choose> <xsl:when test="@MODE = 'GROUPS'">TREE</xsl:when> <xsl:otherwise><xsl:value-of select="@MODE"/></xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="num_procs_focused_on_" select="count(MASTER)"/> <xsl:variable name="num_buses_focused_on_" select="count(BUS)"/> <xsl:element name="SET"> <xsl:attribute name="CLASS">PROJECT</xsl:attribute> <xsl:attribute name="VIEW_ID"><xsl:value-of select="@VIEW"/></xsl:attribute> <xsl:attribute name="DISPLAYMODE"><xsl:value-of select="$use_mode_"/></xsl:attribute> <xsl:choose> <!-- ADDRESS TAB VIEW --> <xsl:when test="(@VIEW = 'ADDRESS')"> <xsl:call-template name="WRITE_VIEW_ADDRESS"/> </xsl:when> <!-- BIF TAB VIEWS --> <xsl:when test="((@VIEW ='BUSINTERFACE') and (@SCOPE = 'FOCUS') and ($num_procs_focused_on_ &gt; 0))"> <xsl:call-template name="WRITE_VIEW_BIF_FOCUS_ON_PROCS"/> </xsl:when> <!-- BIF TAB VIEWS --> <xsl:when test="((@VIEW ='BUSINTERFACE') and (@SCOPE = 'FOCUS') and ($num_buses_focused_on_ &gt; 0))"> <xsl:call-template name="WRITE_VIEW_BIF_FOCUS_ON_BUSES"/> </xsl:when> <xsl:when test="((@VIEW ='BUSINTERFACE') and (@MODE = 'TREE') and not(@SCOPE))"> <xsl:call-template name="WRITE_VIEW_BIF_TREE"/> </xsl:when> <xsl:when test="((@VIEW = 'BUSINTERFACE') and (@MODE = 'FLAT') and not(@SCOPE))"> <xsl:call-template name="WRITE_VIEW_BIF_FLAT"/> </xsl:when> <xsl:when test="((@VIEW = 'BUSINTERFACE') and (@MODE = 'GROUPS'))"> <xsl:call-template name="WRITE_VIEW_BIF_GROUPS"> <xsl:with-param name="iModules" select="$G_BLOCKS"/> </xsl:call-template> </xsl:when> <!-- PORT TAB VIEWS --> <xsl:when test="((@VIEW ='PORT') and (@SCOPE = 'FOCUS'))"> <xsl:call-template name="WRITE_VIEW_PORT_FOCUSED"/> </xsl:when> <!-- Generate XTeller panel data for Ports using hierarchy --> <xsl:when test="((@VIEW = 'PORT') and (@MODE = 'TREE'))"> <xsl:call-template name="WRITE_VIEW_PORT_TREE"/> </xsl:when> <!-- Generate XTeller panel data for Ports without hierarchy, (flat view) --> <xsl:when test="((@VIEW='PORT') and (@MODE = 'FLAT'))"> <xsl:call-template name="WRITE_VIEW_PORT_FLAT"/> </xsl:when> <xsl:otherwise> <xsl:message>ERROR during SAV XTeller generation with panel <xsl:value-of select="@VIEW"/> and display mode <xsl:value-of select="@MODE"/></xsl:message> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="EDKSYSTEM"> <!-- <xsl:message>EDW VERSION <xsl:value-of select="$G_EDWVER"/></xsl:message> <xsl:message>VIEW <xsl:value-of select="$VIEW"/></xsl:message> <xsl:message>MODE <xsl:value-of select="$MODE"/></xsl:message> --> <xsl:variable name="by_interface_"> <xsl:choose> <!-- Show interfaces or not --> <xsl:when test="(($SHOW_BUSIF ='TRUE') or ($SHOW_IOIF ='TRUE'))">TRUE</xsl:when> <xsl:otherwise>FALSE</xsl:otherwise> </xsl:choose> </xsl:variable> <!-- <xsl:message>VIEW <xsl:value-of select="$VIEW"/></xsl:message> <xsl:message>MODE <xsl:value-of select="$MODE"/></xsl:message> <xsl:message>BY INTERFACE <xsl:value-of select="$by_interface_"/></xsl:message> --> <xsl:variable name="displayMode_"> <xsl:choose> <!-- Hard code view to view for address panel, always show view in what was formerly multiprocessor view. See below. <xsl:when test="(($G_NUM_OF_PROCS &gt; 1) and ($VIEW='ADDRESS'))">TREE</xsl:when> <xsl:when test="(($G_NUM_OF_PROCS &lt;= 1) and ($VIEW='ADDRESS'))">FLAT</xsl:when> --> <xsl:when test="($VIEW='ADDRESS')">TREE</xsl:when> <xsl:otherwise><xsl:value-of select="$MODE"/></xsl:otherwise> </xsl:choose> </xsl:variable> <SET CLASS="PROJECT" VIEW= "{$VIEW}" MODE="{$displayMode_}"> <xsl:choose> <!-- Generate XTeller panel data for Bus Interfaces using hierarchy --> <xsl:when test="(($VIEW='BUSINTERFACE') and (not($MODE) or ($MODE = 'TREE')))"> <xsl:call-template name="WRITE_VIEW_BIF_TREE"/> </xsl:when> <!-- Generate XTeller panel data for Bus Interfaces without hierarchy, (flat view) --> <xsl:when test="(($VIEW='BUSINTERFACE') and ($MODE = 'FLAT'))"> <xsl:call-template name="WRITE_VIEW_BIF_FLAT"/> </xsl:when> <!-- Generate XTeller panel data for Ports using hierarchy --> <xsl:when test="(($VIEW='PORT') and (not($MODE) or ($MODE = 'TREE')))"> <xsl:call-template name="WRITE_VIEW_PORT_TREE"/> </xsl:when> <!-- Generate XTeller panel data for Ports without hierarchy, (flat view) --> <xsl:when test="(($VIEW='PORT') and ($MODE = 'FLAT'))"> <xsl:call-template name="WRITE_VIEW_PORT_FLAT"/> </xsl:when> <!-- Hard code display of the address panel to always the the same. No more tree or flat mode, always show address panel in what was formerly the multiprocessor view. --> <xsl:when test="($VIEW='ADDRESS')"> <xsl:call-template name="WRITE_VIEW_ADDRESS"/> </xsl:when> <xsl:otherwise> <xsl:message>ERROR during SAV XTeller generation with panel <xsl:value-of select="$VIEW"/> and display mode <xsl:value-of select="$MODE"/></xsl:message> </xsl:otherwise> </xsl:choose> </SET> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="/"> <customers> <xsl:apply-templates select="customers/customer[@Country='Germany']"/> </customers> </xsl:template> <xsl:template match="customers"> <xsl:apply-templates/> </xsl:template> <xsl:template match="customer"> <customer> <xsl:attribute name="CompanyName"><xsl:value-of select="@CompanyName"/></xsl:attribute> <xsl:attribute name="CustomerID"><xsl:value-of select="@CustomerID"/></xsl:attribute> <xsl:attribute name="Country"><xsl:value-of select="@Country"/></xsl:attribute> </customer> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <xsl:import href="sfw_generics.xsl" /> <xsl:import href="sfw_utilities.xsl" /> <xsl:import href="sfw_schema.xsl" /> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" version="1.0" indent="yes" omit-xml-declaration="yes" encoding="UTF-8"/> <xsl:template match="/*" mode="construct_mixed_view"> <xsl:param name="primary" /> <xsl:variable name="schema" select="/*/*[@rndx=1]/schema" /> <xsl:if test="$schema"> <xsl:variable name="title"> <xsl:apply-templates select="$schema" mode="get_form_title" /> </xsl:variable> <xsl:element name="div"> <xsl:attribute name="class">SFW_Host</xsl:attribute> <xsl:attribute name="data-result-path"> <xsl:variable name="path"> <xsl:apply-templates select="$schema/.." mode="get_path" /> </xsl:variable> </xsl:attribute> <xsl:if test="string-length($title)"> <h2><xsl:value-of select="$title" /></h2> </xsl:if> <h3>Buttons:</h3> <xsl:apply-templates select="$schema" mode="construct_buttons" /> <xsl:apply-templates select="$schema/field" mode="construct_subview" /> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="field[@result][@type]" mode="construct_subview"> <xsl:variable name="result" select="/*/*[@rndx][local-name()=current()/@result]"/> <xsl:if test="$result"> <xsl:element name="div"> <xsl:attribute name="class">SFW_Host</xsl:attribute> <xsl:attribute name="data-subview">true</xsl:attribute> <xsl:attribute name="data-sfw-class"> <xsl:value-of select="@type" /> </xsl:attribute> <xsl:attribute name="data-result-path"> <xsl:apply-templates select="$result" mode="get_path" /> </xsl:attribute> <h3> <xsl:call-template name="resolve_refs"> <xsl:with-param name="str" select="@label" /> </xsl:call-template> </h3> <xsl:apply-templates select="@manage" mode="construct_button" /> <xsl:apply-templates select="." mode="fill_subview" /> </xsl:element> </xsl:if> </xsl:template> <xsl:template match="@manage" mode="construct_button"> <p> <xsl:element name="button"> <xsl:attribute name="type">button</xsl:attribute> <xsl:attribute name="data-type">manage_subview</xsl:attribute> <xsl:attribute name="data-task"> <xsl:call-template name="resolve_refs"> <xsl:with-param name="str" select="." /> </xsl:call-template> </xsl:attribute> <xsl:element name="img"> <xsl:attribute name="src">includes/edit_pencil.png</xsl:attribute> </xsl:element> </xsl:element> </p> </xsl:template> <xsl:template match="field[@type='vtable']" mode="fill_subview"> <xsl:variable name="result" select="/*/*[@rndx][local-name()=current()/@result]"/> <xsl:variable name="fields" select="$result/schema/field" /> <xsl:variable name="rows" select="$result/*[local-name()=$result/@row-name]" /> <table><tbody> <xsl:apply-templates select="$rows" mode="construct_simple_table_row"> <xsl:with-param name="fields" select="$fields" /> </xsl:apply-templates> </tbody></table> </xsl:template> <xsl:template match="*" mode="construct_simple_table_row"> <xsl:param name="fields" /> <tr> <xsl:apply-templates select="$fields[not(@hidden)]" mode="construct_simple_table_cell"> <xsl:with-param name="row" select="." /> </xsl:apply-templates> </tr> </xsl:template> <xsl:template match="field" mode="construct_simple_table_cell"> <xsl:param name="row" /> <xsl:variable name="val" select="$row/@*[local-name()=current()/@name]" /> <td> <xsl:if test="$val"> <xsl:value-of select="$val" /> </xsl:if> </td> </xsl:template> </xsl:stylesheet>
<reponame>npocmaka/Windows-Server-2003 <?xml version='1.0' ?> <!-- Copyright (c) Microsoft Corporation. All rights reserved. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output encoding="utf-16" omit-xml-declaration ="yes"/> <xsl:param name="norefcomma"/> <xsl:template match="/"> Node,<xsl:for-each select="COMMAND/RESULTS[1]/CIM/INSTANCE[1]//PROPERTY|COMMAND/RESULTS[1]/CIM/INSTANCE[1]//PROPERTY.ARRAY|COMMAND/RESULTS[1]/CIM/INSTANCE[1]//PROPERTY.REFERENCE"><xsl:value-of select="@NAME"/><xsl:if test="position()!=last()">,</xsl:if></xsl:for-each><xsl:apply-templates select="COMMAND/RESULTS"/></xsl:template> <xsl:template match="RESULTS" xml:space="preserve"><xsl:apply-templates select="CIM/INSTANCE"/></xsl:template> <xsl:template match="VALUE.ARRAY" xml:space="preserve">{<xsl:for-each select="VALUE"><xsl:apply-templates select="."/><xsl:if test="position()!=last()">;</xsl:if></xsl:for-each>}</xsl:template> <xsl:template match="VALUE" xml:space="preserve"><xsl:value-of select="."/></xsl:template> <xsl:template match="INSTANCE" xml:space="preserve"> <xsl:value-of select="../../@NODE"/>,<xsl:for-each select="PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE"><xsl:apply-templates select="."/><xsl:if test="position()!=last()">,</xsl:if></xsl:for-each></xsl:template> <xsl:template match="PROPERTY.REFERENCE" xml:space="preserve"><xsl:apply-templates select="VALUE.REFERENCE"></xsl:apply-templates></xsl:template> <xsl:template match="PROPERTY"><xsl:apply-templates select="VALUE"/></xsl:template> <xsl:template match="PROPERTY.ARRAY"><xsl:for-each select="VALUE.ARRAY"><xsl:apply-templates select="."/></xsl:for-each></xsl:template> <xsl:template match="VALUE.REFERENCE">"<xsl:apply-templates select="INSTANCEPATH/NAMESPACEPATH"/><xsl:apply-templates select="INSTANCEPATH/INSTANCENAME|INSTANCENAME"/>"</xsl:template> <xsl:template match="NAMESPACEPATH">\\<xsl:value-of select="HOST/text()"/><xsl:for-each select="LOCALNAMESPACEPATH/NAMESPACE">\<xsl:value-of select="@NAME"/></xsl:for-each>:</xsl:template> <xsl:template match="INSTANCENAME"><xsl:value-of select="@CLASSNAME"/><xsl:for-each select="KEYBINDING"><xsl:if test="position()=1">.</xsl:if><xsl:value-of select="@NAME"/>="<xsl:value-of select="KEYVALUE/text()"/>"<xsl:if test="position()!=last()"></xsl:if><xsl:if test="not($norefcomma=&quot;true&quot;)">,</xsl:if><xsl:if test="$norefcomma=&quot;true&quot;"><xsl:text> </xsl:text></xsl:if></xsl:for-each></xsl:template> </xsl:stylesheet>
<gh_stars>1-10 <html> <body> <ul> <li> Number: 1 Factors: </li> <li> Number: 2 Factors: 2</li> <li> Number: 4 Factors: 2 2</li> <li> Number: 8 Factors: 2 2 2</li> <li> Number: 9 Factors: 3 3</li> <li> Number: 255 Factors: 3 5 17</li> </ul> </body> </html>
<reponame>tomo3136a/hw_utils<filename>xsl/xml_sort.xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" media-type="text/xsl" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="text()"> <xsl:if test="not (string-length(normalize-space(.))=0)"> <xsl:value-of select="." /> </xsl:if> </xsl:template> <xsl:template match="*"> <xsl:element name="{name()}"> <xsl:for-each select="@*"> <xsl:sort select="name()"/> <xsl:attribute name="{name()}"> <xsl:value-of select="."/> </xsl:attribute> </xsl:for-each> <xsl:apply-templates select="text()"/> <xsl:variable name="a" select="name()"/> <xsl:choose> <xsl:when test="($a='edif')"> <xsl:apply-templates select="*"/> </xsl:when> <xsl:when test="($a='status')"> <xsl:copy-of select="*"/> </xsl:when> <xsl:otherwise> <xsl:for-each select="*"> <xsl:sort select="name()"/> <xsl:apply-templates select="."/> </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:element> </xsl:template> </xsl:stylesheet>
<gh_stars>1-10 <xsl:template match="/table"> <table> <xsl:apply-templates /> </table> </xsl:template> <xsl:template match="tr"> <tr><xsl:apply-templates /></tr> </xsl:template> <xsl:template match="td"> <xsl:variable name="liveNeighbours"> <xsl:apply-templates select="current()" mode="countLiveNeighbours" /> </xsl:variable> <xsl:choose> <xsl:when test="(current() = 'X' and $liveNeighbours = 2) or $liveNeighbours = 3"> <xsl:call-template name="live" /> </xsl:when> <xsl:otherwise> <xsl:call-template name="die" /> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="td" mode="countLiveNeighbours"> <xsl:variable name="currentX" select="count(preceding-sibling::td) + 1" /> <xsl:variable name="precedingRow" select="parent::tr/preceding-sibling::tr[1]" /> <xsl:variable name="followingRow" select="parent::tr/following-sibling::tr[1]" /> <xsl:variable name="neighbours" select="$precedingRow/td[$currentX - 1] | $precedingRow/td[$currentX] | $precedingRow/td[$currentX + 1] | preceding-sibling::td[1] | following-sibling::td[1] | $followingRow/td[$currentX - 1] | $followingRow/td[$currentX] | $followingRow/td[$currentX + 1]" /> <xsl:value-of select="count($neighbours[text() = 'X'])" /> </xsl:template> <xsl:template name="die"> <td>_</td> </xsl:template> <xsl:template name="live"> <td>X</td> </xsl:template>
<reponame>LaudateCorpus1/RosettaCodeData <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="ackermann.xslt"?> <arguments> <args> <m>0</m> <n>0</n> </args> <args> <m>0</m> <n>1</n> </args> <args> <m>0</m> <n>2</n> </args> <args> <m>0</m> <n>3</n> </args> <args> <m>0</m> <n>4</n> </args> <args> <m>0</m> <n>5</n> </args> <args> <m>0</m> <n>6</n> </args> <args> <m>0</m> <n>7</n> </args> <args> <m>0</m> <n>8</n> </args> <args> <m>1</m> <n>0</n> </args> <args> <m>1</m> <n>1</n> </args> <args> <m>1</m> <n>2</n> </args> <args> <m>1</m> <n>3</n> </args> <args> <m>1</m> <n>4</n> </args> <args> <m>1</m> <n>5</n> </args> <args> <m>1</m> <n>6</n> </args> <args> <m>1</m> <n>7</n> </args> <args> <m>1</m> <n>8</n> </args> <args> <m>2</m> <n>0</n> </args> <args> <m>2</m> <n>1</n> </args> <args> <m>2</m> <n>2</n> </args> <args> <m>2</m> <n>3</n> </args> <args> <m>2</m> <n>4</n> </args> <args> <m>2</m> <n>5</n> </args> <args> <m>2</m> <n>6</n> </args> <args> <m>2</m> <n>7</n> </args> <args> <m>2</m> <n>8</n> </args> <args> <m>3</m> <n>0</n> </args> <args> <m>3</m> <n>1</n> </args> <args> <m>3</m> <n>2</n> </args> <args> <m>3</m> <n>3</n> </args> <args> <m>3</m> <n>4</n> </args> <args> <m>3</m> <n>5</n> </args> <args> <m>3</m> <n>6</n> </args> <args> <m>3</m> <n>7</n> </args> <args> <m>3</m> <n>8</n> </args> </arguments>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> <![CDATA[ This text is in a CDATA section. In here, it's okay to include <, >, &, ", and ' without any special treatment. The section is terminated by a three-character sequence consisting of two right brackets ("]]") followed by a greater-than (">"). If this sequence appears in your text, a workaround is to drop out of the CDATA section, output part of the terminator, then start a new CDATA section and output the rest. Let's do this now: ]]>]]<![CDATA[> Newlines and spacing are retained as well, as long as they're evaluated in a context that bothers preserving them. Whether or not the spaces before and after the CDATA section are also preserved may be application-dependent. ]]> </xsl:template> </xsl:stylesheet>
<filename>install/web_includes/sfw_debug.xsl<gh_stars>1-10 <?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <xsl:import href="sfw_generics.xsl" /> <xsl:import href="sfw_utilities.xsl" /> <xsl:import href="sfw_page.xsl" /> <xsl:import href="sfw_table.xsl" /> <xsl:import href="sfw_form.xsl" /> <xsl:import href="sfw_lookup.xsl" /> <xsl:import href="sfw_associate.xsl" /> <xsl:import href="sfw_iltable.xsl" /> <xsl:import href="sfw_isotable.xsl" /> <xsl:import href="sfw_calendar.xsl" /> <xsl:import href="sfw_ulselect.xsl" /> <xsl:import href="sfw_ref.xsl" /> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" version="1.0" indent="yes" omit-xml-declaration="yes" encoding="UTF-8"/> </xsl:stylesheet>
<reponame>LaudateCorpus1/RosettaCodeData<filename>Task/String-length/XSLT/string-length-2.xslt <xsl:value-of select="string-length('møøse')" /> <!-- 5 -->
<filename>install/web_includes/sfw_iltable.xsl <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" version="1.0" indent="yes" omit-xml-declaration="yes" encoding="UTF-8"/> <!-- Modeless attribute match for like-named field of proper type in hosting schema. --> <xsl:template match="@*[local-name()=(ancestor::schema/field[@type='iltable']/@name)]"> <xsl:variable name="field" select="ancestor::schema/field[@name=local-name(current())]" /> <xsl:variable name="result" select="/*/*[local-name()=$field/@result][@rndx]" /> <xsl:choose> <xsl:when test="not($result)"> <div>Failed to find required result for itable instruction.</div> </xsl:when> <xsl:otherwise> <xsl:call-template name="transform_associated_references"> <xsl:with-param name="result" select="$result" /> <xsl:with-param name="field" select="$field" /> <xsl:with-param name="str" select="." /> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- Template that is called by construct_form via construct_input_row via construct_form_input via construct_form --> <xsl:template match="schema/field[@type='iltable'][@result]" mode="construct_input"> <xsl:param name="data" /> <xsl:variable name="jresult" select="/*/*[local-name()=current()/@result]" /> <xsl:variable name="schema" select="$jresult/schema" /> <div class="SFW_Host" style="position:static"> <xsl:element name="table"> <xsl:attribute name="class">Schema</xsl:attribute> <xsl:apply-templates select="$schema" mode="add_result_attribute" /> <xsl:apply-templates select="$schema" mode="add_sfw_class_attribute"> <xsl:with-param name="sfw_class" select="'iltable'" /> </xsl:apply-templates> <xsl:apply-templates select="$schema" mode="add_on_click_attributes" /> <thead> <xsl:apply-templates select="." mode="make_add_button" /> <xsl:apply-templates select="$schema" mode="construct_thead_rows" /> </thead> <tbody> <xsl:apply-templates select="$schema" mode="fill_tbody" /> </tbody> </xsl:element> </div> <!-- <div class="SFW_Host" style="position:static"> --> <!-- <xsl:apply-templates select="$jresult" mode="construct_table"> --> <!-- <xsl:with-param name="sfw_class" select="'table'" /> --> <!-- </xsl:apply-templates> --> <!-- </div> --> <!-- <xsl:element name="table"> --> <!-- <xsl:attribute name="class">iltable</xsl:attribute> --> <!-- <xsl:attribute name="data-sfw-class">iltable</xsl:attribute> --> <!-- <xsl:attribute name="data-sfw-input">input</xsl:attribute> --> <!-- <xsl:attribute name="tabindex">0</xsl:attribute> --> <!-- <tbody> --> <!-- <xsl:call-template name="transform_associated_references"> --> <!-- <xsl:with-param name="result" select="/*/*[local-name()=$jresult/@result]" /> --> <!-- <xsl:with-param name="field" select="." /> --> <!-- <xsl:with-param name="str" select="$value" /> --> <!-- </xsl:call-template> --> <!-- </tbody> --> <!-- </xsl:element> --> </xsl:template> <xsl:template match="schema/field[@type='iltable']" mode="make_add_button"></xsl:template> <xsl:template match="schema/field[@type='iltable'][@on_add]" mode="make_add_button"> <tr> <td colspan="99"> <button type="button" name="add">+</button> </td> </tr> </xsl:template> <xsl:template match="schema/field[@type='iltable'][@result]" mode="display_value"> <xsl:param name="data" /> <xsl:apply-templates select="." mode="construct_input"> <xsl:with-param name="data" select="$data" /> </xsl:apply-templates> </xsl:template> <!-- We gotta figure out a way to reuse the person[parent::people] element in different contexts. For example, one context may be just listing the names in a single string, and another view might be in a table with more than one cell for different attributes. --> <xsl:template match="person[parent::people]" mode="transform_row"> <xsl:param name="field" /> </xsl:template> </xsl:stylesheet>
<reponame>npocmaka/Windows-Server-2003<filename>admin/wmi/wbem/tools/wmic/htable.xsl <?xml version="1.0"?> <!-- Copyright (c) Microsoft Corporation. All rights reserved. --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="sortby"/> <xsl:param name="title"/> <xsl:param name="datatype" select="'text'"/> <xsl:template match="COMMAND"> <table border="1"> <tr style="background-color:#a0a0ff;font:10pt Tahoma;font-weight:bold;" align="left"> <td>Node</td> <xsl:for-each select="RESULTS[1]/CIM/INSTANCE[1]/PROPERTY|RESULTS[1]/CIM/INSTANCE[1]/PROPERTY.ARRAY|RESULTS[1]/CIM/INSTANCE[1]/PROPERTY.REFERENCE"> <td> <xsl:value-of select="@NAME"/> </td> </xsl:for-each> </tr> <tr style="background-color:#e0f0f0;font:10pt Tahoma;"> <xsl:for-each select="RESULTS/CIM/INSTANCE"> <xsl:sort select="PROPERTY[@NAME=$sortby]|PROPERTY.ARRAY[@NAME=$sortby]|PROPERTY.REFERENCE[@NAME=$sortby]" data-type="{$datatype}"/> <xsl:choose> <xsl:when test="position() mod 2 &lt; 1"> <tr style="background-color:#e0f0f0;font:10pt Tahoma;"> <td align="left"><xsl:value-of select="../../@NODE"/></td> <xsl:for-each select="PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE"> <xsl:variable name="typevar" select="@TYPE"/> <td> <xsl:for-each select="VALUE|VALUE.ARRAY|VALUE.REFERENCE"> <xsl:apply-templates select="."> <xsl:with-param name="type"> <xsl:value-of select="$typevar"/> </xsl:with-param> </xsl:apply-templates> </xsl:for-each> <span style="height:1px;overflow-y:hidden">.</span></td> </xsl:for-each> </tr> </xsl:when> <xsl:otherwise> <tr style="background-color:#f0f0f0;font:10pt Tahoma;"> <td align="left"><xsl:value-of select="../../@NODE"/></td> <xsl:for-each select="PROPERTY|PROPERTY.ARRAY|PROPERTY.REFERENCE"> <xsl:variable name="typevar" select="@TYPE"/> <td> <xsl:for-each select="VALUE|VALUE.ARRAY|VALUE.REFERENCE"> <xsl:apply-templates select="."> <xsl:with-param name="type"> <xsl:value-of select="$typevar"/> </xsl:with-param> </xsl:apply-templates> </xsl:for-each> <span style="height:1px;overflow-y:hidden">.</span></td> </xsl:for-each> </tr> </xsl:otherwise> </xsl:choose> </xsl:for-each> </tr> </table> </xsl:template> <xsl:template match="VALUE.ARRAY"> <xsl:param name="type"/> {<xsl:for-each select="VALUE"> <xsl:apply-templates select="."> <xsl:with-param name="type"> <xsl:value-of select="$type"/> </xsl:with-param> <xsl:with-param name="isarray">true</xsl:with-param> <xsl:with-param name="includequotes">true</xsl:with-param> </xsl:apply-templates> <xsl:if test="position()!=last()">,</xsl:if> </xsl:for-each>} </xsl:template> <xsl:template match="VALUE"> <xsl:param name="type"/> <xsl:param name="includequotes"/> <xsl:param name="isarray"/> <xsl:choose> <xsl:when test="$type='string'"> <xsl:if test="$includequotes='true'">"</xsl:if><xsl:value-of select="."/><xsl:if test="$includequotes='true'">"</xsl:if> </xsl:when> <xsl:when test="$type='char16'"> '<xsl:value-of select="."/>' </xsl:when> <xsl:when test="$type='uint16'or $type='uint32' or $type='uint64' or $type='uint8' or $type='real32'or $type='real64' or $type='sint16'or $type='sint32' or $type='sint64' or $type='sint8'"> <xsl:if test="$isarray='true'"><xsl:value-of select="."/></xsl:if> <xsl:if test="not($isarray='true')"><div align="right"><xsl:value-of select="."/></div></xsl:if> </xsl:when> <xsl:otherwise> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="VALUE.REFERENCE"><xsl:apply-templates select="INSTANCEPATH/NAMESPACEPATH"/><xsl:apply-templates select="INSTANCEPATH/INSTANCENAME|INSTANCENAME"/></xsl:template> <xsl:template match="NAMESPACEPATH">\\<xsl:value-of select="HOST/text()"/><xsl:for-each select="LOCALNAMESPACEPATH/NAMESPACE">\<xsl:value-of select="@NAME"/></xsl:for-each>:</xsl:template> <xsl:template match="INSTANCENAME"><xsl:value-of select="@CLASSNAME"/><xsl:for-each select="KEYBINDING"><xsl:if test="position()=1">.</xsl:if><xsl:value-of select="@NAME"/>="<xsl:value-of select="KEYVALUE/text()"/>"<xsl:if test="position()!=last()">,</xsl:if></xsl:for-each></xsl:template> <xsl:template match="/" > <html> <H3><xsl:value-of select="$title" /> <xsl:value-of select="count(COMMAND/RESULTS/CIM/INSTANCE)"/> Instances of <xsl:value-of select="COMMAND/RESULTS/CIM/INSTANCE[1]/@CLASSNAME"/></H3> <xsl:apply-templates select="COMMAND"/> </html> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:emu="http://www.phys.ufl.edu/cms/emu/dqm" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <xsl:output method="text" omit-xml-declaration="yes" indent="no"/> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:text> // ============== Start generated from emuDQMBooking.xml by emuBooking2RenderPlugin.xsl ================== </xsl:text> <xsl:apply-templates select="/emu:Booking/emu:Histogram" mode="frame" /> <xsl:text> // ============== End generated from emuDQMBooking.xml by emuBooking2RenderPlugin.xsl ================== </xsl:text> </xsl:template> <xsl:template match="emu:Histogram" mode="frame"> <xsl:text>if(reMatch(".*/</xsl:text> <xsl:value-of select="emu:Name"/> <xsl:text>$", o.name)) { </xsl:text> <xsl:variable name="def" select="@ref" /> <xsl:if test="$def != ''"> <xsl:text> /** Applying definition [</xsl:text> <xsl:value-of select="$def"/> <xsl:text>] **/ </xsl:text> <xsl:apply-templates select="/emu:Booking/emu:Definition[@id = $def]" mode="definition" /> </xsl:if> <xsl:text> /** Applying histogram **/ </xsl:text> <xsl:apply-templates select="." mode="definition" /> <xsl:text> return; } </xsl:text> </xsl:template> <xsl:template match="emu:Histogram|emu:Definition" mode="definition"> <xsl:apply-templates select="emu:SetLeftMargin"/> <xsl:apply-templates select="emu:SetRightMargin"/> <xsl:apply-templates select="emu:SetStats"/> <xsl:apply-templates select="emu:SetOptStat"/> <xsl:apply-templates select="emu:SetOption"/> <xsl:apply-templates select="emu:SetGridx[1]"/> <xsl:apply-templates select="emu:SetGridy[1]"/> <xsl:if test="emu:SetLogx = 1 or emu:SetLogy = 1 or emu:SetLogz = 1"> <xsl:text> if(obj->GetMinimum() == obj->GetMaximum()) { obj->SetMaximum(obj->GetMinimum() + 0.01); } </xsl:text> </xsl:if> <xsl:apply-templates select="emu:SetLogx[1]"/> <xsl:apply-templates select="emu:SetLogy[1]"/> <xsl:apply-templates select="emu:SetLogz[1]"/> </xsl:template> <xsl:template match="emu:SetLeftMargin|emu:SetRightMargin"> <xsl:text> gPad-></xsl:text> <xsl:value-of select="name()"/> <xsl:text>(</xsl:text> <xsl:value-of select="."/> <xsl:text>); </xsl:text> </xsl:template> <xsl:template match="emu:SetRightMargin"> <xsl:text> gPad->SetRightMargin(</xsl:text> <xsl:value-of select="."/> <xsl:text>); </xsl:text> </xsl:template> <xsl:template match="emu:SetStats"> <xsl:text> obj->SetStats(</xsl:text> <xsl:choose> <xsl:when test=". = 1"><xsl:text>true</xsl:text></xsl:when> <xsl:when test=". = 0"><xsl:text>false</xsl:text></xsl:when> </xsl:choose> <xsl:text>); </xsl:text> </xsl:template> <xsl:template match="emu:SetOptStat"> <xsl:text> gStyle->SetOptStat("</xsl:text> <xsl:value-of select="."/> <xsl:text>"); </xsl:text> </xsl:template> <xsl:template match="emu:SetOption"> <xsl:text> obj->SetOption("</xsl:text> <xsl:value-of select="."/> <xsl:text>"); </xsl:text> </xsl:template> <xsl:template match="emu:SetGridx[1]|emu:SetGridy[1]|emu:SetLogx[1]|emu:SetLogy[1]|emu:SetLogz[1]"> <xsl:text> gPad-></xsl:text> <xsl:value-of select="name()"/> <xsl:text>(); </xsl:text> </xsl:template> </xsl:stylesheet>
<filename>admin/wmi/wbem/xmltransport/samples/cpumon/list.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <xsl:for-each select="CIM//INSTANCE"> <DIV CLASS="button"> <xsl:attribute name="onMouseOver"> over(this) </xsl:attribute> <xsl:attribute name="onMouseOut"> out(this) </xsl:attribute> <xsl:attribute name="onClick"> DoFullOperation('<xsl:apply-templates select="ancestor(VALUE.NAMEDOBJECT)//INSTANCENAME"/>') </xsl:attribute> <xsl:value-of select="PROPERTY[@NAME='DeviceID']/VALUE"/> <SPAN CLASS="arrow">4</SPAN> </DIV> </xsl:for-each> </xsl:template> <xsl:template match="INSTANCENAME"> <xsl:value-of select="@CLASSNAME"/><xsl:apply-templates/> </xsl:template> <xsl:template match="KEYBINDING"> <xsl:if match="KEYBINDING[0]">.</xsl:if> <xsl:value-of select="@NAME"/>=<xsl:apply-templates/> <xsl:if match="KEYBINDING[$not$ end()]">,</xsl:if> </xsl:template> <xsl:template match="KEYVALUE"> <xsl:choose> <xsl:when match="*[@TYPE='string']/VALUE">"<xsl:value-of/>"</xsl:when> <xsl:when match="*[@TYPE='datetime']/VALUE">"<xsl:value-of/>"</xsl:when> <xsl:when match="*[@TYPE='char16']/VALUE">"<xsl:value-of/>"</xsl:when> <xsl:otherwise>"<xsl:value-of/>"</xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
<gh_stars>10-100 <?xml version="1.0"?> <!-- Generic stylesheet for viewing XML --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <!-- This template will always be executed, even if this stylesheet is not run on the document root --> <xsl:template> <DIV STYLE="font-family:Courier; font-size:10pt; margin-bottom:2em"> <!-- Scoped templates are used so they don't interfere with the "kick-off" template. --> <xsl:apply-templates select="."> <xsl:template><xsl:apply-templates/></xsl:template> <xsl:template match="*"> <DIV STYLE="margin-left:1em; color:gray"> &lt;<xsl:node-name/><xsl:apply-templates select="@*"/>/&gt; </DIV> </xsl:template> <xsl:template match="*[node()]"> <DIV STYLE="margin-left:1em"> <SPAN STYLE="color:gray">&lt;<xsl:node-name/><xsl:apply-templates select="@*"/>&gt;</SPAN><xsl:apply-templates select="node()"/><SPAN STYLE="color:gray">&lt;/<xsl:node-name/>&gt;</SPAN> </DIV> </xsl:template> <xsl:template match="@*"> <SPAN STYLE="color:navy"> <xsl:node-name/>="<SPAN STYLE="color:black"><xsl:value-of /></SPAN>"</SPAN> </xsl:template> <xsl:template match="pi()"> <DIV STYLE="margin-left:1em; color:maroon">&lt;?<xsl:node-name/><xsl:apply-templates select="@*"/>?&gt;</DIV> </xsl:template> <xsl:template match="cdata()"><pre>&lt;![CDATA[<xsl:value-of />]]&gt;</pre></xsl:template> <xsl:template match="textNode()"><xsl:value-of /></xsl:template> </xsl:apply-templates> </DIV> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <!-- Only one of the following should be active. Use sfw_debug.xsl to see the latest changes during development. Use sfw_compiled.xsl after running make update-client to compile the import references in sfw_debug.xsl. --> <xsl:import href="includes/sfw_debug.xsl" /> <!-- <xsl:import href="includes/sfw_compiled.xsl" /> --> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" version="1.0" indent="yes" omit-xml-declaration="yes" encoding="utf-8"/> <xsl:template match="/"> <html> <head> <title>**Default SchemaFW Title**</title> <!-- SchemaFW includes --> <xsl:apply-templates select="." mode="fill_head"> <!-- Change jscripts variable value to 'min' (or anything other than default) to use sfw.min.js. Make sure that the scripts are minimized first. Consult script 'install' to see how it's done with uglify-js. --> <xsl:with-param name="jscripts">debug</xsl:with-param> </xsl:apply-templates> </head> <body> <div id="SFW_Header"> <h1>**Default SchemaFW Header**</h1> <xsl:apply-templates select="*/navigation" mode="header" /> </div> <div id="SFW_Content"> <div class="SFW_Host"> <xsl:call-template name="fill_host" /> </div> </div> </body> </html> </xsl:template> <!-- The following two should not be here. They should be moved to sfwtemplates.xsl or removed entirely. They remain only until I decide the best option. --> <xsl:template match="row" mode="make_option"> <xsl:element name="option"> <xsl:attribute name="value"> <xsl:value-of select="@value" /> </xsl:attribute> <xsl:value-of select="@label" /> </xsl:element> </xsl:template> <xsl:template match="*[@xsl_mode='lookup']"> <xsl:apply-templates select="row" mode="make_option" /> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <HTML> <HEAD> <meta http-equiv="Content-Language" content="en-us" /> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <meta name="GENERATOR" content="Microsoft FrontPage 4.0" /> <meta name="ProgId" content="FrontPage.Editor.Document" /> <title>Microsoft Application Search</title> <LINK REL="stylesheet" TYPE="text/css" HREF="..\fileassoc.css" /> </HEAD> <BODY> <xsl:for-each select="MSFILEASSOCIATIONS"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="280"> <img border="0" src="http://www.microsoft.com/windows/images/bnrWinfam.gif" width="250" height="60" /> </td> <td ALIGN="Left" width="70%"> <font size="5"><b>Windows File Associations</b></font> </td> </tr> <tr> <td width="100%" colspan="2" BGCOLOR="#0099FF"> <b> <font COLOR="#FFFFFF" size="2" STYLE="color:#FFFFFF;text-decoration:none;"> </font> <a HREF="http://www.microsoft.com/windows/default.asp" TARGET="_top"> <font color="#FFFFFF" size="2" STYLE="text-decoration: none">Windows Home Pages</font> </a> <font COLOR="#FFFFFF" size="2" STYLE="color:#FFFFFF;text-decoration:none;"> <font COLOR="#FFFFFF">|</font> </font> </b> </td> </tr> </table> <font size="2"> <BR/> Windows has the following information about this file type. This page will help you find software needed to open your file. <BR/> <BR/> <BR/> <P><B>File Type: </B> <xsl:value-of select="FILETYPENAME"/> </P> <xsl:if test="FILEEXT"> <P><B>File Extension: </B> .<xsl:value-of select="FILEEXT"/> </P> </xsl:if> <B>Description: </B> <xsl:value-of select="DESCRIPTION" disable-output-escaping='yes'/> <BR/> <xsl:if test="APP"> <ul> Software or information available at: <xsl:for-each select="APP"> <li> <A> <xsl:attribute name="HREF"> <xsl:value-of select="URL"/> </xsl:attribute> <xsl:value-of select="NAME"/> </A> </li> </xsl:for-each> </ul> <BR/> </xsl:if> <IFRAME FRAMEBORDER="0" SCROLLING="NO" WIDTH="100%" HEIGHT="80" SRC="SearchE.xml"></IFRAME> <BR/> <BR/> <BR/> Have questions? See these <a href="../faq.asp">Frequently Asked Questions</a> or send us <a href="mailto:<EMAIL>">Feedback</a>. <BR/> <BR/> <font size="1"> <hr color="#cccccc" noShade="true" SIZE="1" /> </font> <copyright>Copyright &#169;2001 Microsoft Corporation. All rights reserved.</copyright> <a href="http://www.microsoft.com/info/cpyright.htm">Terms of Use</a> <font color="#3366cc">|</font> <a href="http://www.microsoft.com/enable/telecomm.htm">Disability/accessibility</a> <font color="#3366cc">|</font> <a href="http://www.microsoft.com/info/privacy.htm">Privacy Statement</a> </font> </xsl:for-each> </BODY> </HTML> </xsl:template> </xsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:template match="book"> <head> <title>六書音均表</title> <link rel="stylesheet" href="lsyj.css" type="text/css" /> </head> <body> <xsl:apply-templates/> </body> </xsl:template> <xsl:template match="preface"> <xsl:apply-templates/> </xsl:template> <xsl:template match="content"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="catalogs"> <xsl:apply-templates/> </xsl:template> <xsl:template match="catalogtitle"> <h2><xsl:apply-templates/></h2> </xsl:template> <xsl:template match="author"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="note"> <span style='font-size: 50%'><xsl:apply-templates/></span> </xsl:template> <xsl:template match="catalog"> <h4> <xsl:element name="a"> <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </h4> </xsl:template> <xsl:template match="word_num"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="preface_title"> <h3><xsl:apply-templates/></h3> </xsl:template> <xsl:template match="table"> <xsl:element name="div"> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="tabletitle"> <h3><xsl:apply-templates/></h3> </xsl:template> <xsl:template match="prevue"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="seventeen_parts"> <table><xsl:apply-templates/></table> </xsl:template> <xsl:template match="seventeen_part"> <xsl:element name="tr"> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template> <xsl:template match="seventeen_part/partname"> <th><xsl:apply-templates/></th> </xsl:template> <xsl:template match="fourtune"> <td><xsl:apply-templates/></td> </xsl:template> <xsl:template match="rhythmic_entry"> <p><xsl:element name="a"> <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> <xsl:apply-templates/> </xsl:element></p> </xsl:template> <xsl:template match="midtitle"> <h4><xsl:apply-templates/></h4> </xsl:template> <xsl:template match="endtable"> <h4><xsl:apply-templates/></h4> <hr/> </xsl:template> <xsl:template match="tone_parts"> <table> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="tone_part"> <xsl:apply-templates select="partname"/> <xsl:for-each select="partial_tone[(position() mod 4) = 1]"> <xsl:call-template name="row"/> </xsl:for-each> <xsl:apply-templates select="explanation"/> </xsl:template> <xsl:template match="tone_part/partname"> <tr><th colspan="4"> <xsl:element name="a"> <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </th></tr> </xsl:template> <xsl:template match="tone_part/explanation"> <tr><td colspan="4"><xsl:apply-templates/></td></tr> </xsl:template> <xsl:template name="row"> <tr> <xsl:apply-templates select="."/> <xsl:apply-templates select="following-sibling::partial_tone[position()=1]"/> <xsl:apply-templates select="following-sibling::partial_tone[position()=2]"/> <xsl:apply-templates select="following-sibling::partial_tone[position()=3]"/> </tr> </xsl:template> <xsl:template match="partial_tone"> <td><xsl:apply-templates/></td> </xsl:template> <xsl:template match="sorts"> <table> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="sort"> <xsl:apply-templates select="sortname"/> </xsl:template> <xsl:template match="sortname"> <tr> <xsl:element name="td"> <xsl:attribute name="rowspan"><xsl:value-of select="count(following-sibling::part_entry)"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> <xsl:apply-templates select="following-sibling::part_entry[position()=1]"/> </tr> <xsl:for-each select="following-sibling::part_entry[position()>1]"> <tr><xsl:apply-templates select="."/></tr> </xsl:for-each> </xsl:template> <xsl:template match="part_entry"> <td><xsl:apply-templates/></td> </xsl:template> <!-- table 4 --> <xsl:template match="parts"> <xsl:apply-templates/> </xsl:template> <xsl:template match="part"> <hr/> <xsl:apply-templates/> </xsl:template> <xsl:template match="part/partname"> <h4> <xsl:element name="a"> <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> <xsl:apply-templates/> </xsl:element> </h4> </xsl:template> <xsl:template match="verses"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="verse"> <xsl:apply-templates/><br/> </xsl:template> <xsl:template match="letter"> <xsl:apply-templates/><br/> </xsl:template> <xsl:template match="origin_tune"> <span style="text-emphasis-style: open sesame; font-weight: bold;"><xsl:apply-templates/></span> </xsl:template> <xsl:template match="synactic_tune"> <span style="border-style: solid"><xsl:apply-templates/></span> </xsl:template> <xsl:template match="rhyme"> <hr/><p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="rhymetitle"> <span style="border-style: solid; font-size: 120%;"><xsl:apply-templates/></span><br/> </xsl:template> <xsl:template match="word"> <xsl:apply-templates/><br/> </xsl:template> </xsl:stylesheet>
<reponame>LaudateCorpus1/RosettaCodeData <table> <tr><td>_</td><td>_</td><td>_</td></tr> <tr><td>X</td><td>X</td><td>X</td></tr> <tr><td>_</td><td>_</td><td>_</td></tr> </table>
<filename>admin/wmi/wbem/xmltransport/samples/xmltestdhtml/wmimof20.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <!-- Root template selects all children of the CIM/DECLARATIONS tag --> <xsl:template match="/"> <xsl:apply-templates select="CIM//CLASS"/> <xsl:apply-templates select="CIM//INSTANCE"/> </xsl:template> <!-- CLASS template formats a single CIM non-association class --> <xsl:template match="CLASS"> <DIV CLASS="mofclass"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/><br/></SPAN> <SPAN CLASS="mofkeyword">class</SPAN> <xsl:value-of select="@NAME"/> <xsl:apply-templates select="CLASSPATH"/> <xsl:if match="*[@SUPERCLASS]"> <SPAN CLASS="mofsymbol">: </SPAN><xsl:value-of select="@SUPERCLASS"/> </xsl:if> <BR/> <SPAN CLASS="mofsymbol">{</SPAN><BR/> <xsl:apply-templates select="PROPERTY"/> <xsl:apply-templates select="PROPERTY.ARRAY"/> <xsl:apply-templates select="PROPERTY.REFERENCE"/> <xsl:apply-templates select="METHOD"/> <SPAN CLASS="mofsymbol">};</SPAN> </DIV> </xsl:template> <!-- QUALIFIER template formats a list of qualifier name/value pairs --> <xsl:template match="QUALIFIER"> <xsl:if match="QUALIFIER[0]"><SPAN CLASS="mofsymbol">[</SPAN></xsl:if> <SPAN CLASS="mofqualifier"><xsl:value-of select="@NAME"/></SPAN> <SPAN CLASS="mofsymbol">(</SPAN><xsl:apply-templates/><SPAN CLASS="mofsymbol">)</SPAN><xsl:if match="QUALIFIER[$not$ end()]">, </xsl:if> <xsl:if match="QUALIFIER[end()]"><SPAN CLASS="mofsymbol">]</SPAN> </xsl:if> </xsl:template> <!-- VALUE template formats a non-array property or qualifier value --> <xsl:template match="VALUE"> <xsl:if match="PROPERTY/VALUE"><SPAN CLASS="mofsymbol">=</SPAN></xsl:if> <xsl:choose> <xsl:when match="*[@TYPE='string']/VALUE"><SPAN CLASS="mofstring">"<xsl:value-of/>"</SPAN></xsl:when> <xsl:when match="*[@TYPE='datetime']/VALUE"><SPAN CLASS="mofstring">"<xsl:value-of/>"</SPAN></xsl:when> <xsl:when match="*[@TYPE='char16']/VALUE"><SPAN CLASS="mofchar">'<xsl:value-of/>'</SPAN></xsl:when> <xsl:otherwise><SPAN CLASS="mofvalue"><xsl:value-of/></SPAN></xsl:otherwise> </xsl:choose> </xsl:template> <!-- VALUE.ARRAY/VALUE template formats an array or qualifier property --> <!-- value element --> <xsl:template match="VALUE.ARRAY/VALUE"> <xsl:choose> <xsl:when match="*[@TYPE='string']/VALUE.ARRAY/VALUE"><SPAN CLASS="mofstring">"<xsl:value-of/>"</SPAN></xsl:when> <xsl:when match="*[@TYPE='datetime']/VALUE.ARRAY/VALUE"><SPAN CLASS="mofstring">"<xsl:value-of/>"</SPAN></xsl:when> <xsl:when match="*[@TYPE='char16']/VALUE.ARRAY/VALUE"><SPAN CLASS="mofchar">'<xsl:value-of/>'</SPAN></xsl:when> <xsl:otherwise><SPAN CLASS="mofvalue"><xsl:value-of/></SPAN></xsl:otherwise> </xsl:choose> <xsl:if match="VALUE[$not$ end()]">,</xsl:if> </xsl:template> <!-- VALUE.ARRAY template formats an array property or qualifier value --> <xsl:template match="VALUE.ARRAY"> <xsl:if match="PROPERTY.ARRAY/VALUE.ARRAY"><SPAN CLASS="mofsymbol">=</SPAN></xsl:if> <SPAN CLASS="mofsymbol">{</SPAN><xsl:apply-templates select="VALUE"/><SPAN CLASS="mofsymbol">}</SPAN> </xsl:template> <!-- CLASSPATH template --> <xsl:template match="CLASSPATH"> <xsl:value-of select="@CLASSNAME"/> </xsl:template> <!-- PROPERTY template formats a single CIM non-array property --> <xsl:template match="PROPERTY"> <DD> <DIV CLASS="mofproperty"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/></SPAN> <SPAN CLASS="mofkeyword"><xsl:value-of select="@TYPE"/></SPAN> <SPAN CLASS="mofproperty"><xsl:value-of select="@NAME"/></SPAN> <xsl:apply-templates select="VALUE"/> <SPAN CLASS="mofsymbol">;</SPAN><BR/> </DIV> </DD> </xsl:template> <!-- PROPERTY.ARRAY template formats a single CIM array property --> <xsl:template match="PROPERTY.ARRAY"> <DD> <DIV CLASS="mofproperty"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/></SPAN> <SPAN CLASS="mofkeyword"><xsl:value-of select="@TYPE"/></SPAN> <SPAN CLASS="mofproperty"><xsl:value-of select="@NAME"/></SPAN> <SPAN CLASS="mofsymbol">[</SPAN><xsl:value-of select="@ARRAYSIZE"/><SPAN CLASS="mofsymbol">]</SPAN> <xsl:apply-templates select="VALUE.ARRAY"/><SPAN CLASS="mofsymbol">;</SPAN><BR/> </DIV> </DD> </xsl:template> <!-- METHOD template formats a single CIM method --> <xsl:template match="METHOD"> <DIV CLASS="mofmethod"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/></SPAN> <SPAN CLASS="mofkeyword"><xsl:value-of select="@TYPE"/></SPAN> <SPAN CLASS="mofmethod"><xsl:value-of select="@NAME"/></SPAN> <SPAN CLASS="mofsymbol">(</SPAN> <xsl:apply-templates select="METHODPARAMETER"/> <SPAN CLASS="mofsymbol">);</SPAN> </DIV> </xsl:template> <!-- METHODPARAMETER template formats a single CIM method parameter --> <xsl:template match="METHODPARAMETER"> <DIV CLASS="mofmethodparameter"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/></SPAN> <xsl:choose> <xsl:when match="METHODPARAMETER/PARAMETER"> <SPAN CLASS="mofkeyword"><xsl:value-of select="METHODPARAMETER/PARAMETER[@TYPE]"/></SPAN> </xsl:when> <xsl:when match="METHODPARAMETER/PARAMETER.REFERENCE"> <SPAN CLASS="mofkeyword">object ref</SPAN> </xsl:when> <xsl:when match="METHODPARAMETER/PARAMETER.REFERENCE[@REFERENCECLASS]"> <SPAN CLASS="mofkeyword"><xsl:value-of select="METHODPARAMETER/PARAMETER.REFERENCE[@REFERENCECLASS]"/> ref</SPAN> </xsl:when> </xsl:choose> <xsl:value-of select="@NAME"/><xsl:if match="METHODPARAMETER[$not$ end()]"><SPAN CLASS="mofsymbol">,</SPAN> </xsl:if> </DIV> </xsl:template> <!-- INSTANCE template formats a single CIM non-association instance --> <xsl:template match="INSTANCE"> <DIV CLASS="mofinstance"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/><br/></SPAN> <SPAN CLASS="mofkeyword">instance of</SPAN> <xsl:value-of select="@CLASSNAME"/> <SPAN CLASS="mofsymbol">{</SPAN><BR/> <DL> <xsl:apply-templates select="PROPERTY"/> <xsl:apply-templates select="PROPERTY.ARRAY"/> <xsl:apply-templates select="PROPERTY.REFERENCE"/> </DL> <SPAN CLASS="mofsymbol">};</SPAN> </DIV> </xsl:template> <!-- INSTANCEPATH template --> <xsl:template match="INSTANCEPATH"> <xsl:value-of select="@CLASSNAME"/> </xsl:template> <!-- VALUE.REFERENCE template formats a reference property value --> <xsl:template match="VALUE.REFERENCE"> <SPAN CLASS="mofsymbol">=</SPAN> <SPAN CLASS="mofstring">"<xsl:apply-templates/>"</SPAN> </xsl:template> <xsl:template match="KEYBINDING/VALUE.REFERENCE"> <SPAN CLASS="mofstring">"<xsl:apply-templates/>"</SPAN> </xsl:template> <xsl:template match="VALUE.REFERENCE/CLASSPATH"> <xsl:apply-templates match="NAMESPACEPATH"/>:<xsl:value-of select="@CLASSNAME"/> </xsl:template> <xsl:template match="VALUE.REFERENCE/INSTANCEPATH"> <xsl:apply-templates match="NAMESPACEPATH"/>:<xsl:value-of select="@CLASSNAME"/>.<xsl:apply-templates match="KEYBINDING"/> </xsl:template> <xsl:template match="VALUE.REFERENCE/CLASSNAME"> <xsl:value-of select="@NAME"/> </xsl:template> <xsl:template match="VALUE.REFERENCE/INSTANCENAME"> <xsl:value-of select="@CLASSNAME"/>.<xsl:apply-templates match="KEYBINDING"/> </xsl:template> <!-- NAMESPACEPATH template formats a reference property value --> <xsl:template match="NAMESPACEPATH"> <xsl:if match="NAMESPACEPATH[HOST]">//<xsl:value-of match="HOST"/></xsl:if><xsl:apply-templates match="NAMESPACE"/> </xsl:template> <xsl:template match="NAMESPACE">/<xsl:value-of select="@NAME"/><xsl:apply-templates match="NAMESPACE"/></xsl:template> <!-- KEYBINDING template formats a reference property value --> <xsl:template match="KEYBINDING"> <xsl:value-of select="@NAME"/>=<xsl:apply-templates/><xsl:if match="KEYBINDING[$not$ end()]">,</xsl:if> </xsl:template> <xsl:template match="KEYVALUE"> <xsl:choose> <xsl:when match="*[@TYPE='numeric']/VALUE"><SPAN CLASS="mofvalue"><xsl:value-of/></SPAN></xsl:when> <xsl:when match="*[@TYPE='boolean']/VALUE"><SPAN CLASS="mofvalue"><xsl:value-of/></SPAN></xsl:when> <xsl:otherwise><SPAN CLASS="mofstring">"<xsl:value-of/>"</SPAN></xsl:otherwise> </xsl:choose> </xsl:template> <!-- PROPERTY.REFERENCE template formats a single CIM reference property --> <xsl:template match="PROPERTY.REFERENCE"> <DIV CLASS="mofproperty"> <SPAN CLASS="mofqualifierset"><![CDATA[ ]]><xsl:apply-templates select="QUALIFIER"/></SPAN> <SPAN CLASS="mofkeyword"> <xsl:choose> <xsl:when match="*[@REFERENCECLASS]"><xsl:value-of select="@REFERENCECLASS"/> ref</xsl:when> <xsl:otherwise>object ref</xsl:otherwise> </xsl:choose> </SPAN> <SPAN CLASS="mofproperty"><xsl:value-of select="@NAME"/></SPAN> <xsl:apply-templates select="VALUE.REFERENCE"/> <SPAN CLASS="mofsymbol">;</SPAN><BR/> </DIV> </xsl:template> </xsl:stylesheet>
<reponame>hanshuebner/cadr2 <?xml version="1.0" encoding="iso-8859-1" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template name="navigation"> <div id="navigation"> <div class="nav-button"><a href="frontpage.html">Home</a></div> <div class="nav-button"><a href="toc.html">Contents</a></div> <div class="nav-button"><a href="index.xml">Index</a></div> <br/> <div class="nav-button" onclick="page_down();">Down</div> </div> </xsl:template> </xsl:stylesheet>
<xsl:template name="logic"> <xsl:param name="a" select="true()"/> <xsl:param name="b" select="false()"/> <fo:block>a and b = <xsl:value-of select="$a and $b"/></fo:block> <fo:block>a or b = <xsl:value-of select="$a or $b"/></fo:block> <fo:block>not a = <xsl:value-of select="not($a)"/></fo:block> </xsl:template>
<gh_stars>10-100 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:template match="/"> <b> <xsl:text>Current iMPACT Usage Statistics.</xsl:text> <br></br> <xsl:text>Copyright (c) 1995-2010 Xilinx, Inc. All rights reserved.</xsl:text> </b> <br></br> <br></br> <xsl:text>This page displays the current iMPACT device usage statistics that will be sent to Xilinx using WebTalk.</xsl:text> <table width = "100%" border="1" CELLSPACING="0" cols="50% 50%"> <xsl:for-each select="document/application/section"> <tr> <th COLSPAN="2" BGCOLOR="#99CCFF"><xsl:value-of select="@name"/></th> </tr> <xsl:for-each select="property"> <tr> <td><xsl:value-of select="@name"/></td> <td><xsl:value-of select="@value"/></td> </tr> </xsl:for-each> <xsl:for-each select="item"> <tr> <td COLSPAN="2" BGCOLOR="#FFFF99"><b><xsl:value-of select="@name"/></b></td> </tr> <xsl:value-of select="@value"/> <xsl:for-each select="property"> <tr> <td><xsl:value-of select="@name"/></td> <td><xsl:value-of select="@value"/>&#x20;</td> </tr> </xsl:for-each> </xsl:for-each> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet> <!-- <xsl:if test="position() != last()"> <h1><xsl:text> </xsl:text></h1></xsl:if> -->
<filename>Task/Averages-Arithmetic-mean/XSLT/averages-arithmetic-mean-3.xslt <numbers> <!-- Average is 2.4 --> <number>1</number> <number>1</number> <number>2</number> <number>3</number> <number>5</number> </numbers>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/"> <hallway> <xsl:for-each select="1 to 100"> <xsl:variable name="door-num" select="position()" /> <door number="{$door-num}"> <xsl:value-of select="('closed','open')[ number( sum( for $pass in 1 to 100 return number(($door-num mod $pass) = 0)) mod 2 = 1) + 1]" /> </door> </xsl:for-each> </hallway> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html"> <xsl:import href="sfw_utilities.xsl" /> <xsl:import href="sfw_variables.xsl" /> <xsl:import href="sfw_form.xsl" /> <xsl:import href="sfw_table.xsl" /> <xsl:import href="sfw_mixed_view.xsl" /> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" version="1.0" indent="yes" omit-xml-declaration="yes" encoding="UTF-8"/> <!-- The javascript in the framework accesses the mode-less apply-templates element in this template to temporarily set a mode attribute according to a selected view. This template can be replaced in your own default.xsl file by simply defining a template with the same match and mode values. In this way, the rendering of an SFW_Host can be customized according to a project's requirements. Make sure that any replacement includes an apply-templates element with select="." so the framework can find it. --> <xsl:template match="*[@rndx]" mode="result_fill_host"> <xsl:param name="primary" /> <xsl:apply-templates select="." mode="construct_host_top" /> <xsl:apply-templates select="."> <xsl:with-param name="primary" select="$primary" /> </xsl:apply-templates> </xsl:template> <!-- This template is called directly from the framework using the transformFill() function with a view element. --> <xsl:template match="views/view"> <xsl:variable name="rname" select="@result" /> <xsl:variable name="result" select="/*/*[@rndx][local-name()=$rname]" /> <xsl:if test="$result"> <xsl:apply-templates select="$result" mode="result_fill_sfw_host" /> </xsl:if> </xsl:template> <!-- Fundamental template for filling the initial SFW_Host element that should be in a SFW_Content element in the HTML body element. This template acts based on global variables found in sfw_variables.xsl. Concerning the xsl:choose paths. 1. Check for pre-empting error message with the $err_condition flag, or 2. check for schema for building some type of form, or finally, 3. check for a result to build a table or some custom otuput. --> <xsl:template name="fill_host"> <xsl:param name="primary" /> <xsl:apply-templates select="/*" mode="make_schemafw_meta" /> <xsl:variable name="cprimary"> <xsl:choose> <xsl:when test="$primary"><xsl:value-of select="$primary" /></xsl:when> <xsl:when test="$mode-type='form-page'"><xsl:value-of select="true()" /></xsl:when> </xsl:choose> </xsl:variable> <xsl:choose> <xsl:when test="$err_condition &gt; 0"> <xsl:call-template name="display_error" /> <xsl:apply-templates select="@meta-jump" mode="make_jump_link" /> </xsl:when> <xsl:when test="/*[$mode-type='mixed-view']"> <xsl:apply-templates select="/*" mode="construct_mixed_view"> <xsl:with-param name="primary" select="$primary" /> </xsl:apply-templates> </xsl:when> <xsl:when test="$gschema"> <xsl:apply-templates select="$gschema" mode="construct_form"> <xsl:with-param name="primary" select="$cprimary" /> </xsl:apply-templates> </xsl:when> <xsl:when test="$gresult"> <xsl:apply-templates select="$gresult" mode="result_fill_host"> <xsl:with-param name="primary" select="$cprimary" /> </xsl:apply-templates> </xsl:when> </xsl:choose> </xsl:template> <xsl:template match="*[@rndx]" mode="construct_host_top"> <xsl:apply-templates select="." mode="construct_host_title" /> <xsl:if test="/*/views"> <xsl:apply-templates select="/*/views" mode="construct_view_set" /> </xsl:if> </xsl:template> <!-- Select and present a title, if found. Weighted selection, giving highest priority to the title attribute of the matched result, then to the title attribute of the schema (if found), then to the title attribute of the document element. Variables starting "r" are for result, "s" for schema, and "d" for document. The value to use starts with "l" for local. --> <xsl:template match="*[@rndx]" mode="construct_host_title"> <xsl:param name="schema" select="/.." /> <xsl:variable name="rschema" select="schema[not($schema)]" /> <xsl:variable name="dschema" select="/*[not($schema|$rschema)]/schema" /> <xsl:variable name="lschema" select="$schema|$rschema|$dschema" /> <xsl:variable name="rtitle" select="@title" /> <xsl:variable name="stitle" select="$lschema[not($rtitle)]/@title" /> <xsl:variable name="dtitle" select="/*[not($rtitle|$stitle)]/@title" /> <xsl:variable name="ltitle" select="$rtitle|$stitle|$dtitle" /> <xsl:variable name="rstitle" select="@subtitle" /> <xsl:variable name="sstitle" select="$lschema[not($rstitle)]/@subtitle" /> <xsl:variable name="dstitle" select="/*[not($rstitle|$sstitle)]/@subtitle" /> <xsl:variable name="lstitle" select="$rstitle|$sstitle|$dstitle" /> <xsl:if test="$ltitle"> <xsl:call-template name="construct_title"> <xsl:with-param name="str" select="$ltitle" /> </xsl:call-template> </xsl:if> <xsl:if test="$lstitle"> <h3> <xsl:call-template name="resolve_refs"> <xsl:with-param name="str" select="$lstitle" /> </xsl:call-template> </h3> </xsl:if> </xsl:template> <xsl:template match="views" mode="construct_view_set"> <xsl:param name="view" select="/.." /> <xsl:variable name="lview" select="$view | $gview/self::*[not($view)]" /> <nav class="views"> <xsl:if test="$lview"> <xsl:apply-templates select="*" mode="construct_view_choice"> <xsl:with-param name="view" select="$lview" /> </xsl:apply-templates> </xsl:if> </nav> </xsl:template> <xsl:template match="views/view" mode="construct_view_choice"> <xsl:param name="lview" select="/.." /> <xsl:element name="div"> <xsl:attribute name="data-name"><xsl:value-of select="@name" /></xsl:attribute> <xsl:attribute name="class"> <xsl:text>view_selector</xsl:text> <xsl:if test="$lview and generate-id()=generate-id($lview)"> selected</xsl:if> </xsl:attribute> <xsl:value-of select="@label" /> </xsl:element> </xsl:template> <xsl:template match="views" mode="build"> <xsl:param name="view" /> <nav class="views"> <h2><xsl:value-of select="$view/@title" /></h2> <xsl:if test="$view/@subtitle"> <h3><xsl:apply-templates select="$view/@subtitle" mode="resolve_refs" /></h3> </xsl:if> <xsl:apply-templates select="view" mode="add_choice"> <xsl:with-param name="current" select="$view" /> </xsl:apply-templates> </nav> </xsl:template> <xsl:template match="view" mode="construct_view"> <xsl:apply-templates select=".." mode="build"> <xsl:with-param name="view" select="." /> </xsl:apply-templates> </xsl:template> <xsl:template match="*[@rndx]" mode="show_views"> <xsl:variable name="view" select="*/views/view[@name=current()/@view]" /> <xsl:if test="$view"> <xsl:apply-templates select="/*/view" mode="build"> <xsl:with-param name="view" select="$view" /> </xsl:apply-templates> </xsl:if> </xsl:template> <xsl:template match="/"> <html> <head><title>Testing</title></head> <body> <pre> view count : <xsl:value-of select="count($gview)" /> result count : <xsl:value-of select="count($gresult)" /> </pre> <div class="SFW_Host"> <xsl:call-template name="fill_host" /> </div> </body> </html> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="iso-8859-1" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="datasheet"> <html> <head> <xsl:call-template name="css"/> </head> <body> <a name="top"/> <div> <xsl:apply-templates select="header"/> </div> <div class="dsheet"> <div> <xsl:apply-templates select="project-settings"/> <xsl:apply-templates select="project-settings1"/> </div> <!--div> <div class="header">Table of Contents</div> <div class="content" > <a href="#memmap">Memory Map</a> </div> </div--> <!-- ===== MEMORY MAP ====== --> <div> <a name="memmap"/> <div class="header"> Memory Map </div> <xsl:apply-templates select="memorysystem"/> </div> </div> </body> </html> </xsl:template> <xsl:template match="header"> <div class="title"> <h1> Memory Map Report: <xsl:value-of select="."/> </h1> <!-- ======= IO's ======= <div class="copyright"> Copyright 2008 Actel Corporation </div> --> </div> </xsl:template> <xsl:template match="project-settings"> <div class="header">Project Settings</div> <div class="content"> <table border="0" cellspacing="4"> <tr> <td> <b>FAM: </b> </td> <td> <xsl:apply-templates select="fam"/> </td> </tr> <tr> <td> <b>Die: </b> </td> <td> <xsl:apply-templates select="die"/> </td> </tr> <tr> <td> <b>Package: </b> </td> <td> <xsl:apply-templates select="package"/> </td> </tr> <tr> <td> <b>Speed Grade: </b> </td> <td> <xsl:apply-templates select="speed-grade"/> </td> </tr> <tr> <td> <b>Voltage: </b> </td> <td> <xsl:apply-templates select="voltage"/> </td> </tr> <tr> <td> <b>HDL: </b> </td> <td> <xsl:apply-templates select="hdl-type"/> </td> </tr> <tr> <td> <b>Project Description: </b> </td> <td> <xsl:apply-templates select="project-description"/> </td> </tr> <tr> <td> <b>Location: </b> </td> <td> <xsl:apply-templates select="location"/> </td> </tr> <tr> <td> <b>State (Time): </b> </td> <td> <xsl:apply-templates select="state"/> </td> </tr> </table> </div> <br/> </xsl:template> <xsl:template match="project-settings1"> <div class="header">Design Details</div> <div class="content"> <table border="0" cellspacing="4"> <tr> <td> <b>Family: </b> </td> <td> <xsl:apply-templates select="fam"/> </td> </tr> <tr> <td> <b>Die: </b> </td> <td> <xsl:apply-templates select="die"/> </td> </tr> <tr> <td> <b>Package: </b> </td> <td> <xsl:apply-templates select="package"/> </td> </tr> <tr> <td> <b>Speed Grade: </b> </td> <td> <xsl:apply-templates select="speed-grade"/> </td> </tr> <tr> <td> <b>Voltage: </b> </td> <td> <xsl:apply-templates select="voltage"/> </td> </tr> <tr> <td> <b>Date: </b> </td> <td> <xsl:apply-templates select="date"/> </td> </tr> <tr> <td> <b>Project Name: </b> </td> <td> <xsl:apply-templates select="project_name"/> </td> </tr> <tr> <td> <b>Project Location: </b> </td> <td> <xsl:apply-templates select="project_location"/> </td> </tr> <tr> <td width = "18%"> <b>SmartDesign name: </b> </td> <td> <xsl:apply-templates select="SmartDesign_name"/> </td> </tr> </table> </div> <br/> </xsl:template> <!-- ///////////////////////////////////////////////////////// --> <xsl:template name="print-ios"> <td> <xsl:apply-templates select="port-name"/> </td> <td> <xsl:apply-templates select="direction"/> </td> <td> <xsl:apply-templates select="pin-number"/> </td> <td> <xsl:apply-templates select="io-standard"/> </td> </xsl:template> <xsl:template name="ios"> <xsl:choose> <xsl:when test="count(io) &gt; 0"> <table class="ios" align="center" border="1" width="75%" cellspacing="0" cellpadding="4"> <tr> <th> Port Name </th> <th> Direction </th> <th> Pin </th> <th> I/O Standard </th> </tr> <xsl:for-each select="io"> <tr> <xsl:call-template name="print-ios"/> </tr> </xsl:for-each> </table> </xsl:when> <xsl:otherwise> <i>No IO's </i> <br/> <br/> </xsl:otherwise> </xsl:choose> <xsl:call-template name="top-link"/> </xsl:template> <!-- ///////////////////////////////////////////////////////// --> <xsl:template name="firmware_cores"> <xsl:choose> <xsl:when test="count(firmware_core) &gt; 0"> <!-- Core TOC --> <div class="content"> <b>Software IDE: </b> <xsl:value-of select="/datasheet/project-settings/swide-toolchain"/> <br/> <br/> <span class="instances">Drivers:</span> <br/> <xsl:for-each select="firmware_core"> <a href="#{core-name}"> <xsl:value-of select="core-name"/> </a> <br/> </xsl:for-each> <br/> <div class="toplinks"> <xsl:call-template name="top-link"/> </div> </div> <xsl:for-each select="firmware_core"> <div class="content"> <!-- Core TOC --> <a name="{core-name}"/> <table class="cores" width="97%" border="0" cellspacing="0" cellpadding="14"> <!--border="1" cellspacing="0" cellpadding="14"> --> <xsl:choose> <xsl:when test='@type="FirmWareModule"'> <xsl:call-template name="print-cores-spirit"/> </xsl:when> </xsl:choose> </table> <div class="toplinks"> <a href="#cores">instance list</a>, <xsl:call-template name="top-link"/> </div> </div> <br/> </xsl:for-each> <br/> </xsl:when> <xsl:otherwise> <br/> <i>No Firmware Generated. Design may not contain any processor subsystems, or firmware have not been downloaded to your vault</i> <br/> <br/> <xsl:call-template name="top-link"/> <br/> <br/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ///////////////////////////////////////////////////////// --> <xsl:template name="cores"> <xsl:choose> <xsl:when test="count(core) &gt; 0"> <!-- Core TOC --> <div class="content"> <span class="instances">Instances:</span> <br/> <xsl:for-each select="core"> <a href="#{core-name}"> <xsl:value-of select="core-name"/> </a> <br/> </xsl:for-each> <br/> <div class="toplinks"> <xsl:call-template name="top-link"/> </div> </div> <xsl:for-each select="core"> <div class="content"> <!-- Core TOC --> <a name="{core-name}"/> <table class="cores" width="97%" border="0" cellspacing="0" cellpadding="14"> <!--border="1" cellspacing="0" cellpadding="14"> --> <xsl:choose> <xsl:when test='@type="ComponentModule"'> <xsl:call-template name="print-cores-comp"/> </xsl:when> <xsl:when test='@type="SpiritModule"'> <xsl:call-template name="print-cores-spirit"/> </xsl:when> <xsl:when test='@type="AdlibModule"'> <xsl:call-template name="print-cores-adlib"/> </xsl:when> <xsl:when test='@type="HdlModule"'> <xsl:call-template name="print-cores-hdl"/> </xsl:when> </xsl:choose> </table> <div class="toplinks"> <a href="#cores">instance list</a>, <xsl:call-template name="top-link"/> </div> </div> <br/> </xsl:for-each> <br/> </xsl:when> <xsl:otherwise> <br/> <i>No Instances</i> <br/> <br/> <xsl:call-template name="top-link"/> <br/> <br/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template name="print-cores-comp"> <tr> <td> <table border="0"> <xsl:call-template name="print-cores"/> <tr> <td> <b>Type: </b> </td> <td> <xsl:apply-templates select="core-exttype"/> </td> </tr> <tr> <td> <b>Location: </b> </td> <td> <xsl:apply-templates select="core-location"/> </td> </tr> </table> </td> </tr> </xsl:template> <xsl:template name="print-cores-spirit"> <tr> <td> <table border="0"> <xsl:call-template name="print-cores"/> <tr> <td> <b>Type: </b> </td> <td> <xsl:apply-templates select="core-exttype"/> </td> </tr> <tr> <td> <b>Vendor: </b> </td> <td> <xsl:apply-templates select="core-vendor"/> </td> </tr> <tr> <td> <b>Library: </b> </td> <td> <xsl:apply-templates select="core-lib"/> </td> </tr> <tr> <td> <b>Core Name: </b> </td> <td> <xsl:apply-templates select="core-intname"/> </td> </tr> <tr> <td> <b>Version: </b> </td> <td> <xsl:apply-templates select="core-ver"/> </td> </tr> <tr> <td> <b>Description: </b> </td> <td> <xsl:apply-templates select="core-desc"/> </td> </tr> <tr> <td> <b>Parameters: </b> </td> <td> <xsl:call-template name="print-spirit-params"/> </td> </tr> </table> </td> </tr> </xsl:template> <xsl:template name="print-spirit-params" > <xsl:if test="count(core-param) > 0"> <div style="background-color: #F0F0F0; " > <br/> <table> <!-- <tr> <th> Name </th> <th> Value </th> </tr> --> <xsl:for-each select="core-param"> <xsl:call-template name="print-core-params"/> </xsl:for-each> </table> </div> </xsl:if> <xsl:if test="count(core-param) &lt; 1"> <i>No parameters</i> </xsl:if> </xsl:template> <xsl:template name="print-cores-adlib"> <tr> <td> <table border="0"> <xsl:call-template name="print-cores"/> <tr> <td> <b>Cell Type: </b> </td> <td> <xsl:apply-templates select="core-exttype"/> </td> </tr> </table> </td> </tr> </xsl:template> <xsl:template name="print-cores-hdl"> <tr> <td> <table border="0"> <xsl:call-template name="print-cores"/> <tr> <td> <b>Module Name: </b> </td> <td> <xsl:apply-templates select="core-exttype"/> </td> </tr> <tr> <td> <b>HDL File: </b> </td> <td> <xsl:apply-templates select="core-location"/> </td> </tr> </table> </td> </tr> </xsl:template> <xsl:template name="print-cores"> <tr> <td width="200"> <b>Instance Name: </b> </td> <td> <xsl:apply-templates select="core-name"/> </td> </tr> </xsl:template> <xsl:template name="print-core-params"> <tr> <td> <b class="params-name"> <xsl:apply-templates select="param-hdlname"/> [ <xsl:apply-templates select="param-name"/> ] </b> </td> <td> <xsl:apply-templates select="param-hdlvalue"/> [ <xsl:apply-templates select="param-value"/> ] </td> </tr> </xsl:template> <!--/////////////////////////////////////////////////////////--> <xsl:template match="port-name|direction|pin-number|io-standard"> <xsl:value-of select="."/> </xsl:template > <xsl:template match="core-name|core-type|core-exttype"> <xsl:value-of select="."/> </xsl:template > <xsl:template match="core-vendor|core-lib|core-intname|core-ver|core-desc"> <xsl:value-of select="."/> </xsl:template > <xsl:template match="core-location"> <xsl:value-of select="."/> </xsl:template > <xsl:template match="fam|die|package|hdl-type|location|state"> <xsl:value-of select="."/> </xsl:template > <xsl:template match="param-name|param-value|param-tag|param-hdlname|param-hdlvalue"> <xsl:value-of select="."/> </xsl:template > <xsl:template name="top-link"> <a href="#top">top of page</a> </xsl:template> <!--=============================MEMORY MAP===================================--> <xsl:template match="memorysystem"> <div class="content"> <xsl:apply-templates select="description"/> </div> <div> <xsl:apply-templates select="subsystems"/> </div> </xsl:template> <xsl:template match="subsystems"> <xsl:for-each select="subsystem"> <ul> <li> <div class="content"> <a href="#{name} Memory Map"> <xsl:value-of select="name"/> </a> </div> </li> </ul> </xsl:for-each> <div class="content"> <div class="toplinks"> <xsl:call-template name="top-link"/> </div> </div> <br/> <hr></hr> <xsl:apply-templates select="subsystem"/> </xsl:template> <xsl:template match="subsystem"> <div class="content"> <h2> <a name="{name} Memory Map"> <xsl:value-of select="name"/> </a> </h2> <!--Comment> Master: <xsl:apply-templates select="master"/> <br></br><br></br> <Comment--> <xsl:apply-templates select="addressNames" /> <a href="#memmap">Initiator list</a>, <xsl:call-template name="top-link"/> <br/><br/> <hr></hr> <!--xsl:apply-templates select="slave"/--> </div> </xsl:template> <xsl:template match="title"> <span style="color:#000000"> <xsl:value-of select="text()"/> </span> </xsl:template> <xsl:template match="description"> <xsl:value-of select="text()"/> </xsl:template> <xsl:template match="Initiator"> <li> <div class="content"> <xsl:value-of select="text()"/> </div> </li> </xsl:template> <xsl:template match="addressNames"> <table class="regs" border="1" cellspace="0" cellpadding="10" align="center" > <xsl:if test="count = 1"> <tr bgcolor="#aaaacc"> <th rowspan="1">Target</th> <th colspan="1">Offset Address</th> <th colspan="1">Range </th> <th colspan="1">High Address </th> <!--th colspan="1">Size</th--> <th colspan="1">DRC</th> </tr> </xsl:if> <xsl:if test="count &gt; 1"> <tr bgcolor="#aaaacc"> <th rowspan="2">Target</th> <th colspan="2">Offset Address</th> <th colspan="1" rowspan="2">Range </th> <th colspan="2">High Address </th> <!--th colspan="1">Size</th--> <th colspan="1" rowspan="2">DRC</th> </tr> <tr> <xsl:for-each select="name"> <th bgcolor="#aaaacc"> <xsl:value-of select="text()"/> </th> </xsl:for-each> <xsl:for-each select="name"> <th bgcolor="#aaaacc"> <xsl:value-of select="text()"/> </th> </xsl:for-each> </tr> </xsl:if> <xsl:for-each select="../slave"> <tr> <th cellspace="0" colspan="1"> <b> <!--a class="toplinks" href="#{name}_{memoryMap/name} Register"--> <xsl:value-of select="name"/> <!--xsl:if test="memoryMap/name"> : <xsl:value-of select="memoryMap/name"/> </xsl:if--> <!--/a--> </b> </th> <xsl:for-each select="fullAddressSpace"> <td align="center"> <xsl:value-of select="substring-before(text(),'-')"/> </td> </xsl:for-each> <xsl:if test="combinedAddressSpace"> <td align="center"> <xsl:for-each select="combinedAddressSpace"> <xsl:value-of select="substring-before(text(),'-')"/> <br/> </xsl:for-each> </td> </xsl:if> <xsl:if test="../addressNames/count &gt; 1"> <xsl:for-each select="fullAddressSpace"> <xsl:variable name = "namevar" select="@name"/> <xsl:if test="not($namevar)"> <td align="center" colspan="1"> <xsl:value-of select="''"/> </td> </xsl:if> </xsl:for-each> <xsl:for-each select="combinedAddressSpace"> <xsl:variable name = "namevar" select="@name"/> <xsl:if test="not($namevar)"> <td align="center" colspan="1"> <xsl:value-of select="''"/> </td> </xsl:if> </xsl:for-each> </xsl:if> <xsl:for-each select="Size"> <td align="center"> <xsl:value-of select="text()"/> </td> </xsl:for-each> <xsl:for-each select="fullAddressSpace"> <td align="center"> <xsl:value-of select="substring-after(text(),'-')"/> </td> </xsl:for-each> <xsl:if test="combinedAddressSpace"> <td align="center"> <xsl:for-each select="combinedAddressSpace"> <xsl:value-of select="substring-after(text(),'-')"/> <br/> </xsl:for-each> </td> </xsl:if> <xsl:if test="../addressNames/count &gt; 1"> <xsl:for-each select="fullAddressSpace"> <xsl:variable name = "namevar" select="@name"/> <xsl:if test="not($namevar)"> <td align="center" colspan="1"> <xsl:value-of select="''"/> </td> </xsl:if> </xsl:for-each> <xsl:for-each select="combinedAddressSpace"> <xsl:variable name = "namevar" select="@name"/> <xsl:if test="not($namevar)"> <td align="center" colspan="1"> <xsl:value-of select="''"/> </td> </xsl:if> </xsl:for-each> </xsl:if> <xsl:if test="DRC"> <xsl:variable name = "msg" select="DRC/text()"/> <xsl:variable name="submsg" select="substring($msg,1,7)"/> <xsl:variable name="Errmsg" select = "'Error'"/> <xsl:variable name="submsg1"> <xsl:value-of select = "substring($msg,1,7)"/> </xsl:variable> <xsl:if test="contains($submsg1,$Errmsg)"> <td cellspace="0" colspan="1" bgcolor="#FFFFFF"> <font color="AF0000"> <xsl:value-of select="DRC/text()"/> <!--xsl:value-of select="text()"/--> </font> </td> </xsl:if> <xsl:variable name="Warnmsg" select = "'Warning'"/> <xsl:if test="contains($submsg1,$Warnmsg)"> <td cellspace="0" colspan="1" bgcolor="#FFFFFF"> <font color="#CFB000"> <xsl:value-of select="DRC/text()"/> </font> </td> </xsl:if> <xsl:variable name="Infomsg" select = "'Info'"/> <xsl:if test="contains($submsg1,$Infomsg)"> <td cellspace="0" colspan="1" bgcolor="#FFFFFF"> <font color="#0000FF"> <xsl:value-of select="DRC/text()"/> </font> </td> </xsl:if> </xsl:if> <xsl:if test="not(DRC)"> <td cellspace="0" colspan="1" bgcolor="#FFFFFF"> <!--xsl:value-of select="DRC"/--> <xsl:value-of select="''"/> </td> </xsl:if> </tr> </xsl:for-each> </table> </xsl:template> <!--xsl:template match="slave"> <div class="content"> <h3> <a name="{name}_{memoryMap/name} Register"> <xsl:value-of select="name"/> : <xsl:value-of select="memoryMap/name"/> Memory Map [ <xsl:if test="fullAddressSpace"> <xsl:value-of select="fullAddressSpace"/> ] </xsl:if> <xsl:if test="combinedAddressSpace"> <br/> <xsl:for-each select="combinedAddressSpace"> <xsl:value-of select="text()"/> <xsl:choose> <xsl:when test="position() != last()"> <br/> </xsl:when> </xsl:choose> </xsl:for-each> ] </xsl:if> </a> </h3> </div> <div class="mmrange"> <i>range: </i> <xsl:apply-templates select="range"/> </div> <xsl:if test="memoryMap/addressBlock/register"> <xsl:apply-templates select="memoryMap/addressBlock"/> </xsl:if> <a class="toplinks" href="#{../name} Memory Map"> back to <xsl:value-of select="../name"/> Memory Map </a> <br/> <br/> <hr></hr> </xsl:template--> <xsl:template match="addressBlock"> <table class="regs" border="2" cellspace="0" cellpadding="4" align="center"> <tr bgcolor="#aaaacc"> <th>Address</th> <th>Name</th> <th>R/W</th> <th>Width</th> <th>Reset Value</th> <th>Description</th> </tr> <xsl:for-each select="register"> <tr> <td align="center" nowrap="true"> <xsl:value-of select="absoluteAddress"/> </td> <xsl:choose> <xsl:when test="field"> <td align="center"> <a class="toplinks" href="#{../../../name}_{name}"> <xsl:value-of select="name"/> </a> </td> </xsl:when> <xsl:otherwise> <td align="center"> <xsl:value-of select="name"/> </td> </xsl:otherwise> </xsl:choose> <td align="center" nowrap="true"> <xsl:value-of select="access"/> </td> <td align="center"> <xsl:value-of select="size"/> </td> <td align="center"> <xsl:value-of select="resetValue"/> </td> <td align="left"> <xsl:value-of select="description"/> </td> </tr> </xsl:for-each> </table> <xsl:if test="register/field"> <a class="toplinks" href="#{../../../name} Memory Map"> back to <xsl:value-of select="../../../name"/> Memory Map </a> <xsl:for-each select="register"> <div class="content"> <h4> <a class="register-details" name="{../../../name}_{name}"> <xsl:value-of select="name"/> register details [ <xsl:value-of select="absoluteAddress"/> ] : </a> </h4> </div> <div class="regwidth"> <i>width: </i> <xsl:apply-templates select="size"/>-bit </div> <table class="regs" border="2" cellspace="0" cellpadding="4" align="center" > <tr bgcolor="#aaaacc"> <th align="left">Bit Number</th> <th>Name</th> <th>R/W</th> <th>Description</th> </tr> <xsl:for-each select="field"> <tr> <td align="left"> <xsl:value-of select="bitNumber"/> </td> <td align="center"> <xsl:value-of select="name"/> </td> <td align="center" nowrap="true"> <xsl:value-of select="access"/> </td> <td align="left"> <xsl:value-of select="description"/> </td> </tr> </xsl:for-each> </table> <a class="toplinks" href="#{../../../name}_{../../../memoryMap/name} Register"> back to <xsl:value-of select="../../../name"/> Registers </a> <br/> <br/> </xsl:for-each> <br/> <br/> </xsl:if> </xsl:template> <xsl:template match="range"> <xsl:value-of select="."/> </xsl:template > <!--==========================END MEMORY MAP===================================--> <!--============================= CSS ===================================--> <xsl:template name="css"> <style> html { background-color:darkgray; } body { font-family:arial; font-size: 11pt; text-align:center; } th { background-color: #F0F0F0; } table.cores { background-color: #F0F0F0; border-color: #B0B0B0; border-style:solid; border-width:1px; } table.cores td { vertical-align:top; } table.regs, table.ios { border-color: #B0B0B0; border-style:solid; border-width:1px; border-spacing:0px; border-collapse:collapse; width=75%; font-family:couriernew; font-size: 11pt; } table.regs th table.ios th { border-color: #B0B0B0; border-width:1px; color: darkslategray; font-weight:bold; } table.ios td { text-align:center; } table.params { border-color: #D0D0D0; border-style:solid; border-width:0px; border-spacing:0px; border-collapse:collapse; } table.params th { border-color: #D0D0D0; border-width:1px; color: black; font-weight:bold; } table.params td { text-align:center; } b.params-name { color: #505050 ; } div.header { padding-top: 7px; padding-bottom: 7px; color:#003399; background-color: #D0D0D0; width=100%; font-family:arial; font-size:14pt; font-weight: bold; text-align: center; } div.title { padding-top: 30px; margin: auto; color:#D0D0D0; background-color:#003399 ; text-align: center; width: 1000px; padding-left:30px; padding-right:30px; } div.dsheet { width: 1000px; margin: auto; text-align: left color:#003399; background-color: white; padding-top: 30px; padding-bottom: 30px; padding-left:30px; padding-right:30px; } div.content { padding-top: 10px; padding-left:10px; padding-right:10px; text-align: left; font-size: 13pt; font-weight: normal; } div.copyright { text-align:right; font-size:9pt; font-style:italic; font-weight:normal; } div.links { text-align:left; } b { color:darkslategray } hr { width=100%; } .instances { font-size:14pt; text-align:left; } .toplinks { font-size:10pt; text-align:left; } .register-details { text-indent:20px; } .mmrange { text-indent:10px; font-size:11pt; text-align: left; padding-bottom: 20px; } .regwidth { text-indent:24pt; font-size:11pt; text-align: left; padding-bottom: 20px; } </style> <!--============================= END CSS ===================================--> </xsl:template> </xsl:stylesheet>
<xsl:if test="@attrib = 'foo'">...</xsl:if> <xsl:if test="position() != last()">...</xsl:if> <xsl:if test="not(false())">...</xsl:if> <!-- Some XPath expressions must be escaped. --> <xsl:if test='contains(node, "stuff") and (position() &gt; first())'>...</xsl:if> <!-- The following two examples are synonymous because the test attribute is implicitly converted to boolean. --> <xsl:if test="boolean($expr)">...</xsl:if> <xsl:if test="$expr">...</xsl:if>
<reponame>LaudateCorpus1/RosettaCodeData <transform xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"> <template match="/" /> </transform>
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:saxon="http://saxon.sf.net/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" version="2.0"><!--Implementers: please note that overriding process-prolog or process-root is the preferred method for meta-stylesheets to use where possible. --> <axsl:param name="archiveDirParameter" tunnel="no"/> <axsl:param name="archiveNameParameter" tunnel="no"/> <axsl:param name="fileNameParameter" tunnel="no"/> <axsl:param name="fileDirParameter" tunnel="no"/> <!--PHASES--> <!--PROLOG--> <axsl:output xmlns:svrl="http://purl.oclc.org/dsdl/svrl" method="xml" omit-xml-declaration="no" standalone="yes" indent="yes"/> <!--XSD TYPES--> <!--KEYS AND FUCNTIONS--> <!--DEFAULT RULES--> <!--MODE: SCHEMATRON-FULL-PATH--> <!--This mode can be used to generate an ugly though full XPath for locators--> <axsl:template match="*" mode="schematron-get-full-path"> <axsl:apply-templates select="parent::*" mode="schematron-get-full-path"/> <axsl:text>/</axsl:text> <axsl:choose> <axsl:when test="namespace-uri()=''"> <axsl:value-of select="name()"/> </axsl:when> <axsl:otherwise> <axsl:text>*:</axsl:text> <axsl:value-of select="local-name()"/> <axsl:text>[namespace-uri()='</axsl:text> <axsl:value-of select="namespace-uri()"/> <axsl:text>']</axsl:text> </axsl:otherwise> </axsl:choose> <axsl:variable name="preceding" select="count(preceding-sibling::*[local-name()=local-name(current()) and namespace-uri() = namespace-uri(current())])"/> <axsl:text>[</axsl:text> <axsl:value-of select="1+ $preceding"/> <axsl:text>]</axsl:text> </axsl:template> <axsl:template match="@*" mode="schematron-get-full-path"> <axsl:apply-templates select="parent::*" mode="schematron-get-full-path"/> <axsl:text>/</axsl:text> <axsl:choose> <axsl:when test="namespace-uri()=''">@<axsl:value-of select="name()"/> </axsl:when> <axsl:otherwise> <axsl:text>@*[local-name()='</axsl:text> <axsl:value-of select="local-name()"/> <axsl:text>' and namespace-uri()='</axsl:text> <axsl:value-of select="namespace-uri()"/> <axsl:text>']</axsl:text> </axsl:otherwise> </axsl:choose> </axsl:template> <!--MODE: SCHEMATRON-FULL-PATH-2--> <!--This mode can be used to generate prefixed XPath for humans--> <axsl:template match="node() | @*" mode="schematron-get-full-path-2"> <axsl:for-each select="ancestor-or-self::*"> <axsl:text>/</axsl:text> <axsl:value-of select="name(.)"/> <axsl:if test="preceding-sibling::*[name(.)=name(current())]"> <axsl:text>[</axsl:text> <axsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/> <axsl:text>]</axsl:text> </axsl:if> </axsl:for-each> <axsl:if test="not(self::*)"> <axsl:text/>/@<axsl:value-of select="name(.)"/> </axsl:if> </axsl:template><!--MODE: SCHEMATRON-FULL-PATH-3--> <!--This mode can be used to generate prefixed XPath for humans (Top-level element has index)--> <axsl:template match="node() | @*" mode="schematron-get-full-path-3"> <axsl:for-each select="ancestor-or-self::*"> <axsl:text>/</axsl:text> <axsl:value-of select="name(.)"/> <axsl:if test="parent::*"> <axsl:text>[</axsl:text> <axsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/> <axsl:text>]</axsl:text> </axsl:if> </axsl:for-each> <axsl:if test="not(self::*)"> <axsl:text/>/@<axsl:value-of select="name(.)"/> </axsl:if> </axsl:template> <!--MODE: GENERATE-ID-FROM-PATH --> <axsl:template match="/" mode="generate-id-from-path"/> <axsl:template match="text()" mode="generate-id-from-path"> <axsl:apply-templates select="parent::*" mode="generate-id-from-path"/> <axsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/> </axsl:template> <axsl:template match="comment()" mode="generate-id-from-path"> <axsl:apply-templates select="parent::*" mode="generate-id-from-path"/> <axsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/> </axsl:template> <axsl:template match="processing-instruction()" mode="generate-id-from-path"> <axsl:apply-templates select="parent::*" mode="generate-id-from-path"/> <axsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/> </axsl:template> <axsl:template match="@*" mode="generate-id-from-path"> <axsl:apply-templates select="parent::*" mode="generate-id-from-path"/> <axsl:value-of select="concat('.@', name())"/> </axsl:template> <axsl:template match="*" mode="generate-id-from-path" priority="-0.5"> <axsl:apply-templates select="parent::*" mode="generate-id-from-path"/> <axsl:text>.</axsl:text> <axsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/> </axsl:template> <!--MODE: GENERATE-ID-2 --> <axsl:template match="/" mode="generate-id-2">U</axsl:template> <axsl:template match="*" mode="generate-id-2" priority="2"> <axsl:text>U</axsl:text> <axsl:number level="multiple" count="*"/> </axsl:template> <axsl:template match="node()" mode="generate-id-2"> <axsl:text>U.</axsl:text> <axsl:number level="multiple" count="*"/> <axsl:text>n</axsl:text> <axsl:number count="node()"/> </axsl:template> <axsl:template match="@*" mode="generate-id-2"> <axsl:text>U.</axsl:text> <axsl:number level="multiple" count="*"/> <axsl:text>_</axsl:text> <axsl:value-of select="string-length(local-name(.))"/> <axsl:text>_</axsl:text> <axsl:value-of select="translate(name(),':','.')"/> </axsl:template><!--Strip characters--> <axsl:template match="text()" priority="-1"/> <!--SCHEMA METADATA--> <axsl:template match="/"> <svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl" title="EUGEN T14 bound to UBL" schemaVersion=""> <axsl:comment> <axsl:value-of select="$archiveDirParameter"/>   <axsl:value-of select="$archiveNameParameter"/>   <axsl:value-of select="$fileNameParameter"/>   <axsl:value-of select="$fileDirParameter"/> </axsl:comment> <svrl:ns-prefix-in-attribute-values uri="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" prefix="cbc"/> <svrl:ns-prefix-in-attribute-values uri="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" prefix="cac"/> <svrl:ns-prefix-in-attribute-values uri="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" prefix="ubl"/> <svrl:active-pattern> <axsl:attribute name="id">UBL-T14</axsl:attribute> <axsl:attribute name="name">UBL-T14</axsl:attribute> <axsl:apply-templates/> </svrl:active-pattern> <axsl:apply-templates select="/" mode="M6"/> <svrl:active-pattern> <axsl:attribute name="id">CodesT14</axsl:attribute> <axsl:attribute name="name">CodesT14</axsl:attribute> <axsl:apply-templates/> </svrl:active-pattern> <axsl:apply-templates select="/" mode="M7"/> </svrl:schematron-output> </axsl:template> <!--SCHEMATRON PATTERNS--> <svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">EUGEN T14 bound to UBL</svrl:text> <!--PATTERN UBL-T14--> <!--RULE --> <axsl:template match="//cac:AllowanceCharge" priority="1009" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:AllowanceCharge"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(((//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount) and (cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT')) or not((//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT'])) and (local-name(parent:: node())=&#34;Invoice&#34;)) or not(local-name(parent:: node())=&#34;CreditNote&#34;)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(((//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount) and (cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT')) or not((//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT'])) and (local-name(parent:: node())=&#34;Invoice&#34;)) or not(local-name(parent:: node())=&#34;CreditNote&#34;)"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R004]-If the VAT total amount in a Credit Note exists then an Allowances Charges amount on document level MUST have tax category for VAT.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="number(cbc:Amount)&gt;=0"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="number(cbc:Amount)&gt;=0"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R022]-An allowance or charge amount MUST NOT be negative.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="(cbc:AllowanceChargeReason)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(cbc:AllowanceChargeReason)"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R023]-AllowanceChargeReason text SHOULD be specified for all allowances and charges</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:Item/cac:ClassifiedTaxCategory" priority="1008" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:Item/cac:ClassifiedTaxCategory"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount and cbc:ID) or not((//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']))"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount and cbc:ID) or not((//cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']))"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R031]-If the VAT total amount in a Credit Note exists then each Credit Note line item must have a VAT category ID.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="/ubl:CreditNote" priority="1007" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="/ubl:CreditNote"/> <!--ASSERT --> <axsl:choose> <axsl:when test="((cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount) and (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or not((cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT'])))"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="((cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT']/cbc:TaxAmount) and (cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or not((cac:TaxTotal[cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:ID = 'VAT'])))"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R007]-If the VAT total amount in a Credit Note exists it MUST contain the suppliers VAT number.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="starts-with(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID,//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode) and (//cac:TaxCategory/cbc:ID) = 'AE' or not((//cac:TaxCategory/cbc:ID) = 'AE' )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="starts-with(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID,//cac:AccountingCustomerParty/cac:Party/cac:PostalAddress/cac:Country/cbc:IdentificationCode) and (//cac:TaxCategory/cbc:ID) = 'AE' or not((//cac:TaxCategory/cbc:ID) = 'AE' )"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R015]-IF VAT = "AE" (reverse charge) THEN it MUST contain Supplier VAT id and Customer VAT</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="(((//cac:TaxCategory/cbc:ID) = 'AE') and not((//cac:TaxCategory/cbc:ID) != 'AE' )) or not((//cac:TaxCategory/cbc:ID) = 'AE') or not(//cac:TaxCategory)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(((//cac:TaxCategory/cbc:ID) = 'AE') and not((//cac:TaxCategory/cbc:ID) != 'AE' )) or not((//cac:TaxCategory/cbc:ID) = 'AE') or not(//cac:TaxCategory)"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R016]-IF VAT = "AE" (reverse charge) THEN VAT MAY NOT contain other VAT categories.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="(//cbc:TaxExclusiveAmount = //cac:TaxTotal/cac:TaxSubtotal[cac:TaxCategory/cbc:ID='AE']/cbc:TaxableAmount) and (//cac:TaxCategory/cbc:ID) = 'AE' or not((//cac:TaxCategory/cbc:ID) = 'AE' )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(//cbc:TaxExclusiveAmount = //cac:TaxTotal/cac:TaxSubtotal[cac:TaxCategory/cbc:ID='AE']/cbc:TaxableAmount) and (//cac:TaxCategory/cbc:ID) = 'AE' or not((//cac:TaxCategory/cbc:ID) = 'AE' )"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R017]-IF VAT = "AE" (reverse charge) THEN The taxable amount MUST equal the invoice total without VAT amount.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="//cac:TaxTotal/cbc:TaxAmount = 0 and (//cac:TaxCategory/cbc:ID) = 'AE' or not((//cac:TaxCategory/cbc:ID) = 'AE' )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="//cac:TaxTotal/cbc:TaxAmount = 0 and (//cac:TaxCategory/cbc:ID) = 'AE' or not((//cac:TaxCategory/cbc:ID) = 'AE' )"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R018]-IF VAT = "AE" (reverse charge) THEN VAT tax amount MUST be zero.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="not(//@currencyID != //cbc:DocumentCurrencyCode)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="not(//@currencyID != //cbc:DocumentCurrencyCode)"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R024]-Currency Identifier MUST be in stated in the currency stated on header level.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:CreditNoteLine" priority="1006" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:CreditNoteLine"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(cbc:CreditedQuantity and cbc:CreditedQuantity/@unitCode)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(cbc:CreditedQuantity and cbc:CreditedQuantity/@unitCode)"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R003]-Each credit note line SHOULD contain the quantity and unit of measure</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:AccountingCustomerParty/cac:Party" priority="1005" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:AccountingCustomerParty/cac:Party"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(cac:PostalAddress/cbc:StreetName and cac:PostalAddress/cbc:CityName and cac:PostalAddress/cbc:PostalZone and cac:PostalAddress/cac:Country/cbc:IdentificationCode)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(cac:PostalAddress/cbc:StreetName and cac:PostalAddress/cbc:CityName and cac:PostalAddress/cbc:PostalZone and cac:PostalAddress/cac:Country/cbc:IdentificationCode)"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R002]-A customer postal address in a credit note SHOULD contain at least, street name and number, city name, zip code and country code.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:InvoicePeriod" priority="1004" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:InvoicePeriod"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(cbc:StartDate)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(cbc:StartDate)"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R020]-If the credit note refers to a period, the period MUST have an start date.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <!--ASSERT --> <axsl:choose> <axsl:when test="(cbc:EndDate)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(cbc:EndDate)"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R021]-If the credit note refers to a period, the period MUST have an end date.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:AccountingSupplierParty/cac:Party" priority="1003" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:AccountingSupplierParty/cac:Party"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(cac:PostalAddress/cbc:StreetName and cac:PostalAddress/cbc:CityName and cac:PostalAddress/cbc:PostalZone and cac:PostalAddress/cac:Country/cbc:IdentificationCode)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(cac:PostalAddress/cbc:StreetName and cac:PostalAddress/cbc:CityName and cac:PostalAddress/cbc:PostalZone and cac:PostalAddress/cac:Country/cbc:IdentificationCode)"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R001]-A supplier postal address in a credit note SHOULD contain at least, street name and number, city name, zip code and country code.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:TaxCategory" priority="1002" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:TaxCategory"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(parent::cac:AllowanceCharge) or (cbc:ID and cbc:Percent) or (cbc:ID = 'AE')"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(parent::cac:AllowanceCharge) or (cbc:ID and cbc:Percent) or (cbc:ID = 'AE')"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R012]-For each tax subcategory the category ID and the applicable tax percentage MUST be provided.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:TaxSubtotal" priority="1001" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:TaxSubtotal"/> <!--ASSERT --> <axsl:choose> <axsl:when test="(number(cac:TaxCategory/cbc:Percent) = 0 and (cac:TaxCategory/cbc:TaxExemptionReason or cac:TaxCategory/cbc:TaxExemptionReasonCode)) or (number(cac:TaxCategory/cbc:Percent) !=0)"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="(number(cac:TaxCategory/cbc:Percent) = 0 and (cac:TaxCategory/cbc:TaxExemptionReason or cac:TaxCategory/cbc:TaxExemptionReasonCode)) or (number(cac:TaxCategory/cbc:Percent) !=0)"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R013]-If the category for VAT is exempt (E) then an exemption reason SHOULD be provided.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--RULE --> <axsl:template match="//cac:LegalMonetaryTotal" priority="1000" mode="M6"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//cac:LegalMonetaryTotal"/> <!--ASSERT --> <axsl:choose> <axsl:when test="number(cbc:PayableAmount) &gt;= 0"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="number(cbc:PayableAmount) &gt;= 0"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[EUGEN-T14-R019]-Total payable amount in an invoice MUST NOT be negative</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <axsl:template match="text()" priority="-1" mode="M6"/> <axsl:template match="@*|node()" priority="-2" mode="M6"> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M6"/> </axsl:template> <!--PATTERN CodesT14--> <!--RULE --> <axsl:template match="cac:FinancialInstitution/cbc:ID//@schemeID" priority="1006" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cac:FinancialInstitution/cbc:ID//@schemeID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' BIC ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' BIC ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-002]-Financial Institution SHOULD be BIC code.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <!--RULE --> <axsl:template match="cac:PostalAddress/cbc:ID//@schemeID" priority="1005" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cac:PostalAddress/cbc:ID//@schemeID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-003]-Postal address identifiers SHOULD be GLN.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <!--RULE --> <axsl:template match="cac:Delivery/cac:DeliveryLocation/cbc:ID//@schemeID" priority="1004" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cac:Delivery/cac:DeliveryLocation/cbc:ID//@schemeID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-004]-Location identifiers SHOULD be GLN</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <!--RULE --> <axsl:template match="cac:Item/cac:StandardItemIdentification/cbc:ID//@schemeID" priority="1003" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cac:Item/cac:StandardItemIdentification/cbc:ID//@schemeID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' GTIN ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' GTIN ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-005]-Standard item identifiers SHOULD be GTIN.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <!--RULE --> <axsl:template match="cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode//@listID" priority="1002" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode//@listID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' UNSPSC eCLASS CPV ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' UNSPSC eCLASS CPV ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">warning</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-006]-Commodity classification SHOULD be one of UNSPSC, eClass or CPV.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <!--RULE --> <axsl:template match="cac:PartyIdentification/cbc:ID//@schemeID" priority="1001" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cac:PartyIdentification/cbc:ID//@schemeID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN DUNS IBAN DK:CPR DK:CVR DK:P DK:SE DK:VANS IT:VAT IT:CF IT:FTI IT:SIA IT:SECETI NO:ORGNR NO:VAT HU:VAT SE:ORGNR FI:OVT EU:VAT EU:REID FR:SIRET AT:VAT AT:GOV AT:CID IS:KT IBAN AT:KUR ES:VAT ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN DUNS IBAN DK:CPR DK:CVR DK:P DK:SE DK:VANS IT:VAT IT:CF IT:FTI IT:SIA IT:SECETI NO:ORGNR NO:VAT HU:VAT SE:ORGNR FI:OVT EU:VAT EU:REID FR:SIRET AT:VAT AT:GOV AT:CID IS:KT IBAN AT:KUR ES:VAT ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-008]-Party Identifiers MUST use the PEPPOL PartyID list</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <!--RULE --> <axsl:template match="cbc:EndpointID//@schemeID" priority="1000" mode="M7"> <svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="cbc:EndpointID//@schemeID"/> <!--ASSERT --> <axsl:choose> <axsl:when test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN DUNS IBAN DK:CPR DK:CVR DK:P DK:SE DK:VANS IT:VAT IT:CF IT:FTI IT:SIA IT:SECETI NO:ORGNR NO:VAT HU:VAT SE:ORGNR FI:OVT EU:VAT EU:REID FR:SIRET AT:VAT AT:GOV AT:CID IS:KT IBAN AT:KUR ES:VAT ',concat(' ',normalize-space(.),' ') ) ) )"/> <axsl:otherwise> <svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl" test="( ( not(contains(normalize-space(.),' ')) and contains( ' GLN DUNS IBAN DK:CPR DK:CVR DK:P DK:SE DK:VANS IT:VAT IT:CF IT:FTI IT:SIA IT:SECETI NO:ORGNR NO:VAT HU:VAT SE:ORGNR FI:OVT EU:VAT EU:REID FR:SIRET AT:VAT AT:GOV AT:CID IS:KT IBAN AT:KUR ES:VAT ',concat(' ',normalize-space(.),' ') ) ) )"> <axsl:attribute name="flag">fatal</axsl:attribute> <axsl:attribute name="location"> <axsl:apply-templates select="." mode="schematron-get-full-path"/> </axsl:attribute> <svrl:text>[PCL-014-009]-Endpoint Identifiers MUST use the PEPPOL PartyID list.</svrl:text> </svrl:failed-assert> </axsl:otherwise> </axsl:choose> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> <axsl:template match="text()" priority="-1" mode="M7"/> <axsl:template match="@*|node()" priority="-2" mode="M7"> <axsl:apply-templates select="@*|*|comment()|processing-instruction()" mode="M7"/> </axsl:template> </axsl:stylesheet>
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <DIV STYLE="padding:.3in .1in .3in .3in; font-family:Arial Black; background-color:maroon"> <xsl:for-each select="CIM//INSTANCE"> <TABLE> <TR> <TD COLSPAN="2" WIDTH="200"> <CENTER><IMG src="cpu.jpg" width="100" height="100"></IMG></CENTER> </TD> <TD STYLE="padding-left:1em"> <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow"> <SPAN STYLE="color:white"><xsl:value-of select="PROPERTY[@NAME='DeviceID']/VALUE"/></SPAN> </DIV><P/> <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow"> <SPAN STYLE="color:white"><xsl:value-of select="PROPERTY[@NAME='Name']/VALUE"/></SPAN> </DIV><P/> <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow"> <SPAN STYLE="color:white"><xsl:apply-templates select="PROPERTY[@NAME='Availability']"/></SPAN> </DIV> </TD> </TR> <TR> <TD><DIV STYLE="color:white; font:10pt. Verdana; font-style:italic; font-weight:normal"><xsl:value-of select="PROPERTY[@NAME='FileSystem']/VALUE"/></DIV></TD> <TD><DIV STYLE="text-align:right; color:white; font:10pt. Verdana; font-style:italic; font-weight:normal"><xsl:value-of select="PROPERTY[@NAME='VolumeSerialNumber']/VALUE"/></DIV></TD> <TD></TD> </TR> <TR> <TD COLSPAN="2"> <DIV STYLE="margin:2px; padding:0em .5em; background-color:teal; color:white"> <xsl:value-of select="PROPERTY[@NAME='CurrentClockSpeed']/VALUE"/> MHz </DIV> <DIV STYLE="margin:2px; padding:0em .5em; background-color:teal; color:white"> <xsl:value-of select="PROPERTY[@NAME='AddressWidth']/VALUE"/> Bit </DIV> <DIV STYLE="margin:2px; padding:0em .5em; background-color:teal; color:white"> <xsl:value-of select="PROPERTY[@NAME='L2CacheSize']/VALUE"/> L2 Cache </DIV> </TD> <TD STYLE="text-align:right; font:10pt Verdana; font-style:italic; color:yellow"> <DIV STYLE="margin-top:.5em; font-weight:bold"> <xsl:apply-templates select="PROPERTY[@NAME='PowerManagementSupported']"/> </DIV> </TD> </TR> </TABLE> </xsl:for-each> </DIV> </xsl:template> <xsl:template match="PROPERTY[@NAME='PowerManagementSupported']"> <xsl:choose> <xsl:when test="VALUE[. $eq$ 'TRUE']">This processor supports power management</xsl:when> <xsl:otherwise>This processor does NOT support power management</xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="PROPERTY[@NAME='Availability']"> <xsl:choose> <xsl:when test="VALUE[. $eq$ '1']"> Other </xsl:when> <xsl:when test="VALUE[. $eq$ '2']"> Unknown </xsl:when> <xsl:when test="VALUE[. $eq$ '3']"> Running/Full Power </xsl:when> <xsl:when test="VALUE[. $eq$ '4']"> Warning </xsl:when> <xsl:when test="VALUE[. $eq$ '5']"> In Test </xsl:when> <xsl:when test="VALUE[. $eq$ '6']"> Not Applicable </xsl:when> <xsl:when test="VALUE[. $eq$ '7']"> Power Off </xsl:when> <xsl:when test="VALUE[. $eq$ '8']"> Off Line </xsl:when> <xsl:when test="VALUE[. $eq$ '9']"> Off Duty </xsl:when> <xsl:when test="VALUE[. $eq$ '10']"> Degraded </xsl:when> <xsl:when test="VALUE[. $eq$ '11']"> Not Installed </xsl:when> <xsl:when test="VALUE[. $eq$ '12']"> Install Error </xsl:when> <xsl:when test="VALUE[. $eq$ '13']"> Power Save - Unknown </xsl:when> <xsl:when test="VALUE[. $eq$ '14']"> Power Save - Low Power Mode </xsl:when> <xsl:when test="VALUE[. $eq$ '15']"> Power Save - Standby </xsl:when> <xsl:when test="VALUE[. $eq$ '16']"> Power Cycle </xsl:when> <xsl:when test="VALUE[. $eq$ '17']"> Power Save - Warning </xsl:when> <xsl:otherwise>Unknown State</xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>