diff options
67 files changed, 1799 insertions, 802 deletions
diff --git a/tools/Sandcastle/Presentation/Prototype/configuration/conceptual.config b/tools/Sandcastle/Presentation/Prototype/configuration/conceptual.config index 0c2beda..86659f4 100644 --- a/tools/Sandcastle/Presentation/Prototype/configuration/conceptual.config +++ b/tools/Sandcastle/Presentation/Prototype/configuration/conceptual.config @@ -69,6 +69,13 @@ <!-- transform --> <component type="Microsoft.Ddue.Tools.TransformComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> <transform file="%DXROOT%\Presentation\Prototype\transforms\main_conceptual.xsl" /> + <argument key="metadata" value="true" /> + <argument key="languages"> + <language label="CSharp" name="CSharp" style="cs" /> + <language label="VisualBasic" name="VisualBasic" style="vb" /> + <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cs" /> + </argument> + </transform> </component> <!-- resolve art links --> diff --git a/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle-scbuild.config b/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle-scbuild.config index 6f7a13f..a18247a 100644 --- a/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle-scbuild.config +++ b/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle-scbuild.config @@ -79,6 +79,7 @@ <language label="CSharp" name="CSharp" style="cs" /> <language label="VisualBasic" name="VisualBasic" style="vb" /> <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cpp" /> + <language label="JavaScript" name="JavaScript" style="cs" /> </argument> </transform> </component> diff --git a/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle.config b/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle.config index 4e3502f..bd0a0a5 100644 --- a/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle.config +++ b/tools/Sandcastle/Presentation/Prototype/configuration/sandcastle.config @@ -81,6 +81,7 @@ <language label="CSharp" name="CSharp" style="cs" /> <language label="VisualBasic" name="VisualBasic" style="vb" /> <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cpp" /> + <language label="JavaScript" name="JavaScript" style="cs" /> </argument> </transform> </component> diff --git a/tools/Sandcastle/Presentation/Prototype/content/shared_content.xml b/tools/Sandcastle/Presentation/Prototype/content/shared_content.xml index ea38519..f27d67b 100644 --- a/tools/Sandcastle/Presentation/Prototype/content/shared_content.xml +++ b/tools/Sandcastle/Presentation/Prototype/content/shared_content.xml @@ -31,6 +31,8 @@ <item id="CSharpUsageLabel">C#</item> <item id="VisualBasicUsageLabel">Visual Basic Usage</item> <item id="AspNetUsageLabel">ASP.NET</item> + <item id="JavaScriptLabel">JavaScript</item> + <item id="XAMLLabel">XAML</item> <!-- product labels --> <item id="framework">.NET Framework</item> @@ -47,6 +49,6 @@ <!-- footer --> <item id="footer"><div id="footer"><include item="copyright"/> </div></item> - <item id="copyright">2005 Microsoft Corporation. All rights reserved.</item> + <item id="copyright">2008 Microsoft Corporation. All rights reserved.</item> </content>
\ No newline at end of file diff --git a/tools/Sandcastle/Presentation/Prototype/scripts/LanguageFilter.js b/tools/Sandcastle/Presentation/Prototype/scripts/LanguageFilter.js index 6972632..3b56b5f 100644 --- a/tools/Sandcastle/Presentation/Prototype/scripts/LanguageFilter.js +++ b/tools/Sandcastle/Presentation/Prototype/scripts/LanguageFilter.js @@ -2,11 +2,15 @@ function LanguageFilterController() { this.tabCollections = new Array(); this.blockCollections = new Array(); + this.tabCollectionIds = new Array(); + this.blockCollectionIds = new Array(); } -LanguageFilterController.prototype.registerTabbedArea = function(tabCollection, blockCollection) { +LanguageFilterController.prototype.registerTabbedArea = function(tabCollection, blockCollection, tabCollectionId, blockCollectionId) { this.tabCollections.push(tabCollection); this.blockCollections.push(blockCollection); + this.tabCollectionIds.push(tabCollectionId); + this.blockCollectionIds.push(blockCollectionId); } LanguageFilterController.prototype.switchLanguage = function(languageId) { diff --git a/tools/Sandcastle/Presentation/Prototype/scripts/script_prototype.js b/tools/Sandcastle/Presentation/Prototype/scripts/script_prototype.js new file mode 100644 index 0000000..0a64fc0 --- /dev/null +++ b/tools/Sandcastle/Presentation/Prototype/scripts/script_prototype.js @@ -0,0 +1,189 @@ +window.onload = LoadPage; + +var sd; +var lfc; +var store; +var tf; +var mf; +var lc; +var lang = 'CSharp'; + +function ListController() { + this.tabCollections = new Array(); + this.listCollections = new Array(); + this.tabCollectionIds = new Array(); + this.listCollectionIds = new Array(); +} + +ListController.prototype.registerTabbedArea = function(tabCollection, listCollection, tabCollectionId, listCollectionId, filter) { + this.tabCollections.push(tabCollection); + this.listCollections.push(listCollection); + this.tabCollectionIds.push(tabCollectionId); + this.listCollectionIds.push(listCollectionId); +} + +function LoadPage() { + store = new CookieDataStore('docs'); + registerEventHandler(window, 'load', + function() { var ss = new SplitScreen('control','main'); selectLanguage(store.get('lang')); }); + sd = getStyleDictionary(); + lfc = new LanguageFilterController(); + lc = new ListController(); + tf = new TypeFilter(); + mf = new MemberFilter(); + + setUpLanguage(); + + setUpSyntax(); + + setUpSnippets(); + + setUpType(); + + setUpAllMembers(); +} + +function setUpLanguage() { + var langFilter = document.getElementById('languageFilter'); + if (langFilter == null) return; + + var options = langFilter.getElementsByTagName('option'); + if (options == null) return; + + var value = options[0].getAttribute('value'); + var names = value.split(' '); + lang = names[0]; +} + +function setUpSnippets() { + var divs = document.getElementsByTagName("DIV"); + + for (var i = 0; i < divs.length; i++) { + var temp = i; + var name = divs[i].getAttribute("name"); + if (name == null || name != "snippetGroup") continue; + processSection(divs[i], 'x-lang', lang, true, true, lfc); + i= temp + 1; + } +} + +function setUpSyntax() { + var syntax = document.getElementById('syntaxSection'); + if (syntax == null) return; + + processSection(syntax, 'x-lang', lang, true, true, lfc); + + var usyntax = document.getElementById('usyntaxSection'); + if (usyntax == null) return; + + processSection(usyntax, 'x-lang', lang, true, true, lfc); +} + +function setUpType() { + var typeSection = document.getElementById('typeSection'); + if (typeSection == null) return; + + processSection(typeSection, 'value', 'all', true, false, lc); +} + +function setUpAllMembers() { + var allMembersSection = document.getElementById('allMembersSection'); + if (allMembersSection == null) return; + + processSection(allMembersSection, 'value', 'all', true, false, lc); +} + +function processSection(section, attribute, value, toggleClassValue, toggleStyleValue, registerObject) { + var nodes = section.childNodes; + + var tabs; + var blocks; + var tabId; + var blockId; + + if(nodes.length != 2) return; + + if(nodes[0].tagName == 'TABLE') { + var rows = nodes[0].getElementsByTagName('tr'); + + if (rows.length == 0) return; + + tabId = rows[0].getAttribute('id'); + + if (tabId == null) return; + + tabs = new ElementCollection(tabId); + } + + if(nodes[1].tagName == 'DIV') { + blockId = nodes[1].getAttribute('id'); + if (blockId == null) return; + + blocks = new ElementCollection(blockId); + } + else if (nodes[1].tagName == 'TABLE') { + blockId = nodes[1].getAttribute('id'); + if (blockId == null) return; + + blocks = new ElementCollection(blockId); + } + + if (registerObject != null) registerObject.registerTabbedArea(tabs, blocks, tabId, blockId); + if (toggleClassValue) tabs.toggleClass(attribute,value,'activeTab','tab'); + if (toggleStyleValue) blocks.toggleStyle(attribute,value,'display','block','none'); +} + +function toggleClass(id, attributeName, attributeValue, trueClass, falseClass) { + for(var i = 0; i < lfc.tabCollections.length; i++) { + var tabs = lfc.tabCollections[i]; + + if (lfc.tabCollectionIds[i] == id) { + tabs.toggleClass(attributeName, attributeValue, trueClass, falseClass); + } + } + + for(var j = 0; j < lc.tabCollections.length; j++) { + var listTabs = lc.tabCollections[j]; + + if (lc.tabCollectionIds[j] == id) { + listTabs.toggleClass(attributeName, attributeValue, trueClass, falseClass); + } + } +} + +function toggleStyle(id, attributeName, attributeValue, styleName, trueStyleValue, falseStyleValue) { + for (var i = 0; i < lfc.blockCollections.length; i++) { + + var blocks = lfc.blockCollections[i]; + + if (lfc.blockCollectionIds[i] == id) { + blocks.toggleStyle(attributeName, attributeValue, styleName, trueStyleValue, falseStyleValue); + } + } +} + +function processList(id, methodName, typeName) { + for (var i = 0; i < lc.listCollections.length; i++) { + var list = lc.listCollections[i]; + if (lc.listCollectionIds[i] == id) { + if (typeName == 'type') list.process(getInstanceDelegate(tf,methodName)); + else if (typeName == 'member') list.process(getInstanceDelegate(mf, methodName)); + } + } +} + +function processSubgroup(subgroup, typeName) { + if (typeName == 'type' && tf != null) tf.subgroup = subgroup; + else if (typeName == 'member' && mf != null) mf.subgroup = subgroup; +} + +function toggleCheckState(visibility, value) { + if (mf == null) return; + mf[visibility] = value; +} + +function switchLanguage(names, value) { + if (lfc != null) lfc.switchLanguage(names[0]); + store.set('lang',value); + store.save(); +} diff --git a/tools/Sandcastle/Presentation/Prototype/transforms/main_conceptual.xsl b/tools/Sandcastle/Presentation/Prototype/transforms/main_conceptual.xsl index 1c172bf..7dffa01 100644 --- a/tools/Sandcastle/Presentation/Prototype/transforms/main_conceptual.xsl +++ b/tools/Sandcastle/Presentation/Prototype/transforms/main_conceptual.xsl @@ -9,6 +9,7 @@ <!-- key parameter is the api identifier string --> <xsl:param name="key" /> + <xsl:param name="languages">false</xsl:param> <xsl:template match="/document"> <html> @@ -19,9 +20,6 @@ <xsl:call-template name="insertMetadata" /> </head> <body> - <script type="text/javascript"> - <xsl:text>registerEventHandler(window, 'load', function() { var ss = new SplitScreen('control', 'main'); });</xsl:text> - </script> <xsl:call-template name="control"/> <xsl:call-template name="main"/> </body> @@ -37,21 +35,44 @@ </xsl:template> <xsl:template name="insertScripts"> - <script type="text/javascript"> - <includeAttribute name="src" item="scriptPath"><parameter>EventUtilities.js</parameter></includeAttribute> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>script_prototype.js</parameter></includeAttribute> <xsl:text> </xsl:text> - </script> - <script type="text/javascript"> - <includeAttribute name="src" item="scriptPath"><parameter>SplitScreen.js</parameter></includeAttribute> + </script> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>EventUtilities.js</parameter></includeAttribute> <xsl:text> </xsl:text> </script> <script type="text/javascript"> - <includeAttribute name="src" item="scriptPath"> - <parameter>ElementCollection.js</parameter> - </includeAttribute> + <includeAttribute name="src" item="scriptPath"><parameter>StyleUtilities.js</parameter></includeAttribute> <xsl:text> </xsl:text> </script> - </xsl:template> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>SplitScreen.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>ElementCollection.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>MemberFilter.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>CollapsibleSection.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>LanguageFilter.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>CookieDataStore.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> + + </xsl:template> <xsl:template name="insertMetadata"> <xml> @@ -127,6 +148,21 @@ <div id="control"> <span class="productTitle"><include item="productTitle" /></span><br/> <span class="topicTitle"><xsl:call-template name="topicTitle" /></span><br/> + + <xsl:if test="boolean(($languages != 'false') and (count($languages/language) > 0))"> + <div id="toolbar"> + <span id="languageFilter"> + <select id="languageSelector" onchange="var names = this.value.split(' '); toggleVisibleLanguage(names[1]); switchLanguage(names, this.value);"> + <xsl:for-each select="$languages/language"> + <option value="{@name} {@style}"> + <include item="{@label}Label" /> + </option> + </xsl:for-each> + </select> + </span> + </div> + </xsl:if> + <!-- <div id="toolbar"> <span class="chickenFeet"><xsl:call-template name="chickenFeet" /></span> diff --git a/tools/Sandcastle/Presentation/Prototype/transforms/main_reference.xsl b/tools/Sandcastle/Presentation/Prototype/transforms/main_reference.xsl index f993a90..71bd6d8 100644 --- a/tools/Sandcastle/Presentation/Prototype/transforms/main_reference.xsl +++ b/tools/Sandcastle/Presentation/Prototype/transforms/main_reference.xsl @@ -23,7 +23,7 @@ <p><include item="hostProtectionAttributeLong" /></p> </xsl:if> <!-- summary --> - <span data="authoredSummary"> + <span sdata="authoredSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:summary" /> </span> <!-- syntax --> @@ -37,7 +37,7 @@ <xsl:apply-templates select="/document/reference/returns" /> <!-- members --> <xsl:choose> - <xsl:when test="$tgroup='list' and $tsubgroup='namespaces'"> + <xsl:when test="$tgroup='root'"> <xsl:apply-templates select="/document/reference/elements" mode="root" /> </xsl:when> <xsl:when test="$group='namespace'"> @@ -124,7 +124,7 @@ <xsl:template name="getParameterDescription"> <xsl:param name="name" /> - <span data="authoredParameterSummary"> + <span sdata="authoredParameterSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:parameters/ddue:parameter[string(ddue:parameterReference)=$name]/ddue:content" /> </span> </xsl:template> @@ -150,13 +150,13 @@ </xsl:template> <xsl:template name="getReturnsDescription"> - <span data="authoredValueSummary"> + <span sdata="authoredValueSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:returnValue" /> </span> </xsl:template> <xsl:template name="getElementDescription"> - <span data="memberAuthoredSummary"> + <span sdata="memberAuthoredSummary"> <xsl:apply-templates select="ddue:summary/ddue:para/node()" /> </span> </xsl:template> diff --git a/tools/Sandcastle/Presentation/Prototype/transforms/main_sandcastle.xsl b/tools/Sandcastle/Presentation/Prototype/transforms/main_sandcastle.xsl index fe9a864..944e949 100644 --- a/tools/Sandcastle/Presentation/Prototype/transforms/main_sandcastle.xsl +++ b/tools/Sandcastle/Presentation/Prototype/transforms/main_sandcastle.xsl @@ -26,7 +26,7 @@ <xsl:apply-templates select="/document/comments/returns" /> <!-- members --> <xsl:choose> - <xsl:when test="$tgroup='list' and $tsubgroup='namespaces'"> + <xsl:when test="$tgroup='root'"> <xsl:apply-templates select="/document/reference/elements" mode="root" /> </xsl:when> <xsl:when test="$group='namespace'"> @@ -55,7 +55,7 @@ <!-- inheritance --> <xsl:apply-templates select="/document/reference/family" /> <!--versions--> - <xsl:if test="not($group='member' or $group='namespace' or $group='root' )"> + <xsl:if test="not($group='member' or $group='namespace' or $tgroup='root' )"> <xsl:apply-templates select="/document/reference/versions" /> </xsl:if> <!-- see also --> @@ -152,22 +152,17 @@ <xsl:choose> <xsl:when test="code/@language"> <xsl:variable name="codeId" select="generate-id()" /> + <div name="snippetGroup"> <table class="filter"><tr class="tabs" id="ct_{$codeId}"> <xsl:for-each select="code"> - <td class="tab" x-lang="{@language}" onclick="ct{$codeId}.toggleClass('x-lang','{@language}','activeTab','tab'); cb{$codeId}.toggleStyle('x-lang','{@language}','display','block','none');"><include item="{@language}Label" /></td> + <td class="tab" x-lang="{@language}" onclick="toggleClass('ct_{$codeId}','x-lang','{@language}','activeTab','tab'); toggleStyle('cb_{$codeId}','x-lang','{@language}','display','block','none');"><include item="{@language}Label" /></td> </xsl:for-each></tr></table> <div id="cb_{$codeId}"> <xsl:for-each select="code"> <div class="code" x-lang="{@language}"><pre><xsl:copy-of select="node()" /></pre></div> </xsl:for-each> </div> - <script type="text/javascript"><xsl:text> - var ct</xsl:text><xsl:value-of select="$codeId" /><xsl:text> = new ElementCollection('ct_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'); - var cb</xsl:text><xsl:value-of select="$codeId" /><xsl:text> = new ElementCollection('cb_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'); - lfc.registerTabbedArea(ct</xsl:text><xsl:value-of select="$codeId" /><xsl:text>, cb</xsl:text><xsl:value-of select="$codeId" /><xsl:text>); - ct</xsl:text><xsl:value-of select="$codeId" /><xsl:text>.toggleClass('x-lang','CSharp','activeTab','tab'); - cb</xsl:text><xsl:value-of select="$codeId" /><xsl:text>.toggleStyle('x-lang','CSharp','display','block','none');</xsl:text> - </script> + </div> </xsl:when> <xsl:otherwise> <xsl:apply-templates /> @@ -230,12 +225,14 @@ </xsl:template> <xsl:template name="seealso"> - <xsl:if test="count(/document/comments/seealso | /document/comments/summary/seealso) > 0"> + <xsl:if test="count(/document/comments//seealso | /document/reference/elements/element/overloads//seealso) > 0"> <xsl:call-template name="section"> <xsl:with-param name="title"><include item="relatedTitle" /></xsl:with-param> <xsl:with-param name="content"> - <xsl:for-each select="/document/comments/seealso | /document/comments/summary/seealso"> - <xsl:apply-templates select="." /> + <xsl:for-each select="/document/comments//seealso | /document/reference/elements/element/overloads//seealso"> + <xsl:apply-templates select="."> + <xsl:with-param name="displaySeeAlso" select="true()" /> + </xsl:apply-templates> <br /> </xsl:for-each> </xsl:with-param> @@ -293,7 +290,26 @@ </xsl:choose> </xsl:template> + <xsl:template match="see[@href]"> + <xsl:choose> + <xsl:when test="normalize-space(.)"> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> + <xsl:value-of select="." /> + </a> + </xsl:when> + <xsl:otherwise> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> + <xsl:value-of select="@href" /> + </a> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match="seealso[@href]"> + <xsl:param name="displaySeeAlso" select="false()" /> + <xsl:if test="$displaySeeAlso"> <xsl:choose> <xsl:when test="normalize-space(.)"> <a> @@ -308,6 +324,7 @@ </a> </xsl:otherwise> </xsl:choose> + </xsl:if> </xsl:template> <xsl:template match="see[@langword]"> @@ -352,6 +369,8 @@ <xsl:template match="seealso"> + <xsl:param name="displaySeeAlso" select="false()" /> + <xsl:if test="$displaySeeAlso"> <xsl:choose> <xsl:when test="normalize-space(.)"> <referenceLink target="{@cref}"> @@ -362,10 +381,11 @@ <referenceLink target="{@cref}" /> </xsl:otherwise> </xsl:choose> + </xsl:if> </xsl:template> <xsl:template match="c"> - <span class="code"><xsl:value-of select="." /></span> + <span class="code"><xsl:apply-templates /></span> </xsl:template> <xsl:template match="paramref"> @@ -378,7 +398,7 @@ <!-- pass through html tags --> - <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|h1|h2|h3|h4|h5|h6|hr|br|pre|blockquote|div|span|a|img|b|i|strong|em|del|sub|sup|abbr|acronym|u|font"> + <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|h1|h2|h3|h4|h5|h6|hr|br|pre|blockquote|div|span|a|img|b|i|strong|em|del|sub|sup|abbr|acronym|u|font|map|area"> <xsl:copy> <xsl:copy-of select="@*" /> <xsl:apply-templates /> diff --git a/tools/Sandcastle/Presentation/Prototype/transforms/utilities_dduexml.xsl b/tools/Sandcastle/Presentation/Prototype/transforms/utilities_dduexml.xsl index 69a050e..dfa8a20 100644 --- a/tools/Sandcastle/Presentation/Prototype/transforms/utilities_dduexml.xsl +++ b/tools/Sandcastle/Presentation/Prototype/transforms/utilities_dduexml.xsl @@ -335,7 +335,7 @@ <xsl:template match="ddue:languageKeyword"> <xsl:variable name="word" select="." /> - <span class="keyword" data="langKeyword" value="{$word}"> + <span class="keyword" sdata="langKeyword" value="{$word}"> <xsl:choose> <xsl:when test="$word='null' or $word='Nothing' or $word='nullptr'"> <span class="cs">null</span> @@ -575,9 +575,10 @@ <!-- this is temporary --> <xsl:template match="ddue:snippets"> <xsl:variable name="codeId" select="generate-id()" /> + <div name="snippetGroup"> <table class="filter"><tr class="tabs" id="ct_{$codeId}"> <xsl:for-each select="ddue:snippet"> - <td class="tab" x-lang="{@language}" onclick="ct{$codeId}.toggleClass('x-lang','{@language}','activeTab','tab'); cb{$codeId}.toggleStyle('x-lang','{@language}','display','block','none');"><include item="{@language}Label" /></td> + <td class="tab" x-lang="{@language}" onclick="toggleClass('ct_{$codeId}','x-lang','{@language}','activeTab','tab'); toggleStyle('cb_{$codeId}','x-lang','{@language}','display','block','none');"><include item="{@language}Label" /></td> </xsl:for-each> </tr></table> <div id="cb_{$codeId}"> @@ -585,13 +586,7 @@ <div class="code" x-lang="{@language}"><pre><xsl:copy-of select="node()" /></pre></div> </xsl:for-each> </div> - <script type="text/javascript"><xsl:text> - var ct</xsl:text><xsl:value-of select="$codeId" /><xsl:text> = new ElementCollection('ct_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'); - var cb</xsl:text><xsl:value-of select="$codeId" /><xsl:text> = new ElementCollection('cb_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'); - lfc.registerTabbedArea(ct</xsl:text><xsl:value-of select="$codeId" /><xsl:text>, cb</xsl:text><xsl:value-of select="$codeId" /><xsl:text>); - ct</xsl:text><xsl:value-of select="$codeId" /><xsl:text>.toggleClass('x-lang','CSharp','activeTab','tab'); - cb</xsl:text><xsl:value-of select="$codeId" /><xsl:text>.toggleStyle('x-lang','CSharp','display','block','none'); - </xsl:text></script> + </div> </xsl:template> <xsl:template name="section"> diff --git a/tools/Sandcastle/Presentation/Prototype/transforms/utilities_metadata.xsl b/tools/Sandcastle/Presentation/Prototype/transforms/utilities_metadata.xsl index 0bbce6b..d9db2d7 100644 --- a/tools/Sandcastle/Presentation/Prototype/transforms/utilities_metadata.xsl +++ b/tools/Sandcastle/Presentation/Prototype/transforms/utilities_metadata.xsl @@ -35,7 +35,7 @@ <xsl:choose> <xsl:when test="$group='type'"> <xsl:variable name="apiTypeName"> - <xsl:value-of select="concat(/document/reference/containers/container[@namespace]/apidata/@name,'.',/document/reference/apidata/@name)" /> + <xsl:value-of select="concat(/document/reference/containers/namespace/apidata/@name,'.',/document/reference/apidata/@name)" /> <xsl:if test="count(/document/reference/templates/template) > 0"> <xsl:value-of select="concat('`',count(/document/reference/templates/template))" /> </xsl:if> @@ -59,7 +59,7 @@ </xsl:when> <xsl:when test="$group='member'"> <xsl:variable name="apiTypeName"> - <xsl:value-of select="concat(/document/reference/containers/container[@namespace]/apidata/@name,'.',/document/reference/containers/container[@type]/apidata/@name)" /> + <xsl:value-of select="concat(/document/reference/containers/namespace/apidata/@name,'.',/document/reference/containers/container[@type]/apidata/@name)" /> <xsl:if test="count(/document/reference/templates/template) > 0"> <xsl:value-of select="concat('`',count(/document/reference/templates/template))" /> </xsl:if> diff --git a/tools/Sandcastle/Presentation/Prototype/transforms/utilities_reference.xsl b/tools/Sandcastle/Presentation/Prototype/transforms/utilities_reference.xsl index 82e67dd..42402b0 100644 --- a/tools/Sandcastle/Presentation/Prototype/transforms/utilities_reference.xsl +++ b/tools/Sandcastle/Presentation/Prototype/transforms/utilities_reference.xsl @@ -9,7 +9,7 @@ <!-- key parameter is the api identifier string --> <xsl:param name="key" /> <xsl:param name="metadata" value="false" /> - <xsl:param name="languages" /> + <xsl:param name="languages">false</xsl:param> <xsl:include href="utilities_metadata.xsl" /> @@ -23,15 +23,6 @@ <xsl:call-template name="insertMetadata" /> </head> <body> - <script type="text/javascript"> - <xsl:text>var store = new CookieDataStore('docs');</xsl:text> - - <xsl:text>registerEventHandler(window, 'load', function() { var ss = new SplitScreen('control', 'main'); selectLanguage(store.get('lang')); });</xsl:text> - - <!-- - <xsl:text>registerEventHandler(window, 'load', function() { selectLanguage(store.get('lang')); });</xsl:text> - --> - </script> <xsl:call-template name="control"/> <xsl:call-template name="main"/> </body> @@ -56,6 +47,10 @@ </xsl:template> <xsl:template name="insertScripts"> + <script type="text/javascript"> + <includeAttribute name="src" item="scriptPath"><parameter>script_prototype.js</parameter></includeAttribute> + <xsl:text> </xsl:text> + </script> <script type="text/javascript"> <includeAttribute name="src" item="scriptPath"><parameter>EventUtilities.js</parameter></includeAttribute> <xsl:text> </xsl:text> @@ -329,7 +324,7 @@ <span class="topicTitle"><xsl:call-template name="topicTitleDecorated" /></span><br/> <div id="toolbar"> <span id="chickenFeet"><xsl:call-template name="chickenFeet" /></span> - <xsl:if test="count($languages/language) > 0"> + <xsl:if test="boolean(($languages != 'false') and (count($languages/language) > 0))"> <span id="languageFilter"> <select id="languageSelector" onchange="var names = this.value.split(' '); toggleVisibleLanguage(names[1]); lfc.switchLanguage(names[0]); store.set('lang',this.value); store.save();"> <xsl:for-each select="$languages/language"> @@ -337,7 +332,6 @@ </xsl:for-each> </select> </span> - <script>var sd = getStyleDictionary(); var lfc = new LanguageFilterController();</script> </xsl:if> </div> </div> @@ -481,10 +475,11 @@ </xsl:template> <xsl:template name="syntaxContent"> + <div id="syntaxSection"> <table class="filter"> <tr class="tabs" id="syntaxTabs"> <xsl:for-each select="div[@codeLanguage]"> - <td class="tab" x-lang="{@codeLanguage}" onclick="st.toggleClass('x-lang','{@codeLanguage}','activeTab','tab'); sb.toggleStyle('x-lang','{@codeLanguage}','display','block','none');" ><include item="{@codeLanguage}Label" /></td> + <td class="tab" x-lang="{@codeLanguage}" onclick="toggleClass('syntaxTabs','x-lang','{@codeLanguage}','activeTab','tab'); toggleStyle('syntaxBlocks','x-lang','{@codeLanguage}','display','block','none');" ><include item="{@codeLanguage}Label" /></td> </xsl:for-each> </tr> </table> @@ -493,22 +488,15 @@ <div class="code" x-lang="{@codeLanguage}"><pre><xsl:copy-of select="./node()" /></pre></div> </xsl:for-each> </div> - <script type="text/javascript"><xsl:text> - var st = new ElementCollection('syntaxTabs'); - var sb = new ElementCollection('syntaxBlocks'); - lfc.registerTabbedArea(st, sb); - st.toggleClass('x-lang','</xsl:text><xsl:value-of select="div[1]/@codeLanguage" /><xsl:text>','activeTab','tab'); - sb.toggleStyle('x-lang','</xsl:text><xsl:value-of select="div[1]/@codeLanguage" /><xsl:text>','display','block','none'); - </xsl:text></script> + </div> </xsl:template> <xsl:template name="usyntaxContent"> + <div id="usyntaxSection"> <table class="filter"> <tr class="tabs" id="usyntaxTabs"> <xsl:for-each select="div[@codeLanguage]"> - <td class="tab" x-lang="{@codeLanguage}" onclick="ust.toggleClass('x-lang','{@codeLanguage}','activeTab','tab'); usb.toggleStyle('x-lang','{@codeLanguage}','display','block','none');" > - <include item="{@codeLanguage}Label" /> - </td> + <td class="tab" x-lang="{@codeLanguage}" onclick="toggleClass('usyntaxTabs','x-lang','{@codeLanguage}','activeTab','tab'); toggleStyle('usyntaxBlocks','x-lang','{@codeLanguage}','display','block','none');" ><include item="{@codeLanguage}Label" /></td> </xsl:for-each> </tr> </table> @@ -521,15 +509,7 @@ </div> </xsl:for-each> </div> - <script type="text/javascript"> - <xsl:text> - var ust = new ElementCollection('usyntaxTabs'); - var usb = new ElementCollection('usyntaxBlocks'); - lfc.registerTabbedArea(ust, usb); - ust.toggleClass('x-lang','</xsl:text><xsl:value-of select="div[1]/@codeLanguage" /><xsl:text>','activeTab','tab'); - usb.toggleStyle('x-lang','</xsl:text><xsl:value-of select="div[1]/@codeLanguage" /><xsl:text>','display','block','none'); - </xsl:text> - </script> + </div> </xsl:template> <xsl:template match="elements" mode="root"> @@ -555,23 +535,24 @@ <xsl:call-template name="section"> <xsl:with-param name="title"><include item="typesTitle" /></xsl:with-param> <xsl:with-param name="content"> + <div id="typeSection"> <table class="filter"> <tr class="tabs" id="typeFilter"> - <td class="tab" value="all" onclick="tt.toggleClass('value','all','activeTab','tab'); tf.subgroup='all'; ts.process(getInstanceDelegate(tf,'filterElement'));"><include item="allTypesFilterLabel" /></td> + <td class="tab" value="all" onclick="toggleClass('typeFilter','value','all','activeTab','tab'); processSubgroup('all', 'type'); processList('typeList','filterElement', 'type');"><include item="allTypesFilterLabel" /></td> <xsl:if test="element/apidata[@subgroup='class']"> - <td class="tab" value="class" onclick="tt.toggleClass('value','class','activeTab','tab'); tf.subgroup='class'; ts.process(getInstanceDelegate(tf,'filterElement'));"><include item="classTypesFilterLabel" /></td> + <td class="tab" value="class" onclick="toggleClass('typeFilter','value','class','activeTab','tab'); processSubgroup('class', 'type'); processList('typeList','filterElement','type');"><include item="classTypesFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='structure']"> - <td class="tab" value="structure" onclick="tt.toggleClass('value','structure','activeTab','tab'); tf.subgroup='structure'; ts.process(getInstanceDelegate(tf,'filterElement'));"><include item="structureTypesFilterLabel" /></td> + <td class="tab" value="structure" onclick="toggleClass('typeFilter','value','structure','activeTab','tab'); processSubgroup('structure', 'type'); processList('typeList','filterElement','type');"><include item="structureTypesFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='interface']"> - <td class="tab" value="interface" onclick="tt.toggleClass('value','interface','activeTab','tab'); tf.subgroup='interface'; ts.process(getInstanceDelegate(tf,'filterElement'));"><include item="interfaceTypesFilterLabel" /></td> + <td class="tab" value="interface" onclick="toggleClass('typeFilter','value','interface','activeTab','tab'); processSubgroup('interface', 'type'); processList('typeList','filterElement','type');"><include item="interfaceTypesFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='enumeration']"> - <td class="tab" value="enumeration" onclick="tt.toggleClass('value','enumeration','activeTab','tab'); tf.subgroup='enumeration'; ts.process(getInstanceDelegate(tf,'filterElement'));"><include item="enumerationTypesFilterLabel" /></td> + <td class="tab" value="enumeration" onclick="toggleClass('typeFilter','value','enumeration','activeTab','tab'); processSubgroup('enumeration', 'type'); processList('typeList','filterElement','type');"><include item="enumerationTypesFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='delegate']"> - <td class="tab" value="delegate" onclick="tt.toggleClass('value','delegate','activeTab','tab'); tf.subgroup='delegate'; ts.process(getInstanceDelegate(tf,'filterElement'));"><include item="delegateTypesFilterLabel" /></td> + <td class="tab" value="delegate" onclick="toggleClass('typeFilter','value','delegate','activeTab','tab'); processSubgroup('delegate', 'type'); processList('typeList','filterElement','type');"><include item="delegateTypesFilterLabel" /></td> </xsl:if> </tr> </table> @@ -585,12 +566,7 @@ <xsl:sort select="apidata/@name" /> </xsl:apply-templates> </table> - <script type="text/javascript"><xsl:text> - var tt = new ElementCollection('typeFilter'); - var ts = new ElementCollection('typeList'); - var tf = new TypeFilter(); - tt.toggleClass('value','all','activeTab','tab'); - </xsl:text></script> + </div> </xsl:with-param> </xsl:call-template> </xsl:template> @@ -620,37 +596,38 @@ <xsl:call-template name="section"> <xsl:with-param name="title"><include item="membersTitle" /></xsl:with-param> <xsl:with-param name="content"> + <div id="allMembersSection"> <table class="filter"> <tr class="tabs" id="memberTabs"> - <td class="tab" value="all" onclick="mt.toggleClass('value','all','activeTab','tab'); mf.subgroup='all'; ms.process(getInstanceDelegate(mf,'filterElement'));"><include item="allMembersFilterLabel" /></td> + <td class="tab" value="all" onclick="toggleClass('memberTabs','value','all','activeTab','tab'); processSubgroup('all', 'member'); processList('memberList','filterElement','member');"><include item="allMembersFilterLabel" /></td> <xsl:if test="element/apidata[@subgroup='constructor']"> - <td class="tab" value="constructor" onclick="mt.toggleClass('value','constructor','activeTab','tab'); mf.subgroup='constructor'; ms.process(getInstanceDelegate(mf,'filterElement'));"><include item="constructorMembersFilterLabel" /></td> + <td class="tab" value="constructor" onclick="toggleClass('memberTabs','value','constructor','activeTab','tab'); processSubgroup('constructor','member');processList('memberList','filterElement','member');"><include item="constructorMembersFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='method']"> - <td class="tab" value="method" onclick="mt.toggleClass('value','method','activeTab','tab'); mf.subgroup='method'; ms.process(getInstanceDelegate(mf,'filterElement'));"><include item="methodMembersFilterLabel" /></td> + <td class="tab" value="method" onclick="toggleClass('memberTabs','value','method','activeTab','tab'); processSubgroup('method','member'); processList('memberList','filterElement','member');"><include item="methodMembersFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='property']"> - <td class="tab" value="property" onclick="mt.toggleClass('value','property','activeTab','tab'); mf.subgroup='property'; ms.process(getInstanceDelegate(mf,'filterElement'));"><include item="propertyMembersFilterLabel" /></td> + <td class="tab" value="property" onclick="toggleClass('memberTabs','value','property','activeTab','tab'); processSubgroup('property','member'); processList('memberList','filterElement','member');"><include item="propertyMembersFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='field']"> - <td class="tab" value="field" onclick="mt.toggleClass('value','field','activeTab','tab'); mf.subgroup='field'; ms.process(getInstanceDelegate(mf,'filterElement'));"><include item="fieldMembersFilterLabel" /></td> + <td class="tab" value="field" onclick="toggleClass('memberTabs','value','field','activeTab','tab'); processSubgroup('field','member'); processList('memberList','filterElement','member');"><include item="fieldMembersFilterLabel" /></td> </xsl:if> <xsl:if test="element/apidata[@subgroup='event']"> - <td class="tab" value="event" onclick="mt.toggleClass('value','event','activeTab','tab'); mf.subgroup='event'; ms.process(getInstanceDelegate(mf,'filterElement'));"><include item="eventMembersFilterLabel" /></td> + <td class="tab" value="event" onclick="toggleClass('memberTabs','value','event','activeTab','tab'); processSubgroup('event','member'); processList('memberList','filterElement','member');"><include item="eventMembersFilterLabel" /></td> </xsl:if> </tr> <tr> <td class="line" colspan="2"> - <label for="public"><input id="public" type="checkbox" checked="true" onclick="mf['public'] = this.checked; ms.process(getInstanceDelegate(mf,'filterElement'));" /> <include item="publicMembersFilterLabel" /></label><br/> - <label for="protected"><input id="protected" type="checkbox" checked="true" onclick="mf['protected'] = this.checked; ms.process(getInstanceDelegate(mf,'filterElement'));" /> <include item="protectedMembersFilterLabel" /></label> + <label for="public"><input id="public" type="checkbox" checked="true" onclick="toggleCheckState('public',this.checked); processList('memberList','filterElement','member');" /><include item="publicMembersFilterLabel" /></label><br/> + <label for="protected"><input id="protected" type="checkbox" checked="true" onclick="toggleCheckState('protected',this.checked); processList('memberList','filterElement','member');" /><include item="protectedMembersFilterLabel" /></label> </td> <td class="line" colspan="2"> - <label for="instance"><input id="instance" type="checkbox" checked="true" onclick="mf['instance'] = this.checked; ms.process(getInstanceDelegate(mf,'filterElement'));" /> <include item="instanceMembersFilterLabel" /></label><br/> - <label for="static"><input id="static" type="checkbox" checked="true" onclick="mf['static'] = this.checked; ms.process(getInstanceDelegate(mf,'filterElement'));" /> <include item="staticMembersFilterLabel" /></label> + <label for="instance"><input id="instance" type="checkbox" checked="true" onclick="toggleCheckState('instance',this.checked); processList('memberList','filterElement','member');" /><include item="instanceMembersFilterLabel" /></label><br/> + <label for="static"><input id="static" type="checkbox" checked="true" onclick="toggleCheckState('static',this.checked); processList('memberList','filterElement','member');" /><include item="staticMembersFilterLabel" /></label> </td> <td class="line" colspan="2"> - <label for="declared"><input id="declared" type="checkbox" checked="true" onclick="mf['declared'] = this.checked; ms.process(getInstanceDelegate(mf,'filterElement'));" /> <include item="declaredMembersFilterLabel" /></label><br/> - <label for="inherited"><input id="inherited" type="checkbox" checked="true" onclick="mf['inherited'] = this.checked; ms.process(getInstanceDelegate(mf,'filterElement'));" /> <include item="inheritedMembersFilterLabel" /></label> + <label for="declared"><input id="declared" type="checkbox" checked="true" onclick="toggleCheckState('declared',this.checked); processList('memberList','filterElement','member');" /><include item="declaredMembersFilterLabel" /></label><br/> + <label for="inherited"><input id="inherited" type="checkbox" checked="true" onclick="toggleCheckState('inherited',this.checked); processList('memberList','filterElement','member');" /><include item="inheritedMembersFilterLabel" /></label> </td> </tr> </table> @@ -664,12 +641,7 @@ <xsl:sort select="apidata/@name" /> </xsl:apply-templates> </table> - <script type="text/javascript"><xsl:text> - var mt = new ElementCollection('memberTabs'); - var ms = new ElementCollection('memberList'); - var mf = new MemberFilter(); - mt.toggleClass('value','all','activeTab','tab'); - </xsl:text></script> + </div> </xsl:with-param> </xsl:call-template> </xsl:if> @@ -895,7 +867,7 @@ <xsl:template match="library"> <p><include item="locationInformation"> - <parameter><span data="assembly"><xsl:value-of select="@assembly"/></span></parameter> + <parameter><span sdata="assembly"><xsl:value-of select="@assembly"/></span></parameter> <parameter><xsl:value-of select="@module" /></parameter> </include></p> </xsl:template> @@ -978,6 +950,7 @@ <table cellspacing="0" cellpadding="0"> <xsl:for-each select="ancestors/type"> <xsl:sort select="position()" data-type="number" order="descending" /> + <!-- <xsl:sort select="@api"/> --> <tr> <xsl:call-template name="createTableEntries"> <xsl:with-param name="count" select="position() - 2" /> @@ -1023,7 +996,7 @@ </tr> <xsl:for-each select="descendents/type"> - + <xsl:sort select="@api"/> <tr> <xsl:call-template name="createTableEntries"> diff --git a/tools/Sandcastle/Presentation/Shared/content/syntax_content.xml b/tools/Sandcastle/Presentation/Shared/content/syntax_content.xml index cf4e580..8197bec 100644 --- a/tools/Sandcastle/Presentation/Shared/content/syntax_content.xml +++ b/tools/Sandcastle/Presentation/Shared/content/syntax_content.xml @@ -32,6 +32,13 @@ <!-- JavaScript(Script#) messages--> <item id="UnsupportedType_ScriptSharp">This type supports the Script# infrastructure and cannot be used directly from JavaScript.</item> + <item id="UnsupportedUnsafe_JavaScript">JavaScript does not support APIs that consume or return unsafe types.</item> + <item id="UnsupportedGeneric_JavaScript">JavaScript does not support generic types or methods.</item> + <item id="UnsupportedExplicit_JavaScript">JavaScript does not support explicit interface implementations.</item> + <item id="UnsupportedOperator_JavaScript">JavaScript does not support overloaded operators.</item> + <item id="UnsupportedStructure_JavaScript">JavaScript supports the use of structures, but not the declaration of new ones.</item> + <item id="UnsupportedIndex_JavaScript">JavaScript does not support indexed properties.</item> + <item id="UnsupportedCast_JavaScript">JavaScript does not support the declaration of new casting operators.</item> <!-- VB usages message --> <item id="UnsupportedUnsafe_VisualBasicUsage">Visual basic does not support APIs that consume or return unsafe types.</item> <item id="UnsupportedOperator_VisualBasicUsage">Visual basic does not support this operator.</item> diff --git a/tools/Sandcastle/Presentation/Shared/transforms/utilities_dduexml.xsl b/tools/Sandcastle/Presentation/Shared/transforms/utilities_dduexml.xsl index 633a2da..3825a63 100644 --- a/tools/Sandcastle/Presentation/Shared/transforms/utilities_dduexml.xsl +++ b/tools/Sandcastle/Presentation/Shared/transforms/utilities_dduexml.xsl @@ -50,7 +50,7 @@ <xsl:template match="ddue:parameterReference"> <xsl:if test="normalize-space(.)"> - <span class="parameter" data="paramReference"> + <span class="parameter" sdata="paramReference"> <xsl:value-of select="." /> </span> </xsl:if> </xsl:template> @@ -197,7 +197,7 @@ </xsl:template> <xsl:template match="ddue:link"> - <span data="link"> + <span sdata="link"> <xsl:choose> <xsl:when test="starts-with(@xlink:href,'#')"> <!-- in-page link --> @@ -233,7 +233,7 @@ </xsl:template> <xsl:template match="ddue:codeEntityReference"> - <span data="cer" target="{string(.)}"> + <span sdata="cer" target="{string(.)}"> <referenceLink target="{string(.)}"> <xsl:if test="@qualifyHint"> <xsl:attribute name="show-container"> @@ -255,7 +255,7 @@ <!-- LEAVE THIS TEMPORARILY to support oldstyle GTMT link tagging --> <xsl:template match="ddue:link[starts-with(.,'GTMT#')]"> <!-- not supporting popup definitions; just show the display text --> - <span data="link"> + <span sdata="link"> <xsl:value-of select="substring-after(.,'GTMT#')"/> </span> </xsl:template> diff --git a/tools/Sandcastle/Presentation/Shared/transforms/utilities_reference.xsl b/tools/Sandcastle/Presentation/Shared/transforms/utilities_reference.xsl index bfe8fcc..b3c499f 100644 --- a/tools/Sandcastle/Presentation/Shared/transforms/utilities_reference.xsl +++ b/tools/Sandcastle/Presentation/Shared/transforms/utilities_reference.xsl @@ -122,21 +122,20 @@ <xsl:template match="member" mode="link"> <xsl:param name="qualified" select="true()" /> - <xsl:if test="$qualified"> - <xsl:apply-templates select="type" mode="link" /> - <span class="languageSpecificText"> - <span class="cs">.</span> - <span class="vb">.</span> - <span class="cpp">::</span> - <span class="nu">.</span> - </span> - </xsl:if> <xsl:choose> <xsl:when test="@display-api"> - <referenceLink target="{@api}" display-target="{@display-api}" /> + <referenceLink target="{@api}" display-target="{@display-api}"> + <xsl:if test="$qualified"> + <xsl:attribute name="show-container">true</xsl:attribute> + </xsl:if> + </referenceLink> </xsl:when> <xsl:otherwise> - <referenceLink target="{@api}" /> + <referenceLink target="{@api}"> + <xsl:if test="$qualified"> + <xsl:attribute name="show-container">true</xsl:attribute> + </xsl:if> + </referenceLink> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -198,12 +197,12 @@ </xsl:template> <xsl:template match="pointerTo" mode="plain"> - <xsl:apply-templates mode="plain"/> + <xsl:apply-templates select="type|arrayOf|pointerTo|referenceTo|template|specialization|templates" mode="plain"/> <xsl:text>*</xsl:text> </xsl:template> <xsl:template match="referenceTo" mode="plain"> - <xsl:apply-templates mode="plain"/> + <xsl:apply-templates select="type|arrayOf|pointerTo|referenceTo|template|specialization|templates" mode="plain"/> </xsl:template> <xsl:template match="template" mode="plain"> @@ -305,12 +304,12 @@ </xsl:template> <xsl:template match="pointerTo" mode="decorated"> - <xsl:apply-templates mode="decorated"/> + <xsl:apply-templates select="type|arrayOf|pointerTo|referenceTo|template|specialization|templates" mode="decorated"/> <xsl:text>*</xsl:text> </xsl:template> <xsl:template match="referenceTo" mode="decorated"> - <xsl:apply-templates mode="decorated"/> + <xsl:apply-templates select="type|arrayOf|pointerTo|referenceTo|template|specialization|templates" mode="decorated"/> <span class="cpp">%</span> </xsl:template> diff --git a/tools/Sandcastle/Presentation/hana/Content/reference_content.xml b/tools/Sandcastle/Presentation/hana/Content/reference_content.xml index 2cfee10..4660e47 100644 --- a/tools/Sandcastle/Presentation/hana/Content/reference_content.xml +++ b/tools/Sandcastle/Presentation/hana/Content/reference_content.xml @@ -349,6 +349,7 @@ <item id="SeeAlsoNamespaceLinkText">{0} Namespace</item> <item id="SeeAlsoTypeLinkText">{0} <include item="{1}SubGroup"/></item> <item id="SeeAlsoMembersLinkText">{0} Members</item> + <item id="SeeAlsoOverloadLinkText">{0} Overload</item> <item id="SubGroup"></item> <item id="classSubGroup">Class</item> diff --git a/tools/Sandcastle/Presentation/hana/Content/shared_content.xml b/tools/Sandcastle/Presentation/hana/Content/shared_content.xml index 57ed291..2d0718b 100644 --- a/tools/Sandcastle/Presentation/hana/Content/shared_content.xml +++ b/tools/Sandcastle/Presentation/hana/Content/shared_content.xml @@ -50,6 +50,7 @@ <item id="XAMLLabel">XAML</item> <item id="declarationLabel">Declaration</item> <item id="usageLabel">Usage</item> + <item id="JavaScriptLabel">JavaScript</item> <item id="SeeAlso">See Also</item> <item id="SeeAlsoTasks">Tasks</item> diff --git a/tools/Sandcastle/Presentation/hana/Scripts/CommonUtilities.js b/tools/Sandcastle/Presentation/hana/Scripts/CommonUtilities.js index 431eb96..dbb8fa1 100644 --- a/tools/Sandcastle/Presentation/hana/Scripts/CommonUtilities.js +++ b/tools/Sandcastle/Presentation/hana/Scripts/CommonUtilities.js @@ -210,14 +210,15 @@ getChildNodes = function(node) } } -process = function(list, processFunction) -{ +process = function(list, methodName, typeName) { var listNodes = getChildNodes(list); for(var i=0; i < listNodes.length; i++) { var listElement = listNodes[i]; - processFunction(listElement); + + if (typeName == 'type' && tf != null) getInstanceDelegate(tf,methodName)(listElement); + else if (typeName == 'member' && mf != null) getInstanceDelegate(mf, methodName)(listElement); } } @@ -307,8 +308,21 @@ function toggleSelect(imageElement, section) } } +function changeLanguage(data, name, style) { + if (languageFilter == null) return; + + languageFilter.changeLanguage(data, name, style); +} +function processSubgroup(subgroup, typeName) { + if (typeName == 'type' && tf != null) tf.subgroup = subgroup; + else if (typeName == 'member' && mf != null) mf.subgroup = subgroup; +} +function toggleCheckState(visibility, value) { + if (mf == null) return; + mf[visibility] = value; +} diff --git a/tools/Sandcastle/Presentation/hana/Scripts/script_manifold.js b/tools/Sandcastle/Presentation/hana/Scripts/script_manifold.js index e64a126..3ed6665 100644 --- a/tools/Sandcastle/Presentation/hana/Scripts/script_manifold.js +++ b/tools/Sandcastle/Presentation/hana/Scripts/script_manifold.js @@ -4,6 +4,12 @@ window.onunload=Window_Unload; window.onbeforeprint = set_to_print; window.onafterprint = reset_form; +var languageFilter; +var data; +var tf; +var mf; +var lang = 'CSharp'; + var vbDeclaration; var vbUsage; var csLang; @@ -228,6 +234,15 @@ function LoadPage() if (!sectionStatesInitialized) InitSectionStates(); + var imgElements = document.getElementsByName("toggleSwitch"); + + for (i = 0; i < imgElements.length; i++) + { + if ((sectionStates[imgElements[i].id] == "e")) + ExpandSection(imgElements[i]); + else + CollapseSection(imgElements[i]); + } SetCollapseAll(); @@ -238,11 +253,28 @@ function LoadPage() // filtering dropdowns if (document.getElementById('languageSpan') != null) { var languageMenu = new Dropdown('languageFilterToolTip', 'languageSpan'); + languageFilter = new Selector('languageSpan'); + languageFilter.register(codeBlockHandler); + languageFilter.register(styleSheetHandler); + languageFilter.register(persistenceHandler); + languageFilter.register(languageHandler); + toggleLanguage('languageSpan', 'x-lang', 'CSharp'); + toggleInlineStyle('cs'); } if (document.getElementById('membersOptionsFilterToolTip') != null) { var languageMenu = new Dropdown('membersOptionsFilterToolTip', 'membersOptionsSpan'); } + data = new DataStore('docs'); + registerEventHandler(window, 'load', function() {if (languageFilter != null) languageFilter.select(data)}); + + // process tab behavior for syntax, snippets, type and member sections + tf = new TypeFilter(); + mf = new MemberFilter(); + setUpSyntax(); + setUpSnippets(); + setUpType(); + setUpAllMembers(); var mainSection = document.getElementById("mainSection"); // vs70.js did this to allow up/down arrow scrolling, I think @@ -1592,3 +1624,67 @@ function sendfeedback(subject, id,alias){ else title = document.getElementsByTagName("TITLE")[0].textContent.replace(rExp, "''"); location.href = "mailto:" + alias + "?subject=" + subject + title + "&body=Topic%20ID:%20" + id + "%0d%0aURL:%20" + url + "%0d%0a%0d%0aComments:%20"; } + +function setUpSyntax() { + var syntaxSection = document.getElementById('syntaxCodeBlocks'); + if (syntaxSection == null) return; + + processSection(syntaxSection, 'x-lang', lang, true, true, true, true); +} + +function setUpSnippets() { + var divs = document.getElementsByTagName("DIV"); + + for (var i = 0; i < divs.length; i++) + { + var name = divs[i].getAttribute("name"); + if (name == null || name != "snippetGroup") continue; + processSection(divs[i], 'x-lang', lang, true, true, true, true); + } +} + +function setUpType() { + var typeSection = document.getElementById("typeSection"); + if (typeSection == null) return; + + processSection(typeSection, 'value', 'all', true, false, true, false); +} + +function setUpAllMembers() { + var allMembersSection = document.getElementById("allMembersSection"); + if (allMembersSection == null) return; + + processSection(allMembersSection, 'value', 'all', true, false, true, false); +} + +function processSection(section, attribute, value, toggleClassValue, toggleStyleValue, curvedToggleClassValue, registerValue) { + var nodes = section.childNodes; + + var curvedTabId; + var tabId; + var blockId; + + if (nodes.length != 2) return; + + if (nodes[0].tagName == 'TABLE') { + var rows = nodes[0].getElementsByTagName('tr'); + + if (rows.length != 2) return; + + curvedTabId = rows[0].getAttribute('id'); + tabId = rows[1].getAttribute('id'); + } + + if(nodes[1].tagName == 'DIV') { + blockId = nodes[1].getAttribute('id'); + } + + if (toggleClassValue) toggleClass(tabId,attribute,value,'activeTab','tab'); + if (toggleStyleValue) toggleStyle(blockId,attribute,value,'display','block','none'); + if (curvedToggleClassValue) curvedToggleClass(curvedTabId, attribute, value); + + if (languageFilter == null) return; + + if (registerValue) languageFilter.registerTabbedArea(curvedTabId, tabId, blockId); +} + diff --git a/tools/Sandcastle/Presentation/hana/configuration/sandcastle-scbuild.config b/tools/Sandcastle/Presentation/hana/configuration/sandcastle-scbuild.config index c2e1097..aa276f7 100644 --- a/tools/Sandcastle/Presentation/hana/configuration/sandcastle-scbuild.config +++ b/tools/Sandcastle/Presentation/hana/configuration/sandcastle-scbuild.config @@ -97,6 +97,7 @@ <!--<language label="JSharp" name="JSharp" style="cs" /> <language label="JScript" name="JScript" style="cs" /> <language label="XAML" name="XAML" style="cs" /> --> + <language label="JavaScript" name="JavaScript" style="cs" /> </argument> </transform> </component> diff --git a/tools/Sandcastle/Presentation/hana/configuration/sandcastle.config b/tools/Sandcastle/Presentation/hana/configuration/sandcastle.config index cfa51df..79353f5 100644 --- a/tools/Sandcastle/Presentation/hana/configuration/sandcastle.config +++ b/tools/Sandcastle/Presentation/hana/configuration/sandcastle.config @@ -99,6 +99,7 @@ <!--<language label="JSharp" name="JSharp" style="cs" /> <language label="JScript" name="JScript" style="cs" /> <language label="XAML" name="XAML" style="cs" /> --> + <language label="JavaScript" name="JavaScript" style="cs" /> </argument> </transform> </component> diff --git a/tools/Sandcastle/Presentation/hana/transforms/globalTemplates.xsl b/tools/Sandcastle/Presentation/hana/transforms/globalTemplates.xsl index abf6d2d..0136289 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/globalTemplates.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/globalTemplates.xsl @@ -10,28 +10,78 @@ <!-- a link to the containing type on all list and member topics --> <xsl:if test="$group='member' or $group='list'"> + <xsl:variable name="typeTopicId"> + <xsl:choose> + <xsl:when test="/document/reference/topicdata/@typeTopicId"> + <xsl:value-of select="/document/reference/topicdata/@typeTopicId"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="/document/reference/containers/type/@api"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <div class="seeAlsoStyle"> - <include item="SeeAlsoTypeLinkText"> - <parameter> - <referenceLink target="{$typeId}" /> - <!--<xsl:value-of select="$typeName"/> --> - </parameter> - <parameter> - <xsl:value-of select="/document/reference/containers/type/apidata/@subgroup"/> - </parameter> - </include> + <referenceLink target="{$typeTopicId}" display-target="format"> + <include item="SeeAlsoTypeLinkText"> + <parameter>{0}</parameter> + <parameter> + <xsl:choose> + <xsl:when test="/document/reference/topicdata/@typeTopicId"> + <xsl:value-of select="/document/reference/apidata/@subgroup"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="/document/reference/containers/type/apidata/@subgroup"/> + </xsl:otherwise> + </xsl:choose> + </parameter> + </include> + </referenceLink> + </div> + </xsl:if> + + <!-- a link to the type's All Members list --> + <xsl:variable name="allMembersTopicId"> + <xsl:choose> + <xsl:when test="/document/reference/topicdata/@allMembersTopicId"> + <xsl:value-of select="/document/reference/topicdata/@allMembersTopicId"/> + </xsl:when> + <xsl:when test="$group='member' or ($group='list' and $subgroup='overload')"> + <xsl:value-of select="/document/reference/containers/type/topicdata/@allMembersTopicId"/> + </xsl:when> + </xsl:choose> + </xsl:variable> + <xsl:if test="normalize-space($allMembersTopicId) and not($allMembersTopicId=$key)"> + <div class="seeAlsoStyle"> + <referenceLink target="{$allMembersTopicId}" display-target="format"> + <include item="SeeAlsoMembersLinkText"> + <parameter>{0}</parameter> + </include> + </referenceLink> </div> </xsl:if> + <xsl:if test="/document/reference/memberdata/@overload"> + <!-- a link to the overload topic --> + <div class="seeAlsoStyle"> + <referenceLink target="{/document/reference/memberdata/@overload}" display-target="format" show-parameters="false"> + <include item="SeeAlsoOverloadLinkText"> + <parameter>{0}</parameter> + </include> + </referenceLink> + </div> + </xsl:if> + <!-- a link to the namespace topic --> + <xsl:variable name="namespaceId"> + <xsl:value-of select="/document/reference/containers/namespace/@api"/> + </xsl:variable> <xsl:if test="normalize-space($namespaceId)"> <div class="seeAlsoStyle"> - <include item="SeeAlsoNamespaceLinkText"> - <parameter> - <referenceLink target="{$namespaceId}" /> - <!--<xsl:value-of select="/document/reference/containers/namespace/apidata/@name"/> --> - </parameter> - </include> + <referenceLink target="{$namespaceId}" display-target="format"> + <include item="SeeAlsoNamespaceLinkText"> + <parameter>{0}</parameter> + </include> + </referenceLink> </div> </xsl:if> @@ -50,11 +100,7 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> - - <xsl:variable name="namespaceId"> - <xsl:value-of select="/document/reference/containers/namespace/@api"/> - </xsl:variable> - + <!-- indent by 2*n spaces --> <xsl:template name="indent"> <xsl:param name="count" /> diff --git a/tools/Sandcastle/Presentation/hana/transforms/htmlBody.xsl b/tools/Sandcastle/Presentation/hana/transforms/htmlBody.xsl index 64fb50e..c52aca7 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/htmlBody.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/htmlBody.xsl @@ -319,7 +319,7 @@ <xsl:template name="languageSpan"> <div id="languageSpan"> <xsl:for-each select="$languages/language"> - <div id="{@name}" onclick="languageFilter.changeLanguage(data, '{@name}', '{@style}');"> + <div id="{@name}" onclick="changeLanguage(data, '{@name}', '{@style}');"> <img id="{@name}Image" onmouseover="mouseOverCheck({@name}Image,radioSelectImage,radioUnSelectImage,radioSelectHoverImage,radioUnSelectHoverImage)" onmouseout="mouseOutCheck({@name}Image,radioSelectImage,radioUnSelectImage,radioSelectHoverImage,radioUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>r_unselect.gif</parameter> @@ -330,7 +330,6 @@ </div> <br /> </xsl:for-each> - <script>var languageFilter = new Selector('languageSpan');languageFilter.register(codeBlockHandler); languageFilter.register(styleSheetHandler); languageFilter.register(persistenceHandler);languageFilter.register(languageHandler);toggleLanguage('languageSpan', 'x-lang', 'CSharp');toggleInlineStyle('cs');</script> </div> </xsl:template> diff --git a/tools/Sandcastle/Presentation/hana/transforms/main_conceptual.xsl b/tools/Sandcastle/Presentation/hana/transforms/main_conceptual.xsl index 9c67ca5..1bd4c7e 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/main_conceptual.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/main_conceptual.xsl @@ -40,10 +40,6 @@ <body> <xsl:call-template name="upperBodyStuff"/> <xsl:call-template name="main"/> - <script type="text/javascript"> - var data = new DataStore('docs'); - registerEventHandler(window, 'load', function() {languageFilter.select(data)}); - </script> </body> </html> </xsl:template> diff --git a/tools/Sandcastle/Presentation/hana/transforms/main_reference.xsl b/tools/Sandcastle/Presentation/hana/transforms/main_reference.xsl index 57d36dc..efb7300 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/main_reference.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/main_reference.xsl @@ -60,7 +60,7 @@ </xsl:if> <!-- summary --> - <span data="authoredSummary"> + <span sdata="authoredSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:summary[1]" /> </span> <xsl:if test="$group='namespace'"> @@ -169,7 +169,7 @@ <xsl:template name="getParameterDescription"> <xsl:param name="name" /> - <span data="authoredParameterSummary"> + <span sdata="authoredParameterSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:parameters/ddue:parameter[string(ddue:parameterReference)=$name]/ddue:content" /> </span> </xsl:template> @@ -209,7 +209,7 @@ </xsl:otherwise> </xsl:choose> <br/> - <span data="authoredValueSummary"> + <span sdata="authoredValueSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:returnValue" /> </span> </xsl:template> @@ -236,7 +236,7 @@ </xsl:template> <xsl:template name="getElementDescription"> - <span data="memberAuthoredSummary"> + <span sdata="memberAuthoredSummary"> <xsl:apply-templates select="ddue:summary[1]/ddue:para/node()" /> </span> </xsl:template> @@ -277,7 +277,9 @@ <include item="syntaxTitle"/> </xsl:with-param> <xsl:with-param name="content"> + <div id="syntaxCodeBlocks" class="code"> <xsl:call-template name="syntaxBlocks" /> + </div> <!-- parameters & return value --> <xsl:apply-templates select="/document/reference/templates" /> diff --git a/tools/Sandcastle/Presentation/hana/transforms/main_sandcastle.xsl b/tools/Sandcastle/Presentation/hana/transforms/main_sandcastle.xsl index cd9ac6b..28b73c0 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/main_sandcastle.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/main_sandcastle.xsl @@ -9,7 +9,7 @@ <xsl:variable name="summary" select="normalize-space(/document/comments/summary)" /> <xsl:variable name="abstractSummary" select="/document/comments/summary" /> - <xsl:variable name="hasSeeAlsoSection" select="boolean((count(/document/comments/seealso | /document/comments/summary/seealso) > 0) or + <xsl:variable name="hasSeeAlsoSection" select="boolean((count(/document/comments//seealso | /document/reference/elements/element/overloads//seealso) > 0) or ($group='type' or $group='member' or $group='list'))"/> <xsl:variable name="examplesSection" select="boolean(string-length(/document/comments/example[normalize-space(.)]) > 0)"/> <xsl:variable name="languageFilterSection" select="boolean(string-length(/document/comments/example[normalize-space(.)]) > 0)" /> @@ -196,6 +196,7 @@ <xsl:choose> <xsl:when test="code/@language"> <xsl:variable name="codeId" select="generate-id()" /> + <div name="snippetGroup"> <table class="filter"> <tr id="curvedTabs_{$codeId}"> <xsl:for-each select="code"> @@ -216,7 +217,7 @@ <xsl:variable name="languageEvent"> <xsl:choose> <xsl:when test="$style != ''"> - <xsl:text>languageFilter.changeLanguage(data, '</xsl:text><xsl:value-of select="@language"/> + <xsl:text>changeLanguage(data, '</xsl:text><xsl:value-of select="@language"/> <xsl:text>', '</xsl:text><xsl:value-of select="$style" /> <xsl:text>');</xsl:text> </xsl:when> @@ -247,14 +248,7 @@ </div> </xsl:for-each> </div> - <script type="text/javascript"> - <xsl:if test="$languages != 'false'"> - languageFilter.registerTabbedArea(<xsl:text>'curvedTabs_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>','ct_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>','cb_</xsl:text><xsl:value-of select="$codeId"/><xsl:text>'</xsl:text>); - </xsl:if> - toggleClass(<xsl:text>'ct_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'</xsl:text>,'x-lang','CSharp','activeTab','tab'); - curvedToggleClass(<xsl:text>'curvedTabs_</xsl:text><xsl:value-of select="$codeId"/><xsl:text>'</xsl:text>,'x-lang', 'CSharp'); - toggleStyle(<xsl:text>'cb_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'</xsl:text>,'x-lang','CSharp','display','block','none'); - </script> + </div> </xsl:when> <xsl:otherwise> <xsl:apply-templates /> @@ -344,9 +338,11 @@ </xsl:with-param> <xsl:with-param name="content"> <xsl:call-template name="autogenSeeAlsoLinks"/> - <xsl:for-each select="/document/comments/seealso | /document/comments/summary/seealso"> + <xsl:for-each select="/document/comments//seealso | /document/reference/elements/element/overloads//seealso"> <div class="seeAlsoStyle"> - <xsl:apply-templates select="." /> + <xsl:apply-templates select="."> + <xsl:with-param name="displaySeeAlso" select="true()" /> + </xsl:apply-templates> </div> </xsl:for-each> </xsl:with-param> @@ -408,7 +404,26 @@ </xsl:choose> </xsl:template> + <xsl:template match="see[@href]"> + <xsl:choose> + <xsl:when test="normalize-space(.)"> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> + <xsl:value-of select="." /> + </a> + </xsl:when> + <xsl:otherwise> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> + <xsl:value-of select="@href" /> + </a> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match="seealso[@href]"> + <xsl:param name="displaySeeAlso" select="false()" /> + <xsl:if test="$displaySeeAlso"> <xsl:choose> <xsl:when test="normalize-space(.)"> <a> @@ -423,6 +438,7 @@ </a> </xsl:otherwise> </xsl:choose> + </xsl:if> </xsl:template> <xsl:template match="see[@langword]"> @@ -467,6 +483,8 @@ <xsl:template match="seealso"> + <xsl:param name="displaySeeAlso" select="false()" /> + <xsl:if test="$displaySeeAlso"> <xsl:choose> <xsl:when test="normalize-space(.)"> <referenceLink target="{@cref}" qualified="true"> @@ -477,12 +495,11 @@ <referenceLink target="{@cref}" qualified="true" /> </xsl:otherwise> </xsl:choose> + </xsl:if> </xsl:template> <xsl:template match="c"> - <span class="code"> - <xsl:value-of select="." /> - </span> + <span class="code"><xsl:apply-templates /></span> </xsl:template> <xsl:template match="paramref"> @@ -525,7 +542,7 @@ <!-- pass through html tags --> - <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|a|img|b|i|strong|em|del|sub|sup|br|hr|h1|h2|h3|h4|h5|h6|pre|div|span|blockquote|abbr|acronym|u|font"> + <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|a|img|b|i|strong|em|del|sub|sup|br|hr|h1|h2|h3|h4|h5|h6|pre|div|span|blockquote|abbr|acronym|u|font|map|area"> <xsl:copy> <xsl:copy-of select="@*" /> <xsl:apply-templates /> @@ -604,7 +621,7 @@ <h1 class="heading"> <span onclick="ExpandCollapse({$toggleTitle})" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey({$toggleTitle}, event)" tabindex="0"> - <img id="{$toggleTitle}" onload="OnLoadImage(event)" class="toggle" name="toggleSwitch"> + <img id="{$toggleTitle}" class="toggle" name="toggleSwitch"> <includeAttribute name="src" item="iconPath"> <parameter>collapse_all.gif</parameter> </includeAttribute> diff --git a/tools/Sandcastle/Presentation/hana/transforms/utilities_dduexml.xsl b/tools/Sandcastle/Presentation/hana/transforms/utilities_dduexml.xsl index e652388..9b12491 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/utilities_dduexml.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/utilities_dduexml.xsl @@ -623,7 +623,7 @@ <xsl:when test="ddue:title"> <h1 class="heading"> <span onclick="ExpandCollapse(sectionToggle{$sectionCount})" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(sectionToggle{$sectionCount}, event)" tabindex="0"> - <img id="sectionToggle{$sectionCount}" onload="OnLoadImage(event)" class="toggle" name="toggleSwitch"> + <img id="sectionToggle{$sectionCount}" class="toggle" name="toggleSwitch"> <includeAttribute name="src" item="iconPath"> <parameter>collapse_all.gif</parameter> </includeAttribute> @@ -776,7 +776,7 @@ <xsl:template match="ddue:languageKeyword"> <xsl:variable name="word" select="." /> - <span class="keyword" data="langKeyword" value="{$word}"> + <span class="keyword" sdata="langKeyword" value="{$word}"> <xsl:choose> <xsl:when test="$word='null' or $word='Nothing' or $word='nullptr'"> <span class="cs">null</span> @@ -1153,6 +1153,7 @@ <xsl:template match="ddue:snippets"> <xsl:variable name="codeId" select="generate-id()" /> + <div name="snippetGroup"> <table class="filter" cellspacing="0" cellpadding="0"> <tr id="curvedTabs_{$codeId}"> <xsl:for-each select="ddue:snippet"> @@ -1173,7 +1174,7 @@ <xsl:variable name="languageEvent"> <xsl:choose> <xsl:when test="$style != ''"> - <xsl:text>languageFilter.changeLanguage(data, '</xsl:text><xsl:value-of select="@language"/> + <xsl:text>changeLanguage(data, '</xsl:text><xsl:value-of select="@language"/> <xsl:text>', '</xsl:text><xsl:value-of select="$style" /> <xsl:text>');</xsl:text> </xsl:when> @@ -1203,14 +1204,7 @@ </div> </xsl:for-each> </div> - <script type="text/javascript"> - <xsl:if test="$languages != 'false'"> - languageFilter.registerTabbedArea(<xsl:text>'curvedTabs_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>','ct_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>','cb_</xsl:text><xsl:value-of select="$codeId"/><xsl:text>'</xsl:text>); - </xsl:if> - toggleClass(<xsl:text>'ct_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'</xsl:text>,'x-lang','CSharp','activeTab','tab'); - curvedToggleClass(<xsl:text>'curvedTabs_</xsl:text><xsl:value-of select="$codeId"/><xsl:text>'</xsl:text>,'x-lang', 'CSharp'); - toggleStyle(<xsl:text>'cb_</xsl:text><xsl:value-of select="$codeId" /><xsl:text>'</xsl:text>,'x-lang','CSharp','display','block','none'); - </script> + </div> </xsl:template> <xsl:template name="section"> @@ -1223,7 +1217,7 @@ <h1 class="heading"> <span onclick="ExpandCollapse({$toggleTitle})" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey({$toggleTitle}, event)" tabindex="0"> - <img id="{$toggleTitle}" onload="OnLoadImage(event)" class="toggle" name="toggleSwitch"> + <img id="{$toggleTitle}" class="toggle" name="toggleSwitch"> <includeAttribute name="src" item="iconPath"> <parameter>collapse_all.gif</parameter> </includeAttribute> @@ -1252,7 +1246,7 @@ <!-- capture authored glossary <link> nodes --> <xsl:template match="ddue:link[starts-with(.,'GTMT#')]"> <!-- not supporting popup definitions; just show the display text --> - <span data="link"> + <span sdata="link"> <xsl:value-of select="substring-after(.,'GTMT#')"/> </span> </xsl:template> diff --git a/tools/Sandcastle/Presentation/hana/transforms/utilities_reference.xsl b/tools/Sandcastle/Presentation/hana/transforms/utilities_reference.xsl index d35d378..0bed265 100644 --- a/tools/Sandcastle/Presentation/hana/transforms/utilities_reference.xsl +++ b/tools/Sandcastle/Presentation/hana/transforms/utilities_reference.xsl @@ -37,13 +37,7 @@ <xsl:call-template name="upperBodyStuff"/> <!--<xsl:call-template name="control"/>--> <xsl:call-template name="main"/> - <xsl:if test="$languages != 'false'"> - <script type="text/javascript"> - var data = new DataStore('docs'); - registerEventHandler(window, 'load', function() {languageFilter.select(data)}); - </script> - </xsl:if> - </body> + </body> </html> </xsl:template> @@ -765,7 +759,7 @@ <xsl:variable name="languageEvent"> <xsl:choose> <xsl:when test="$style != ''"> - <xsl:text>languageFilter.changeLanguage(data, '</xsl:text><xsl:value-of select="@codeLanguage"/> + <xsl:text>changeLanguage(data, '</xsl:text><xsl:value-of select="@codeLanguage"/> <xsl:text>', '</xsl:text><xsl:value-of select="$style" /> <xsl:text>');</xsl:text> </xsl:when> @@ -822,22 +816,6 @@ </div> </xsl:for-each> </div> - <script type="text/javascript"> - <xsl:text> - toggleClass('syntaxTabs','x-lang','</xsl:text> - <xsl:value-of select="div[1]/@codeLanguage" /> - <xsl:text>','activeTab','tab'); - toggleStyle('syntaxBlocks','x-lang','</xsl:text> - <xsl:value-of select="div[1]/@codeLanguage" /> - <xsl:text>','display','block','none'); - curvedToggleClass('curvedSyntaxTabs', 'x-lang', '</xsl:text> - <xsl:value-of select="div[1]/@codeLanguage" /> - <xsl:text>'); - </xsl:text> - <xsl:if test="$languages != 'false'"> - languageFilter.registerTabbedArea('curvedSyntaxTabs', 'syntaxTabs', 'syntaxBlocks'); - </xsl:if> - </script> </xsl:template> <xsl:template name="languageSyntaxBlock"> @@ -908,6 +886,7 @@ <include item="typesTitle" /> </xsl:with-param> <xsl:with-param name="content"> + <div id="typeSection"> <table class="filter" cellspacing="0" cellpadding="0"> <tr id="curvedTypeTabs"> <td class="leftTab" value="all"> </td> @@ -941,13 +920,13 @@ </tr> <tr class="tabs" id="typeFilter"> <td class="leftGrad" value="all"> </td> - <td class="tab" value="all" onclick="toggleClass('typeFilter','value','all','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','all');tf.subgroup='all'; process('typeList',getInstanceDelegate(tf,'filterElement'));"> + <td class="tab" value="all" onclick="toggleClass('typeFilter','value','all','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','all');processSubgroup('all', 'type'); process('typeList','filterElement','type');"> <include item="allTypesFilterLabel" /> </td> <td class="rightGrad" value="all"> </td> <xsl:if test="element/apidata[@subgroup='class']"> <td class="leftGrad" value="class"> </td> - <td class="tab" value="class" onclick="toggleClass('typeFilter','value','class','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','class'); tf.subgroup='class'; process('typeList',getInstanceDelegate(tf,'filterElement'));"> + <td class="tab" value="class" onclick="toggleClass('typeFilter','value','class','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','class'); processSubgroup('class', 'type'); process('typeList','filterElement','type');"> <include item="classTypesFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -961,7 +940,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='structure']"> <td class="leftGrad" value="structure"> </td> - <td class="tab" value="structure" onclick="toggleClass('typeFilter','value','structure','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','structure'); tf.subgroup='structure'; process('typeList',getInstanceDelegate(tf,'filterElement'));"> + <td class="tab" value="structure" onclick="toggleClass('typeFilter','value','structure','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','structure'); processSubgroup('structure', 'type'); process('typeList','filterElement','type');"> <include item="structureTypesFilterLabel" /> <img> <includeAttribute name="src" item="iconPath"> @@ -974,7 +953,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='interface']"> <td class="leftGrad" value="interface"> </td> - <td class="tab" value="interface" onclick="toggleClass('typeFilter','value','interface','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','interface'); tf.subgroup='interface'; process('typeList',getInstanceDelegate(tf,'filterElement'));"> + <td class="tab" value="interface" onclick="toggleClass('typeFilter','value','interface','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','interface'); processSubgroup('interface','type'); process('typeList','filterElement','type');"> <include item="interfaceTypesFilterLabel" /> <img> <includeAttribute name="src" item="iconPath"> @@ -987,7 +966,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='enumeration']"> <td class="leftGrad" value="enumeration"> </td> - <td class="tab" value="enumeration" onclick="toggleClass('typeFilter','value','enumeration','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','enumeration'); tf.subgroup='enumeration'; process('typeList',getInstanceDelegate(tf,'filterElement'));"> + <td class="tab" value="enumeration" onclick="toggleClass('typeFilter','value','enumeration','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','enumeration'); processSubgroup('enumeration','type'); process('typeList','filterElement','type');"> <include item="enumerationTypesFilterLabel" /> <img> <includeAttribute name="src" item="iconPath"> @@ -1000,7 +979,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='delegate']"> <td class="leftGrad" value="delegate"> </td> - <td class="tab" value="delegate" onclick="toggleClass('typeFilter','value','delegate','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','delegate'); tf.subgroup='delegate'; process('typeList',getInstanceDelegate(tf,'filterElement'));"> + <td class="tab" value="delegate" onclick="toggleClass('typeFilter','value','delegate','activeTab','tab'); curvedToggleClass('curvedTypeTabs','value','delegate'); processSubgroup('delegate','type'); process('typeList','filterElement','type');"> <include item="delegateTypesFilterLabel" /> <img> <includeAttribute name="src" item="iconPath"> @@ -1031,13 +1010,7 @@ </xsl:apply-templates> </table> </div> - <script type="text/javascript"> - <xsl:text> - var tf = new TypeFilter(); - toggleClass('typeFilter','value','all','activeTab','tab'); - curvedToggleClass('curvedTypeTabs','value','all'); - </xsl:text> - </script> + </div> </xsl:with-param> </xsl:call-template> @@ -1135,7 +1108,7 @@ <table class="memberOptions"> <tr> <td class="line"> - <div id="public" onclick="var checked=toggleCheck(publicImage); mf['public']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="public" onclick="var checked=toggleCheck(publicImage); toggleCheckState('public',checked); process('memberList','filterElement','member');"> <img id="publicImage" onmouseover="mouseOverCheck(publicImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(publicImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1145,7 +1118,7 @@ <include item="publicMembersFilterLabel" /> </div> <br /> - <div id="protected" onclick="var checked=toggleCheck(protectedImage); mf['protected']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="protected" onclick="var checked=toggleCheck(protectedImage); toggleCheckState('protected',checked); process('memberList','filterElement','member');"> <img id="protectedImage" onmouseover="mouseOverCheck(protectedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(protectedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1156,7 +1129,7 @@ </div> </td> <td class="line"> - <div id="instance" onclick="var checked=toggleCheck(instanceImage); mf['instance']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="instance" onclick="var checked=toggleCheck(instanceImage); toggleCheckState('instance',checked); process('memberList','filterElement','member');"> <img id="instanceImage" onmouseover="mouseOverCheck(instanceImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(instanceImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1166,7 +1139,7 @@ <include item="instanceMembersFilterLabel" /> </div> <br /> - <div id="static" onclick="var checked=toggleCheck(staticImage); mf['static']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="static" onclick="var checked=toggleCheck(staticImage); toggleCheckState('static',checked); process('memberList','filterElement','member');"> <img id="staticImage" onmouseover="mouseOverCheck(staticImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(staticImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1177,7 +1150,7 @@ </div> </td> <td class="line"> - <div id="declared" onclick="var checked=toggleCheck(declaredImage); mf['declared']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="declared" onclick="var checked=toggleCheck(declaredImage); toggleCheckState('declared',checked); process('memberList','filterElement','member');"> <img id="declaredImage" onmouseover="mouseOverCheck(declaredImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(declaredImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1187,7 +1160,7 @@ <include item="declaredMembersFilterLabel" /> </div> <br /> - <div id="inherited" onclick="var checked=toggleCheck(inheritedImage); mf['inherited']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="inherited" onclick="var checked=toggleCheck(inheritedImage); toggleCheckState('inherited',checked); process('memberList','filterElement','member');"> <img id="inheritedImage" onmouseover="mouseOverCheck(inheritedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(inheritedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1198,7 +1171,7 @@ </div> </td> <td class="line"> - <div id="xna" onclick="var checked=toggleCheck(xnaImage); mf['xna']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="xna" onclick="var checked=toggleCheck(xnaImage); toggleCheckState('xna',checked); process('memberList','filterElement','member');"> <img id="xnaImage" onmouseover="mouseOverCheck(xnaImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(xnaImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1208,7 +1181,7 @@ <include item="XNAFilterLabel" /> </div> <br/> - <div id="compact" onclick="var checked=toggleCheck(compactImage); mf['compact']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="compact" onclick="var checked=toggleCheck(compactImage); toggleCheckState('compact',checked); process('memberList','filterElement','member');"> <img id="compactImage" onmouseover="mouseOverCheck(compactImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(compactImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1240,11 +1213,6 @@ </xsl:apply-templates> </table> </div> - <script type="text/javascript"> - <xsl:text> - var mf = new MemberFilter(); - </xsl:text> - </script> </xsl:with-param> </xsl:call-template> </xsl:if> @@ -1351,6 +1319,7 @@ <include item="allMembersTitle" /> </xsl:with-param> <xsl:with-param name="content"> + <div id="allMemberSection"> <table class="filter" cellspacing="0" cellpadding="0"> <tr id="curvedMemberTabs"> <td class="leftTab" value="all"> </td> @@ -1399,13 +1368,13 @@ </tr> <tr class="tabs" id="memberTabs"> <td class="leftGrad" value="all"> </td> - <td class="tab" value="all" onclick="toggleClass('memberTabs','value','all','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'all'); mf.subgroup='all'; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="all" onclick="toggleClass('memberTabs','value','all','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'all'); processSubgroup('all','member'); process('memberList','filterElement','member');"> <include item="allMembersFilterLabel" /> </td> <td class="rightGrad" value="all"> </td> <xsl:if test="element/apidata[@subgroup='constructor']"> <td class="leftGrad" value="constructor"> </td> - <td class="tab" value="constructor" onclick="toggleClass('memberTabs','value','constructor','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'constructor'); mf.subgroup='constructor'; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="constructor" onclick="toggleClass('memberTabs','value','constructor','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'constructor'); processSubgroup('constructor','member'); process('memberList','filterElement','member');"> <include item="constructorMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1419,7 +1388,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='field']"> <td class="leftGrad" value="field"> </td> - <td class="tab" value="field" onclick="toggleClass('memberTabs','value','field','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'field'); mf.subgroup='field'; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="field" onclick="toggleClass('memberTabs','value','field','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'field'); processSubgroup('field','member'); process('memberList','filterElement','member');"> <include item="fieldMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1433,7 +1402,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='property' and not(@subsubgroup)]"> <td class="leftGrad" value="property"> </td> - <td class="tab" value="property" onclick="toggleClass('memberTabs','value','property','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'property'); mf.subgroup='property'; process('memberList', getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="property" onclick="toggleClass('memberTabs','value','property','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'property'); processSubgroup('property','member'); process('memberList','filterElement','member');"> <include item="propertyMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1447,7 +1416,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='method']"> <td class="leftGrad" value="method"> </td> - <td class="tab" value="method" onclick="toggleClass('memberTabs','value','method','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'method'); mf.subgroup='method'; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="method" onclick="toggleClass('memberTabs','value','method','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'method'); processSubgroup('method','member'); process('memberList','filterElement','member');"> <include item="methodMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1461,7 +1430,7 @@ </xsl:if> <xsl:if test="element/apidata[@subgroup='event' and not(@subsubgroup)]"> <td class="leftGrad" value="event"> </td> - <td class="tab" value="event" onclick="toggleClass('memberTabs','value','event','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'event'); mf.subgroup='event'; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="event" onclick="toggleClass('memberTabs','value','event','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'event'); processSubgroup('event','member'); process('memberList','filterElement','member');"> <include item="eventMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1475,7 +1444,7 @@ </xsl:if> <xsl:if test="element/apidata[@subsubgroup='attachedProperty']"> <td class="leftGrad" value="attachedProperty"> </td> - <td class="tab" value="attachedProperty" onclick="toggleClass('memberTabs','value','attachedProperty','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'attachedProperty'); mf.subgroup='attachedProperty'; process('memberList', getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="attachedProperty" onclick="toggleClass('memberTabs','value','attachedProperty','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'attachedProperty'); processSubgroup('attachedProperty','member'); process('memberList','filterElement','member');"> <include item="attachedPropertyMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1489,7 +1458,7 @@ </xsl:if> <xsl:if test="element/apidata[@subsubgroup='attachedEvent']"> <td class="leftGrad" value="attachedEvent"> </td> - <td class="tab" value="attachedEvent" onclick="toggleClass('memberTabs','value','attachedEvent','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'attachedEvent'); mf.subgroup='attachedEvent'; process('memberList', getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="attachedEvent" onclick="toggleClass('memberTabs','value','attachedEvent','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'attachedEvent'); processSubgroup('attachedEvent','member'); process('memberList', 'filterElement', 'member');"> <include item="attachedEventMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1503,7 +1472,7 @@ </xsl:if> <xsl:if test="element[memberdata[@visibility='private'] and proceduredata[@virtual = 'true']]"> <td class="leftGrad" value="explicit"> </td> - <td class="tab" value="explicit" onclick="toggleClass('memberTabs','value','explicit','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'explicit'); mf.subgroup='explicit'; process('memberList', getInstanceDelegate(mf,'filterElement'));"> + <td class="tab" value="explicit" onclick="toggleClass('memberTabs','value','explicit','activeTab','tab'); curvedToggleClass('curvedMemberTabs', 'value', 'explicit'); processSubgroup('explicit','member'); process('memberList', 'filterElement', 'member');"> <include item="explicitInterfaceMembersFilterLabel" /> <xsl:text> </xsl:text> <img> @@ -1521,7 +1490,7 @@ <table class="memberOptions"> <tr> <td class="line"> - <div id="public" onclick="var checked=toggleCheck(publicImage); mf['public']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="public" onclick="var checked=toggleCheck(publicImage); toggleCheckState('public',checked); process('memberList','filterElement','member');"> <img id="publicImage" onmouseover="mouseOverCheck(publicImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(publicImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1531,7 +1500,7 @@ <include item="publicMembersFilterLabel" /> </div> <br /> - <div id="protected" onclick="var checked=toggleCheck(protectedImage); mf['protected']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="protected" onclick="var checked=toggleCheck(protectedImage); toggleCheckState('protected',checked); process('memberList','filterElement','member');"> <img id="protectedImage" onmouseover="mouseOverCheck(protectedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(protectedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1542,7 +1511,7 @@ </div> </td> <td class="line"> - <div id="instance" onclick="var checked=toggleCheck(instanceImage); mf['instance']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="instance" onclick="var checked=toggleCheck(instanceImage); toggleCheckState('instance',checked); process('memberList','filterElement','member');"> <img id="instanceImage" onmouseover="mouseOverCheck(instanceImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(instanceImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1552,7 +1521,7 @@ <include item="instanceMembersFilterLabel" /> </div> <br /> - <div id="static" onclick="var checked=toggleCheck(staticImage); mf['static']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="static" onclick="var checked=toggleCheck(staticImage); toggleCheckState('static',checked); process('memberList','filterElement','member');"> <img id="staticImage" onmouseover="mouseOverCheck(staticImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(staticImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1570,7 +1539,7 @@ </div> </td> <td class="line"> - <div id="declared" onclick="var checked=toggleCheck(declaredImage); mf['declared']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="declared" onclick="var checked=toggleCheck(declaredImage); toggleCheckState('declared',checked); process('memberList','filterElement','member');"> <img id="declaredImage" onmouseover="mouseOverCheck(declaredImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(declaredImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1580,7 +1549,7 @@ <include item="declaredMembersFilterLabel" /> </div> <br /> - <div id="inherited" onclick="var checked=toggleCheck(inheritedImage); mf['inherited']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="inherited" onclick="var checked=toggleCheck(inheritedImage); toggleCheckState('inherited',checked); process('memberList','filterElement','member');"> <img id="inheritedImage" onmouseover="mouseOverCheck(inheritedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(inheritedImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1591,7 +1560,7 @@ </div> </td> <td class="line"> - <div id="xna" onclick="var checked=toggleCheck(xnaImage); mf['xna']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="xna" onclick="var checked=toggleCheck(xnaImage); toggleCheckState('xna',checked); process('memberList','filterElement','member');"> <img id="xnaImage" onmouseover="mouseOverCheck(xnaImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(xnaImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1608,7 +1577,7 @@ </img> </div> <br/> - <div id="compact" onclick="var checked=toggleCheck(compactImage); mf['compact']=checked; process('memberList',getInstanceDelegate(mf,'filterElement'));"> + <div id="compact" onclick="var checked=toggleCheck(compactImage); toggleCheckState('compact',checked); process('memberList','filterElement','member');"> <img id="compactImage" onmouseover="mouseOverCheck(compactImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)" onmouseout="mouseOutCheck(compactImage,checkBoxSelectImage,checkBoxUnSelectImage,checkBoxSelectHoverImage,checkBoxUnSelectHoverImage)"> <includeAttribute name="src" item="iconPath"> <parameter>ch_selected.gif</parameter> @@ -1648,13 +1617,7 @@ </xsl:apply-templates> </table> </div> - <script type="text/javascript"> - <xsl:text> - var mf = new MemberFilter(); - toggleClass('memberTabs','value','all','activeTab','tab'); - curvedToggleClass('curvedMemberTabs', 'value', 'all'); - </xsl:text> - </script> + </div> </xsl:with-param> </xsl:call-template> </xsl:if> @@ -2056,7 +2019,7 @@ <xsl:param name="library" select="/document/reference/containers/library"/> <include item="assemblyNameAndModule"> <parameter> - <span data="assembly"> + <span sdata="assembly"> <xsl:value-of select="$library/@assembly"/> </span> </parameter> @@ -2196,7 +2159,8 @@ <xsl:variable name="childCount" select="count(descendents/*)" /> <xsl:for-each select="ancestors/type"> - <xsl:sort select="position()" data-type="number" order="descending" /> + <xsl:sort select="position()" data-type="number" order="descending" /> + <!--<xsl:sort select="@api"/> --> <xsl:call-template name="indent"> <xsl:with-param name="count" select="position()" /> @@ -2237,6 +2201,7 @@ <xsl:otherwise> <xsl:for-each select="descendents/type"> + <xsl:sort select="@api"/> <xsl:call-template name="indent"> <xsl:with-param name="count" select="$ancestorCount + 2" /> </xsl:call-template> diff --git a/tools/Sandcastle/Presentation/vs2005/Content/conceptual_content.xml b/tools/Sandcastle/Presentation/vs2005/Content/conceptual_content.xml index 9063b63..50aef54 100644 --- a/tools/Sandcastle/Presentation/vs2005/Content/conceptual_content.xml +++ b/tools/Sandcastle/Presentation/vs2005/Content/conceptual_content.xml @@ -53,5 +53,9 @@ <p>This section contains the following subsections.</p> </item> <item id="RelatedTopicsLinkText">Related Topics</item> + <!-- resolve the autoOutline token --> + <item id="autoOutline"> + <autoOutline/> + </item> </content> diff --git a/tools/Sandcastle/Presentation/vs2005/Content/feedBack_content.xml b/tools/Sandcastle/Presentation/vs2005/Content/feedBack_content.xml index 6d3a068..748df9f 100644 --- a/tools/Sandcastle/Presentation/vs2005/Content/feedBack_content.xml +++ b/tools/Sandcastle/Presentation/vs2005/Content/feedBack_content.xml @@ -1,10 +1,11 @@ <content xml:space="preserve"> - <item id="fb_alias">DotNetOpenId@googlegroups.com</item> + <item id="fb_alias">DevDocs@Microsoft.com</item> <item id="fb_product"></item> <item id="fb_deliverable"></item> - <item id="fb_body"></item> + <item id="fb_subject">Customer%20Feedback</item> + <item id="fb_body">%0\dThank%20you%20for%20your%20feedback.%20The%20developer%20writing%20teams%20use%20your%20feedback%20to%20improve%20documentation.%20While%20we%20are%20reviewing%20your%20feedback,%20we%20may%20send%20you%20e-mail%20to%20ask%20for%20clarification%20or%20feedback%20on%20a%20solution.%20We%20do%20not%20use%20your%20e-mail%20address%20for%20any%20other%20purpose%20and%20we%20delete%20it%20after%20we%20finish%20our%20review.%0\AFor%20further%20information%20about%20the%20privacy%20policies%20of%20Microsoft,%20please%20see%20http://privacy.microsoft.com/en-us/default.aspx.%0\A%0\d</item> <item id="fb_headerFeedBack">Send Feedback</item> @@ -17,6 +18,7 @@ <item id="feedback_fileVersion"></item> <item id="feedback_topicVersion"></item> <item id="feedback_body"></item> + <item id="feedback_subject"></item> <item id="fb_Introduction">We value your feedback. To rate this topic and send feedback about this topic to the documentation team, click a rating, and then click <b>Send Feedback</b>. For assistance with support issues, refer to the technical support information included with the product.</item> @@ -27,4 +29,4 @@ <item id="fb_Title">Documentation Feedback</item> <item id="fb_altIcon">Display feedback instructions at the bottom of the page.</item> -</content> +</content>
\ No newline at end of file diff --git a/tools/Sandcastle/Presentation/vs2005/Content/reference_content.xml b/tools/Sandcastle/Presentation/vs2005/Content/reference_content.xml index 970abb0..4cb633c 100644 --- a/tools/Sandcastle/Presentation/vs2005/Content/reference_content.xml +++ b/tools/Sandcastle/Presentation/vs2005/Content/reference_content.xml @@ -238,7 +238,7 @@ </item> <!-- inserted boilerplate --> - <item id="runningHeaderText">DotNetOpenAuth Class Library</item> + <item id="runningHeaderText">.NET Framework Class Library</item> <item id="rootLink"><referenceLink target="R:Project">Namespaces</referenceLink></item> <item id="obsoleteShort"><span class="obsolete">Obsolete.</span></item> <item id="obsoleteLong"><span class="obsolete">This API is obsolete.</span></item> @@ -432,6 +432,11 @@ <!-- Non Cls Compliant boilerplate text--> <item id="NotClsCompliant">This API is not CLS-compliant.</item> <item id="AltClsCompliant">The CLS-compliant alternative is {0}.</item> + + <!-- Security Critical Boilerplate text--> + <item id="typeSecurityCriticalBoilerplate">This type has a SecurityCriticalAttribute attribute, which restricts it to internal use by the .NET Framework for Silverlight class library. Application code that uses any member of this type throws a MethodAccessException.</item> + <item id="memberSecurityCriticalBoilerplate">This member has a SecurityCriticalAttribute attribute, which restricts it to internal use by the .NET Framework for Silverlight class library. Application code that uses this member throws a MethodAccessException.</item> + <item id="securityCritical">[SECURITY CRITICAL] </item> <!-- platform names that appear in the Platforms section on mref type and member pages The id values must be in sync with the platform/@name values used in the manifold platformFilters.xml filter files. diff --git a/tools/Sandcastle/Presentation/vs2005/Content/shared_content.xml b/tools/Sandcastle/Presentation/vs2005/Content/shared_content.xml index f4a3d99..b4d9313 100644 --- a/tools/Sandcastle/Presentation/vs2005/Content/shared_content.xml +++ b/tools/Sandcastle/Presentation/vs2005/Content/shared_content.xml @@ -19,6 +19,9 @@ <!-- header --> <item id="header"><font color="DarkGray"></font><p/> </item> + <!-- freshness date --> + <item id="UpdateTitle"><font color="DarkGray">Updated: {0}</font></item> + <!-- topic title --> <item id="nsrTitle">{0}</item> @@ -50,6 +53,8 @@ <item id="ManagedCPlusPlusLabel">Visual C++</item> <item id="JSharpLabel">J#</item> <item id="JScriptLabel">JScript</item> + <item id="JavaScriptLabel">JavaScript</item> + <item id="XAMLLabel">XAML</item> <!-- section titles --> <item id="exceptionsTitle">Exceptions</item> @@ -181,7 +186,7 @@ </includeAttribute> feedback </a> - on this topic to the DotNetOpenAuth group. + on this topic to Microsoft. </span> </item> @@ -196,7 +201,7 @@ </a> </span> </item> -<item id="MailToLink">javascript:SubmitFeedback('<include item="fb_alias" />','<include item="fb_product" />','<include item="fb_deliverable" />','{0}','{1}','<include item="fb_body" />');</item> +<item id="MailToLink">javascript:SubmitFeedback('<include item="fb_alias" />','<include item="fb_product" />','<include item="fb_deliverable" />','{0}','{1}','<include item="fb_body" />','<include item="fb_subject" />');</item> <!-- 5 star rating feedback control in sandcastle scenario--> <!-- @@ -235,7 +240,7 @@ </span> </item> -<item id="MailToLink">javascript:SubmitFeedback('<include item="feedback_alias" />','<include item="feedback_product" />','<include item="feedback_deliverable" />','<include item="feedback_fileVersion" />','<include item="feedback_topicVersion" />','<include item="feedback_body" />');</item> +<item id="MailToLink">javascript:SubmitFeedback('<include item="feedback_alias" />','<include item="feedback_product" />','<include item="feedback_deliverable" />','<include item="feedback_fileVersion" />','<include item="feedback_topicVersion" />','<include item="feedback_body" />','<include item="feedback_subject" />');</item> --> <item id="copyrightStatement"><include item="copyrightText"/></item> diff --git a/tools/Sandcastle/Presentation/vs2005/Scripts/script_feedBack.js b/tools/Sandcastle/Presentation/vs2005/Scripts/script_feedBack.js index 4f79de1..55ee44a 100644 --- a/tools/Sandcastle/Presentation/vs2005/Scripts/script_feedBack.js +++ b/tools/Sandcastle/Presentation/vs2005/Scripts/script_feedBack.js @@ -82,9 +82,9 @@ function GetRating() return sRating; } -function SubmitFeedback(alias, product, deliverable, productVersion, documentationVersion, defaultBody) +function SubmitFeedback(alias, product, deliverable, productVersion, documentationVersion, defaultBody, defaultSubject) { - var subject = title + var subject = defaultSubject + " (" + "/1:" + product diff --git a/tools/Sandcastle/Presentation/vs2005/Styles/Presentation.css b/tools/Sandcastle/Presentation/vs2005/Styles/Presentation.css index 8c7e864..095b84d 100644 --- a/tools/Sandcastle/Presentation/vs2005/Styles/Presentation.css +++ b/tools/Sandcastle/Presentation/vs2005/Styles/Presentation.css @@ -148,7 +148,7 @@ span.selflink { } span.nolink { - + font-weight: bold; } /*********************************************************** @@ -233,7 +233,7 @@ div#header table tr#headerTableRow3 td /* Applies to the lower table in the non-scrolling header region. Text in this table includes Collapse All/Expand All, Language Filter, and Members Options. */ -div#header table#topTable +div#header table#bottomTable { border-top-color: #FFFFFF; border-top-style: solid; diff --git a/tools/Sandcastle/Presentation/vs2005/configuration/conceptual.config b/tools/Sandcastle/Presentation/vs2005/configuration/conceptual.config index 5458268..207d557 100644 --- a/tools/Sandcastle/Presentation/vs2005/configuration/conceptual.config +++ b/tools/Sandcastle/Presentation/vs2005/configuration/conceptual.config @@ -56,22 +56,39 @@ <colors language="VisualBasic"> <color pattern="^\s*'[^\r\n]*" class="comment" /> <color pattern="\"[^"\r\n]*\"" class="literal" /> - <color pattern="\b((AddHandler)|(AddressOf)|(As)|(Boolean)|(ByRef)|(ByVal)|(Case)|(Catch)|(Char)|(Class)|(Const)|(Continue)|(Delegate)|(Dim)|(Double)|(Each)|(Else)|(ElseIf)|(End)|(Enum)|(Event)|(Exit)|(False)|(Finally)|(For)|(Friend)|(From)|(Function)|(Get)|(Handles)|(If)|(Implements)|(Imports)|(In)|(Inherits)|(Integer)|(Interface)|(Is)|(Let)|(Loop)|(Me)|(Module)|(MustInherit)|(MustOverride)|(MyBase)|(Namespace)|(New)|(Next)|(Nothing)|(NotInheritable)|(NotOverrideable)|(Of)|(Overloads)|(Overridable)|(Overrides)|(ParamArray)|(Partial)|(Private)|(Property)|(Protected)|(Public)|(RaiseEvent)|(ReadOnly)|(RemoveHandler)|(Return)|(Select)|(Set)|(Shadows)|(Shared)|(Static)|(Step)|(String)|(Structure)|(Sub)|(Then)|(Throw)|(To)|(True)|(Try)|(Until)|(Using)|(When)|(Where)|(While)|(With)|(WriteOnly))\b" class="keyword" /> + <color pattern="\b((AddHandler)|(AddressOf)|(Alias)|(And)|(AndAlso)|(As)|(Boolean)|(ByRef)|(Byte)|(ByVal)|(Call)|(Case)|(Catch)|(CBool)|(CByte)|(CChar)|(CDate)|(CDec)|(CDbl)|(Char)|(CInt)|(Class)|(CLng)|(CObj)|(Const)|(Continue)|(CSByte)|(CShort)|(CSng)|(CStr)|(CType)|(CUInt)|(CULng)|(CUShort)|(Date)|(Decimal)|(Declare)|(Default)|(Delegate)|(Dim)|(DirectCast)|(Do)|(Double)|(Each)|(Else)|(ElseIf)|(End)|(EndIf)|(Enum)|(Erase)|(Error)|(Event)|(Exit)|(False)|(Finally)|(For)|(Friend)|(From)|(Function)|(Get)|(GetType)|(GetXMLNamespace)|(Global)|(GoSub)|(GoTo)|(Handles)|(If)|(Implements)|(Imports)|(In)|(Inherits)|(Integer)|(Interface)|(Is)|(IsNot)|(Let)|(Lib)|(Like)|(Long)|(Loop)|(Me)|(Mod)|(Module)|(MustInherit)|(MustOverride)|(MyBase)|(MyClass)|(Namespace)|(Narrowing)|(New)|(Next)|(Not)|(Nothing)|(NotInheritable)|(NotOverridable)|(Object)|(Of)|(On)|(Operator)|(Option)|(Optional)|(Or)|(OrElse)|(Overloads)|(Overridable)|(Overrides)|(ParamArray)|(Partial)|(Private)|(Property)|(Protected)|(Public)|(RaiseEvent)|(ReadOnly)|(ReDim)|(REM)|(RemoveHandler)|(Resume)|(Return)|(SByte)|(Select)|(Set)|(Shadows)|(Shared)|(Short)|(Single)|(Static)|(Step)|(Stop)|(String)|(Structure)|(Sub)|(SyncLock)|(Then)|(Throw)|(To)|(True)|(Try)|(TryCast)|(TypeOf)|(Variant)|(Wend)|(UInteger)|(ULong)|(UShort)|(Until)|(Using)|(When)|(Where)|(While)|(Widening)|(With)|(WithEvents)|(WriteOnly)|(Xor)|(#Const)|(#Else)|(#ElseIf)|(#End)|(#If))\b" class="keyword" /> </colors> <colors language="CSharp"> <color pattern="/\*(.|\n)+?\*/" class="comment" /> - <color pattern="//[^\r\n]*" class="comment" /> - <color pattern="\"[^"\r\n]*\"" class="literal" /> - <color pattern="\b((abstract)|(as)|(ascending)|(base)|(bool)|(break)|(by)|(case)|(catch)|(char)|(class)|(const)|(continue)|(default)|(delegate)|(descending)|(do)|(double)|(else)|(enum)|(equals)|(event)|(extern)|(false)|(finally)|(float)|(for)|(foreach)|(from)|(get)|(group)|(if)|(in)|(int)|(interface)|(internal)|(into)|(is)|(join)|(let)|(namespace)|(new)|(null)|(on)|(orderby)|(out)|(override)|(params)|(private)|(protected)|(public)|(readonly)|(ref)|(return)|(sealed)|(select)|(set)|(static)|(struct)|(switch)|(this)|(throw)|(true)|(try)|(typeof)|(using)|(virtual)|(volatile)|(void)|(where)|(while))\b" class="keyword" /> + <color pattern="\"[^"\r\n]*\"" class="literal" /> + <color pattern="//[^\r\n]*" class="comment" /> + <color pattern="\b((abstract)|(as)|(ascending)|(base)|(bool)|(break)|(by)|(byte)|(case)|(catch)|(char)|(checked)|(class)|(const)|(continue)|(decimal)|(default)|(delegate)|(descending)|(do)|(double)|(else)|(enum)|(equals)|(event)|(explicit)|(extern)|(false)|(finally)|(fixed)|(float)|(for)|(foreach)|(from)|(get)|(goto)|(group)|(if)|(implicit)|(in)|(int)|(interface)|(internal)|(into)|(is)|(join)|(let)|(lock)|(long)|(namespace)|(new)|(null)|(object)|(operator)|(on)|(orderby)|(out)|(override)|(params)|(partial)|(private)|(protected)|(public)|(readonly)|(ref)|(return)|(sbyte)|(sealed)|(select)|(set)|(short)|(sizeof)|(stackalloc)|(static)|(string)|(struct)|(switch)|(this)|(throw)|(true)|(try)|(typeof)|(uint)|(ulong)|(unchecked)|(unsafe)|(ushort)|(using)|(value)|(var)|(vield)|(virtual)|(volatile)|(void)|(where)|(while))\b" class="keyword" /> </colors> <colors language="ManagedCPlusPlus"> <color pattern="/\*(.|\n)+?\*/" class="comment" /> - <color pattern="//[^\r\n]*" class="comment" /> - <color pattern="\"[^"\r\n]*\"" class="literal" /> - <color pattern="\b((abstract)|(array)|(bool)|(break)|(case)|(catch)|(char)|(class)|(const)|(continue)|(delegate)|(delete)|(do)|(double)|(else)|(enum)|(event)|(extern)|(false)|(finally)|(float)|(for)|(friend)|(gcnew)|(generic)|(goto)|(if)|(initonly)|(inline)|(int)|(interface)|(literal)|(namespace)|(new)|(noinline)|(nullptr)|(operator)|(private)|(property)|(protected)|(public)|(ref)|(register)|(return)|(sealed)|(sizeof)|(static)|(struct)|(switch)|(template)|(this)|(throw)|(true)|(try)|(typedef)|(union)|(using)|(value)|(virtual)|(void)|(volatile)|(while))\b" class="keyword" /> + <color pattern="\"[^"\r\n]*\"" class="literal" /> + <color pattern="//[^\r\n]*" class="comment" /> + <color pattern="\b((abstract)|(array)|(bool)|(break)|(case)|(catch)|(char)|(class)|(const)|(continue)|(default)|(delegate)|(delete)|(deprecated)|(dllexport)|(dllimport)|(do)|(double)|(else)|(enum)|(event)|(explicit)|(extern)|(false)|(finally)|(float)|(for)|(friend)|(gcnew)|(generic)|(goto)|(if)|(initonly)|(inline)|(int)|(interface)|(literal)|(long)|(mutable)|(naked)|(namespace)|(new)|(noinline)|(noreturn)|(nothrow)|(novtable)|(nullptr)|(operator)|(private)|(property)|(protected)|(public)|(ref)|(register)|(return)|(safecast)|(sealed)|(selectany)|(short)|(signed)|(sizeof)|(static)|(struct)|(switch)|(template)|(this)|(thread)|(throw)|(true)|(try)|(typedef)|(typeid)|(typename)|(union)|(unsigned)|(using)|(uuid)|(value)|(virtual)|(void)|(volatile)|(while))\b" class="keyword" /> </colors> </component> + <!-- Copy in topicTypes --> + <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <context prefix="ddue" name="http://ddue.schemas.microsoft.com/authoring/2003/5" /> + <context prefix="xlink" name="http://www.w3.org/1999/xlink" /> + <variable expression="/document/topic/*/ddue:relatedTopics/*/@xlink:href" /> + <components> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <context prefix="ddue" name="http://ddue.schemas.microsoft.com/authoring/2003/5" /> + <context prefix="xlink" name="http://www.w3.org/1999/xlink" /> + <index name="topicType" value="/metadata/topic" key="@id"> + <data base="%DXROOT%\Data\ContentMetadata" recurse="true" files="*.contentmetadata.xml" /> + </index> + <copy name="topicType" source="topicType" target="/document/topic/*/ddue:relatedTopics/*[@xlink:href='{0}' and not(@topicType_id)]" attribute="true" ignoreCase="true" missing-target="error" /> + </component> + </components> + </component> + <!-- transform --> <component type="Microsoft.Ddue.Tools.TransformComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> <transform file="%DXROOT%\Presentation\Vs2005\transforms\main_conceptual.xsl"> @@ -83,12 +100,13 @@ <language label="JSharp" name="JSharp" style="cs" /> <language label="JScript" name="JScript" style="cs" /> </argument> + <argument key="RTMReleaseDate" value="June 2007" /> </transform> </component> <!-- resolve art links --> <component type="Microsoft.Ddue.Tools.ResolveArtLinksComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <targets input="%DXROOT%\Data\ArtStore" output=".\Output\media" link="../media" map="%DXROOT%\Data\ArtSharedContent.loc.xml" /> + <targets input="%DXROOT%\Data\ArtStore" baseOutput=".\Output" outputPath="media" link="../media" map="%DXROOT%\Data\ArtSharedContent.loc.xml" /> </component> <!-- resolve shared content --> @@ -111,11 +129,11 @@ <!-- save the result --> <component type="Microsoft.Ddue.Tools.SaveComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <save base=".\Output\html" path="concat($key,'.htm')" indent="true" omit-xml-declaration="true" /> + <save base=".\Output\html" path="concat($key,'.htm')" link="../html" indent="true" omit-xml-declaration="true" /> </component> <!-- record file creation events --> - <component type="Microsoft.Ddue.Tools.HxfGeneratorComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll" input="%DXROOT%\Presentation\vs2005\seed.HxF" output=".\Output\test.HxF" /> + <component type="Microsoft.Ddue.Tools.HxfGeneratorComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll" input="%DXROOT%\Presentation\vs2005\seed.HxF" output="test.HxF" /> </components> </builder> diff --git a/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-scbuild.config b/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-scbuild.config index 237a27e..3806422 100644 --- a/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-scbuild.config +++ b/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-scbuild.config @@ -73,6 +73,12 @@ <data base="%DxTempDir%\Comments\" recurse="false" files="*.xml" /> </index> <copy name="comments" source="*" target="/document/comments" /> + <components> + <!-- copy comments for inheritdoc --> + <component type="Microsoft.Ddue.Tools.InheritDocumentationComponent" assembly="%DXROOT%\ProductionTools\CopyComponents.dll"> + <copy name="comments" use="reflection"/> + </component> + </components> </component> <!-- Copy in reflection data and comments for members --> @@ -88,7 +94,13 @@ </then> </component> <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="comments" source="summary|overloads" target="/document/reference/elements//element[@api=$key]" /> + <copy name="comments" source="summary|overloads|inheritdoc" target="/document/reference/elements//element[@api=$key]" /> + <components> + <!-- copy comments for inheritdoc --> + <component type="Microsoft.Ddue.Tools.InheritDocumentationComponent" assembly="%DXROOT%\ProductionTools\CopyComponents.dll"> + <copy name="comments" use="reflection"/> + </component> + </components> </component> </components> </component> @@ -108,7 +120,7 @@ <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cpp" /> <!--<language label="JSharp" name="JSharp" style="cs" /> <language label="JScript" name="JScript" style="cs" />--> - <language label="JavaScript" name="JavaScript" style="vb" /> + <language label="JavaScript" name="JavaScript" style="cs" /> </argument> </transform> </component> diff --git a/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-webref.config b/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-webref.config index e4b7612..9b278be 100644 --- a/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-webref.config +++ b/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle-webref.config @@ -73,6 +73,12 @@ <data base="%DxTempDir%\Comments\" recurse="false" files="*.xml" /> </index> <copy name="comments" source="*" target="/document/comments" /> + <components> + <!-- copy comments for inheritdoc --> + <component type="Microsoft.Ddue.Tools.InheritDocumentationComponent" assembly="%DXROOT%\ProductionTools\CopyComponents.dll"> + <copy name="comments" use="reflection"/> + </component> + </components> </component> <!-- Copy in reflection data and comments for members --> @@ -88,7 +94,13 @@ </then> </component> <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="comments" source="summary|overloads" target="/document/reference/elements//element[@api=$key]" /> + <copy name="comments" source="summary|overloads|inheritdoc" target="/document/reference/elements//element[@api=$key]" /> + <components> + <!-- copy comments for inheritdoc --> + <component type="Microsoft.Ddue.Tools.InheritDocumentationComponent" assembly="%DXROOT%\ProductionTools\CopyComponents.dll"> + <copy name="comments" use="reflection"/> + </component> + </components> </component> </components> </component> @@ -108,7 +120,7 @@ <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cpp" /> <!--<language label="JSharp" name="JSharp" style="cs" /> <language label="JScript" name="JScript" style="cs" />--> - <language label="JavaScript" name="JavaScript" style="vb" /> + <language label="JavaScript" name="JavaScript" style="cs" /> </argument> </transform> </component> diff --git a/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle.config b/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle.config index 8522fd9..b03ca00 100644 --- a/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle.config +++ b/tools/Sandcastle/Presentation/vs2005/configuration/sandcastle.config @@ -1,141 +1,153 @@ <configuration> - <dduetools> - <builder> - <components> + <dduetools> + <builder> + <components> - <!-- Create skeleton document --> - <component type="Microsoft.Ddue.Tools.CopyFromFileComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <data file="%DXROOT%\Presentation\vs2005\Transforms\skeleton.xml" /> - <copy source="/*" target="/" /> - </component> + <!-- Create skeleton document --> + <component type="Microsoft.Ddue.Tools.CopyFromFileComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <data file="%DXROOT%\Presentation\vs2005\Transforms\skeleton.xml" /> + <copy source="/*" target="/" /> + </component> - <!-- Copy in reflection data --> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <index name="reflection" value="/reflection/apis/api" key="@id" cache="10"> - <data base="%FxReflectionData%" recurse="true" files="*.xml" /> - <data files="%ReflectionXmlFile%" /> - </index> - <copy name="reflection" source="*" target="/document/reference" /> - </component> + <!-- Copy in reflection data --> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <index name="reflection" value="/reflection/apis/api" key="@id" cache="10"> + <data base="%DXROOT%\Data\Reflection" recurse="true" files="*.xml" /> + <data files=".\reflection.xml" /> + </index> + <copy name="reflection" source="*" target="/document/reference" /> + </component> - <!-- Copy in container data --> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="reflection" key="string(/document/reference/containers/namespace/@api)" source="*[not(local-name()='elements')]" target="/document/reference/containers/namespace" /> - </component> - <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <variable expression="/document/reference/containers//type/@api" /> - <components> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="reflection" source="apidata|typedata|templates|attributes" target="/document/reference/containers//type[@api=$key]" /> - </component> - </components> - </component> + <!-- Copy in container data --> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="reflection" key="string(/document/reference/containers/namespace/@api)" source="*[not(local-name()='elements')]" target="/document/reference/containers/namespace" /> + </component> + <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <variable expression="/document/reference/containers//type/@api" /> + <components> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="reflection" source="apidata|typedata|templates|attributes" target="/document/reference/containers//type[@api=$key]" /> + </component> + </components> + </component> - <!-- Copy in explicitInterfaceImplemented reflection data --> - <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <variable expression="/document/reference/implements/member/@api | /document/reference/implements//type/@api" /> - <components> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="reflection" source="apidata" target="/document/reference/implements//*[@api=$key and not(apidata)]" /> - <copy name="reflection" source="templates" target="/document/reference/implements//*[@api=$key and not(apidata) and not(specialization)]" /> - </component> - </components> - </component> + <!-- Copy in explicitInterfaceImplemented reflection data --> + <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <variable expression="/document/reference/implements/member/@api | /document/reference/implements//type/@api" /> + <components> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="reflection" source="apidata" target="/document/reference/implements//*[@api=$key and not(apidata)]" /> + <copy name="reflection" source="templates" target="/document/reference/implements//*[@api=$key and not(apidata) and not(specialization)]" /> + </component> + </components> + </component> - <!-- Copy in parameter data --> - <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <variable expression="/document/reference/parameters/parameter//type/@api" /> - <components> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="reflection" source="apidata" target="/document/reference/parameters/parameter//type[boolean(@api=$key) and not(apidata)]" /> - </component> - </components> - </component> + <!-- Copy in parameter data --> + <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <variable expression="/document/reference/parameters/parameter//type/@api" /> + <components> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="reflection" source="apidata" target="/document/reference/parameters/parameter//type[boolean(@api=$key) and not(apidata)]" /> + </component> + </components> + </component> - <!-- Generate syntax --> - <component type="Microsoft.Ddue.Tools.IfThenComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <if condition="not(starts-with($key,'Overload:') or starts-with($key,'R:'))" /> - <then> - <component type="Microsoft.Ddue.Tools.SyntaxComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <syntax input="/document/reference" output="/document/syntax" /> - <generators> - <generator type="Microsoft.Ddue.Tools.VisualBasicDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> - <generator type="Microsoft.Ddue.Tools.CSharpDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> - <generator type="Microsoft.Ddue.Tools.CPlusPlusDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> - <generator type="Microsoft.Ddue.Tools.ScriptSharpDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> - </generators> - </component> - </then> - </component> + <!-- Generate syntax --> + <component type="Microsoft.Ddue.Tools.IfThenComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <if condition="not(starts-with($key,'Overload:') or starts-with($key,'R:'))" /> + <then> + <component type="Microsoft.Ddue.Tools.SyntaxComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <syntax input="/document/reference" output="/document/syntax" /> + <generators> + <generator type="Microsoft.Ddue.Tools.VisualBasicDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> + <generator type="Microsoft.Ddue.Tools.CSharpDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> + <generator type="Microsoft.Ddue.Tools.CPlusPlusDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> + <generator type="Microsoft.Ddue.Tools.ScriptSharpDeclarationSyntaxGenerator" assembly="%DXROOT%\ProductionTools\SyntaxComponents.dll" /> + </generators> + </component> + </then> + </component> - <!-- Copy in comments --> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <index name="comments" value="/doc/members/member" key="@name" cache="100"> - <data base="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727" recurse="false" files="*.xml" /> - <data files="%DocumentationFile%" /> - </index> - <copy name="comments" source="*" target="/document/comments" /> - </component> + <!-- Copy in comments --> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <index name="comments" value="/doc/members/member" key="@name" cache="100"> + <data base="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727" recurse="false" files="*.xml" /> + <data files=".\comments.xml" /> + </index> + <copy name="comments" source="*" target="/document/comments" /> + <components> + <!-- copy comments for inheritdoc --> + <component type="Microsoft.Ddue.Tools.InheritDocumentationComponent" assembly="%DXROOT%\ProductionTools\CopyComponents.dll"> + <copy name="comments" use="reflection"/> + </component> + </components> + </component> + + <!-- Copy in reflection data and comments for members --> + <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <variable expression="/document/reference/elements//element/@api" /> + <components> + <component type="Microsoft.Ddue.Tools.IfThenComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <if condition="not(/document/reference/elements/element[@api=$key]/apidata)" /> + <then> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="reflection" source="*[not(self::elements)]" target="/document/reference/elements//element[@api=$key]" /> + </component> + </then> + </component> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="comments" source="summary|overloads|inheritdoc" target="/document/reference/elements//element[@api=$key]" /> + <components> + <!-- copy comments for inheritdoc --> + <component type="Microsoft.Ddue.Tools.InheritDocumentationComponent" assembly="%DXROOT%\ProductionTools\CopyComponents.dll"> + <copy name="comments" use="reflection"/> + </component> + </components> + </component> + </components> + </component> - <!-- Copy in reflection data and comments for members --> - <component type="Microsoft.Ddue.Tools.ForEachComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <variable expression="/document/reference/elements//element/@api" /> - <components> - <component type="Microsoft.Ddue.Tools.IfThenComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <if condition="not(/document/reference/elements/element[@api=$key]/apidata)" /> - <then> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="reflection" source="*[not(self::elements)]" target="/document/reference/elements//element[@api=$key]" /> - </component> - </then> - </component> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="comments" source="summary|overloads" target="/document/reference/elements//element[@api=$key]" /> - </component> - </components> - </component> + <!-- Copy in comments for the member's declaring type. --> + <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <copy name="comments" key="string(/document/reference/containers/type/@api)" source="summary" target="/document/reference/containers" /> + </component> - <!-- Copy in comments for the member's declaring type. --> - <component type="Microsoft.Ddue.Tools.CopyFromIndexComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <copy name="comments" key="string(/document/reference/containers/type/@api)" source="summary" target="/document/reference/containers" /> - </component> - - <!-- transform --> - <component type="Microsoft.Ddue.Tools.TransformComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <transform file="%DXROOT%\Presentation\vs2005\Transforms\main_sandcastle.xsl"> - <argument key="metadata" value="true" /> - <argument key="languages"> - <language label="VisualBasic" name="VisualBasic" style="vb" /> - <language label="CSharp" name="CSharp" style="cs" /> - <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cpp" /> - <!--<language label="JSharp" name="JSharp" style="cs" /> + <!-- transform --> + <component type="Microsoft.Ddue.Tools.TransformComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <transform file="%DXROOT%\Presentation\vs2005\Transforms\main_sandcastle.xsl"> + <argument key="metadata" value="true" /> + <argument key="languages"> + <language label="VisualBasic" name="VisualBasic" style="vb" /> + <language label="CSharp" name="CSharp" style="cs" /> + <language label="ManagedCPlusPlus" name="ManagedCPlusPlus" style="cpp" /> + <!--<language label="JSharp" name="JSharp" style="cs" /> <language label="JScript" name="JScript" style="cs" />--> - <language label="JavaScript" name="JavaScript" style="vb" /> - </argument> - </transform> - </component> + <language label="JavaScript" name="JavaScript" style="cs" /> + </argument> + </transform> + </component> - <!-- resolve shared content --> - <component type="Microsoft.Ddue.Tools.SharedContentComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <content file="%DXROOT%\Presentation\vs2005\content\shared_content.xml" /> - <content file="%DXROOT%\Presentation\vs2005\content\reference_content.xml" /> - <content file="%DXROOT%\Presentation\shared\content\syntax_content.xml" /> - <content file="%DXROOT%\Presentation\vs2005\content\feedback_content.xml" /> - </component> + <!-- resolve shared content --> + <component type="Microsoft.Ddue.Tools.SharedContentComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <content file="%DXROOT%\Presentation\vs2005\content\shared_content.xml" /> + <content file="%DXROOT%\Presentation\vs2005\content\reference_content.xml" /> + <content file="%DXROOT%\Presentation\shared\content\syntax_content.xml" /> + <content file="%DXROOT%\Presentation\vs2005\content\feedback_content.xml" /> + </component> - <!-- resolve reference links --> - <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <targets base="%FxReflectionData%" recurse="true" files="*.xml" type="msdn" /> - <targets files="%ReflectionXmlFile%" type="local" /> - </component> + <!-- resolve reference links --> + <component type="Microsoft.Ddue.Tools.ResolveReferenceLinksComponent2" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <targets base="%DXROOT%\Data\Reflection" recurse="true" files="*.xml" type="msdn" /> + <targets files=".\reflection.xml" type="local" /> + </component> - <!-- save the result --> - <component type="Microsoft.Ddue.Tools.SaveComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> - <save base ="%OutputHtml%" path="concat(/html/head/meta[@name='file']/@content,'.htm')" indent="true" omit-xml-declaration="true" /> - </component> + <!-- save the result --> + <component type="Microsoft.Ddue.Tools.SaveComponent" assembly="%DXROOT%\ProductionTools\BuildComponents.dll"> + <save base =".\Output\html" path="concat(/html/head/meta[@name='file']/@content,'.htm')" indent="true" omit-xml-declaration="true" /> + </component> - </components> - </builder> - </dduetools> + </components> + </builder> + </dduetools> </configuration> diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/globalTemplates.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/globalTemplates.xsl index c878e22..c008fa1 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/globalTemplates.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/globalTemplates.xsl @@ -174,7 +174,8 @@ <tr> <th> <xsl:variable name="codeLangLC" select="translate($codeLang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz ')"/> - <xsl:if test="$codeLangLC='visualbasic' or $codeLangLC='csharp' or $codeLangLC='managedcplusplus' or $codeLangLC='jsharp' or $codeLangLC='jscript'"> + <!-- Added JavaScript to look for AJAX snippets as JScript represents javascript snippets--> + <xsl:if test="$codeLangLC='visualbasic' or $codeLangLC='csharp' or $codeLangLC='managedcplusplus' or $codeLangLC='jsharp' or $codeLangLC='jscript' or $codeLangLC='javascript' or $codeLangLC='xaml'"> <include item="{$codeLang}"/> </xsl:if> <xsl:text> </xsl:text> @@ -224,4 +225,69 @@ </include> </xsl:template> + <xsl:template name="mshelpCodelangAttributes"> + <xsl:param name="snippets" /> + <xsl:for-each select="$snippets"> + + <xsl:if test="not(@language=preceding::*/@language)"> + <xsl:variable name="codeLang"> + <xsl:choose> + <xsl:when test="@language = 'VBScript' or @language = 'vbs'"> + <xsl:text>VBScript</xsl:text> + </xsl:when> + <xsl:when test="@language = 'VisualBasic' or @language = 'vb' or @language = 'vb#' or @language = 'VB' or @language = 'kbLangVB'" > + <xsl:text>kbLangVB</xsl:text> + </xsl:when> + <xsl:when test="@language = 'CSharp' or @language = 'c#' or @language = 'cs' or @language = 'C#'" > + <xsl:text>CSharp</xsl:text> + </xsl:when> + <xsl:when test="@language = 'ManagedCPlusPlus' or @language = 'cpp' or @language = 'cpp#' or @language = 'c' or @language = 'c++' or @language = 'C++' or @language = 'kbLangCPP'" > + <xsl:text>kbLangCPP</xsl:text> + </xsl:when> + <xsl:when test="@language = 'JSharp' or @language = 'j#' or @language = 'jsharp' or @language = 'VJ#'"> + <xsl:text>VJ#</xsl:text> + </xsl:when> + <xsl:when test="@language = 'JScript' or @language = 'js' or @language = 'jscript#' or @language = 'jscript' or @language = 'JScript' or @language = 'kbJScript'"> + <xsl:text>kbJScript</xsl:text> + </xsl:when> + <xsl:when test="@language = 'XAML' or @language = 'xaml'"> + <xsl:text>XAML</xsl:text> + </xsl:when> + <xsl:when test="@language = 'JavaScript' or @language = 'javascript'"> + <xsl:text>JavaScript</xsl:text> + </xsl:when> + <xsl:when test="@language = 'xml'"> + <xsl:text>xml</xsl:text> + </xsl:when> + <xsl:when test="@language = 'html'"> + <xsl:text>html</xsl:text> + </xsl:when> + <xsl:when test="@language = 'vb-c#'"> + <xsl:text>visualbasicANDcsharp</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>other</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:choose> + <xsl:when test="$codeLang='other'" /> + <!-- If $codeLang is already authored, then do nothing --> + <xsl:when test="/document/metadata/attribute[@name='codelang']/text() = $codeLang" /> + <xsl:otherwise> + <xsl:call-template name="codeLang"> + <xsl:with-param name="codeLang" select="$codeLang" /> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:if> + + </xsl:for-each> + </xsl:template> + + <xsl:template name="codeLang"> + <xsl:param name="codeLang" /> + <MSHelp:Attr Name="codelang" Value="{$codeLang}" /> + </xsl:template> + </xsl:stylesheet>
\ No newline at end of file diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/main_conceptual.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/main_conceptual.xsl index 41daf9c..40489b4 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/main_conceptual.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/main_conceptual.xsl @@ -9,8 +9,10 @@ <xsl:output method="xml" indent="no" encoding="utf-8" /> + <xsl:param name="RTMReleaseDate" /> <xsl:include href="htmlBody.xsl" /> <xsl:include href="utilities_dduexml.xsl" /> + <xsl:include href="seeAlsoSection.xsl" /> <xsl:variable name="hasSeeAlsoSection" select="boolean(count(/document/topic/*/ddue:relatedTopics/*[local-name()!='sampleRef']) > 0)"/> <xsl:variable name="examplesSection" select="boolean(string-length(/document/topic/*/ddue:codeExample[normalize-space(.)]) > 0)"/> @@ -225,6 +227,11 @@ </xsl:when> </xsl:choose> + <!-- Autogenerate codeLang attributes based on the snippets --> + <xsl:call-template name="mshelpCodelangAttributes"> + <xsl:with-param name="snippets" select="/document/topic/*//ddue:snippets/ddue:snippet" /> + </xsl:call-template> + <!-- authored attributes --> <xsl:for-each select="/document/metadata/attribute"> <MSHelp:Attr Name="{@name}" Value="{text()}" /> @@ -286,10 +293,11 @@ <div id="mainSection"> <div id="mainBody"> - <div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"> - <include item="header" /> - </div> - <!--<xsl:call-template name="head" />--> + <div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"/> + + <!-- 'header' shared content item is used to show optional boilerplate at the top of the topic's scrolling region, e.g. pre-release boilerplate --> + <include item="header" /> + <xsl:call-template name="body" /> </div> <xsl:call-template name="foot" /> @@ -297,12 +305,16 @@ </xsl:template> - <!--<xsl:template name="head"> - <include item="header" /> - </xsl:template>--> - <xsl:template name="body"> + <!-- freshness date --> + <xsl:call-template name="writeFreshnessDate"> + <xsl:with-param name="ChangedHistoryDate" select="/document/topic/*//ddue:section[ddue:title = 'Change History']/ddue:content/ddue:table/ddue:row[1]/ddue:entry[1]"/> + </xsl:call-template> + <xsl:apply-templates select="topic" /> + + <!-- changed table section --> + <xsl:call-template name="writeChangedTable" /> </xsl:template> <!-- sections that behave differently in conceptual and reference --> @@ -366,76 +378,20 @@ </xsl:if> </xsl:template> - <xsl:template match="ddue:relatedTopics"> + <xsl:template match="ddue:relatedTopics"> <xsl:if test="$hasSeeAlsoSection"> - <xsl:call-template name="section"> + <xsl:call-template name="section"> <xsl:with-param name="toggleSwitch" select="'seeAlso'"/> - <xsl:with-param name="title"><include item="relatedTopicsTitle" /></xsl:with-param> + <xsl:with-param name="title"> + <include item="relatedTopicsTitle" /> + </xsl:with-param> <xsl:with-param name="content"> - - <!-- Concepts sub-section --> - <xsl:if test="normalize-space(ddue:link) or normalize-space(ddue:dynamicLink[@type='inline'])"> - <xsl:call-template name="subSection"> - <xsl:with-param name="title"> - <include item="SeeAlsoConcepts"/> - </xsl:with-param> - <xsl:with-param name="content"> - <xsl:for-each select="*"> - <xsl:if test="name() = 'link' or (name() = 'dynamicLink' and @type = 'inline') or (name() = 'legacyLink' and not(starts-with(@xlink:href,'frlrf') - or starts-with(@xlink:href,'N:') or starts-with(@xlink:href,'T:') or starts-with(@xlink:href,'M:') or starts-with(@xlink:href,'P:') - or starts-with(@xlink:href,'F:') or starts-with(@xlink:href,'E:') or starts-with(@xlink:href,'Overload:')))"> - <div class="seeAlsoStyle"> - <xsl:apply-templates select="."/> - </div> - </xsl:if> - </xsl:for-each> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - - <!-- Reference sub-section --> - <xsl:if test="normalize-space(ddue:codeEntityReference)"> - <xsl:call-template name="subSection"> - <xsl:with-param name="title"> - <include item="SeeAlsoReference"/> - </xsl:with-param> - <xsl:with-param name="content"> - <xsl:for-each select="*"> - <xsl:if test="name() = 'codeEntityReference' or (name() = 'legacyLink' and (starts-with(@xlink:href,'frlrf') - or starts-with(@xlink:href,'N:') or starts-with(@xlink:href,'T:') or starts-with(@xlink:href,'M:') or starts-with(@xlink:href,'P:') - or starts-with(@xlink:href,'F:') or starts-with(@xlink:href,'E:') or starts-with(@xlink:href,'Overload:')))"> - <div class="seeAlsoStyle"> - <xsl:apply-templates select="."/> - </div> - </xsl:if> - </xsl:for-each> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - - <!-- Other Resources sub-section --> - <xsl:if test="ddue:externalLink"> - <xsl:call-template name="subSection"> - <xsl:with-param name="title"> - <include item="SeeAlsoOtherResources"/> - </xsl:with-param> - <xsl:with-param name="content"> - <xsl:for-each select="*"> - <xsl:if test="name() = 'externalLink'"> - <div class="seeAlsoStyle"> - <xsl:apply-templates select="."/> - </div> - </xsl:if> - </xsl:for-each> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - - </xsl:with-param> - </xsl:call-template> + <xsl:apply-templates select="/document/topic/*/ddue:relatedTopics" mode="seeAlso" /> + </xsl:with-param> + </xsl:call-template> </xsl:if> - </xsl:template> - + </xsl:template> + <xsl:template match="ddue:codeExample"> <!-- create Example section for the first codeExample node --> <xsl:if test="not(preceding-sibling::ddue:codeExample) and ../ddue:codeExample[normalize-space(.)!='']"> @@ -567,4 +523,12 @@ </li> </xsl:template> + <xsl:template name="writeChangedTable"> + <xsl:if test="/document/topic/*//ddue:section/ddue:title = 'Change History' and (/document/topic/*//ddue:section[ddue:title = 'Change History']/ddue:content/ddue:table and /document/topic/*//ddue:section[ddue:title = 'Change History']/ddue:content/ddue:table/ddue:row/ddue:entry[normalize-space(.)])"> + <xsl:apply-templates select="/document/topic/*//ddue:section[ddue:title = 'Change History']"> + <xsl:with-param name="showChangedHistoryTable" select="true()" /> + </xsl:apply-templates> + </xsl:if> + </xsl:template> + </xsl:stylesheet> diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/main_reference.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/main_reference.xsl index b2a3f63..3ab926d 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/main_reference.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/main_reference.xsl @@ -7,11 +7,15 @@ xmlns:msxsl="urn:schemas-microsoft-com:xslt" > - <!-- stuff specific to comments authored in DDUEXML --> + <xsl:param name="omitAptcaBoilerplate"/> + <xsl:param name="RTMReleaseDate" /> + + <!-- stuff specific to comments authored in DDUEXML --> <xsl:include href="utilities_reference.xsl" /> <xsl:include href="utilities_dduexml.xsl" /> <xsl:include href="htmlBody.xsl"/> + <xsl:include href="seeAlsoSection.xsl"/> <xsl:variable name="summary" select="normalize-space(/document/comments/ddue:dduexml/ddue:summary)" /> @@ -28,16 +32,62 @@ )"/> <xsl:variable name="examplesSection" select="boolean(string-length(/document/comments/ddue:dduexml/ddue:codeExamples[normalize-space(.)]) > 0)"/> <xsl:variable name="languageFilterSection" select="boolean(string-length(/document/comments/ddue:dduexml/ddue:codeExamples[normalize-space(.)]) > 0)" /> + <xsl:variable name="securityCriticalSection" + select="boolean( + (/document/reference/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and + not(/document/reference/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute'])) or + (/document/reference/containers/type/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and + not(/document/reference/containers/type/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute'])) or + ($api-subgroup='property' and + (((/document/reference/getter and (/document/reference/getter/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/getter/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute']))) and + (/document/reference/setter and (/document/reference/setter/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/setter/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute'])))) or + ((/document/reference/getter and (/document/reference/getter/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/getter/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute']))) and not(/document/reference/setter)) or + (not(/document/reference/getter) and (/document/reference/setter and (/document/reference/setter/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/setter/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute'])))) + )) or + ($api-subgroup='event' and + (((/document/reference/adder and (/document/reference/adder/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/adder/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute']))) and + (/document/reference/remover and (/document/reference/remover/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/remover/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute'])))) or + ((/document/reference/adder and (/document/reference/adder/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/adder/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute']))) and not(/document/reference/remover)) or + (not(/document/reference/adder) and (/document/reference/remover and (/document/reference/remover/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and not(/document/reference/remover/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute'])))) + )) + )" /> + <xsl:template name="body"> + <!-- freshness date --> + <xsl:call-template name="writeFreshnessDate"> + <xsl:with-param name="ChangedHistoryDate" select="/document/comments/ddue:dduexml//ddue:section[ddue:title = 'Change History']/ddue:content/ddue:table/ddue:row[1]/ddue:entry[1]"/> + </xsl:call-template> <!--internalOnly boilerplate --> + <xsl:if test="not($securityCriticalSection)"> <xsl:call-template name="internalOnly"/> + </xsl:if> <!-- obsolete boilerplate --> <xsl:if test="/document/reference/attributes/attribute/type[@api='T:System.ObsoleteAttribute']"> <xsl:call-template name="obsoleteSection" /> </xsl:if> + <!-- SecurityCritical boilerplate --> + <xsl:if test="$securityCriticalSection"> + <xsl:choose> + <xsl:when test="boolean($api-group='type')"> + <include item="typeSecurityCriticalBoilerplate" /> + </xsl:when> + <xsl:when test="boolean($api-group='member')"> + <xsl:choose> + <xsl:when test="(/document/reference/containers/type/attributes/attribute/type[@api='T:System.Security.SecurityCriticalAttribute'] and + not(/document/reference/containers/type/attributes/attribute/type[@api='T:System.Security.SecurityTreatAsSafeAttribute']))"> + <include item="typeSecurityCriticalBoilerplate" /> + </xsl:when> + <xsl:otherwise> + <include item="memberSecurityCriticalBoilerplate" /> + </xsl:otherwise> + </xsl:choose> + </xsl:when> + </xsl:choose> + </xsl:if> + <!-- summary --> <!-- useBase boilerplate --> <xsl:if test="/document/comments/ddue:dduexml/ddue:useBase and /document/reference/overrides/member"> @@ -49,7 +99,10 @@ </xsl:if> <xsl:choose> <xsl:when test="normalize-space(/document/comments/ddue:dduexml/ddue:summary[1]) != ''"> - <span data="authoredSummary"> + <span sdata="authoredSummary"> + <xsl:if test="$securityCriticalSection"> + <p><include item="securityCritical" /></p> + </xsl:if> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:summary[1]" /> </span> </xsl:when> @@ -142,22 +195,21 @@ </xsl:when> </xsl:choose> <!-- exceptions --> + <xsl:if test="not($securityCriticalSection)"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:exceptions" /> + </xsl:if> <!-- remarks --> - <xsl:if test="not($group='namespace')"> - <xsl:choose> - <xsl:when test="normalize-space(/document/comments/ddue:dduexml/ddue:remarks[1])"> - <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:remarks[1]" /> - </xsl:when> - <xsl:when test="/document/reference/attributes/attribute/type[@api='T:System.Security.Permissions.HostProtectionAttribute']"> - <xsl:call-template name="hostProtectionSection" /> - </xsl:when> - </xsl:choose> + <xsl:if test="not($group='namespace') and not($securityCriticalSection)"> + <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:remarks[1]" /> </xsl:if> <!-- example --> + <xsl:if test="not($securityCriticalSection)"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:codeExamples" /> + </xsl:if> <!-- permissions --> + <xsl:if test="not($securityCriticalSection)"> <xsl:call-template name="permissionsSection"/> + </xsl:if> <!-- inheritance --> <xsl:apply-templates select="/document/reference/family" /> <!-- other comment sections --> @@ -173,6 +225,9 @@ <!-- see also --> <xsl:call-template name="seeAlsoSection"/> + <!-- changed table section --> + <xsl:call-template name="writeChangedTable" /> + </xsl:template> <xsl:template name="obsoleteSection"> @@ -204,7 +259,7 @@ <xsl:param name="name" /> <xsl:choose> <xsl:when test="normalize-space(/document/comments/ddue:dduexml/ddue:parameters[1]/ddue:parameter) != ''"> - <span data="authoredParameterSummary"> + <span sdata="authoredParameterSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:parameters[1]/ddue:parameter[string(ddue:parameterReference)=$name]/ddue:content" /> </span> </xsl:when> @@ -217,7 +272,7 @@ <xsl:template name="getReturnsDescription"> <xsl:choose> <xsl:when test="normalize-space(/document/comments/ddue:dduexml/ddue:returnValue[1]) != ''"> - <span data="authoredValueSummary"> + <span sdata="authoredValueSummary"> <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:returnValue[1]" /> </span> </xsl:when> @@ -228,6 +283,9 @@ </xsl:template> <xsl:template match="returns"> + <xsl:choose> + <xsl:when test="$api-subgroup='field' and normalize-space(/document/comments/ddue:dduexml/ddue:returnValue[1]) = '' and normalize-space(/document/comments/ddue:dduexml/ddue:returnValue[2]) = ''"/> + <xsl:otherwise> <div id="returns"> <xsl:call-template name="subSection"> <xsl:with-param name="title"> @@ -252,6 +310,8 @@ </xsl:with-param> </xsl:call-template> </div> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="templates"> <div id="genericParameters"> @@ -277,7 +337,7 @@ <xsl:template name="getElementDescription"> <xsl:choose> <xsl:when test="normalize-space(ddue:summary[1]) != ''"> - <span data="memberAuthoredSummary"> + <span sdata="memberAuthoredSummary"> <xsl:apply-templates select="ddue:summary[1]/ddue:para/node()" /> </span> </xsl:when> @@ -392,7 +452,7 @@ <xsl:template name="permissionsSection"> <!-- the containers/library/noAptca is added to reflection data by the ApplyVsDocModel transform --> - <xsl:variable name="showAptcaBoilerplate" select="boolean(/document/reference/containers/library/noAptca)"/> + <xsl:variable name="showAptcaBoilerplate" select="boolean(/document/reference/containers/library/noAptca and $omitAptcaBoilerplate!='true')"/> <xsl:if test="/document/comments/ddue:dduexml/ddue:permissions[normalize-space(.)] or $showAptcaBoilerplate"> <xsl:call-template name="section"> <xsl:with-param name="toggleSwitch" select="'permissions'" /> @@ -434,56 +494,10 @@ <xsl:call-template name="memberIntroBoilerplate"/> </xsl:template> - <xsl:template name="mshelpCodelangAttributes"> - - <xsl:for-each select="/document/comments/ddue:dduexml/ddue:codeExamples/ddue:codeExample/ddue:legacy/ddue:content/ddue:snippets/ddue:snippet"> - - <xsl:if test="not(@language=preceding::*/@language)"> - <xsl:variable name="codeLang"> - <xsl:choose> - <xsl:when test="@language = 'VBScript' or @language = 'vbs'"> - <xsl:text>VBScript</xsl:text> - </xsl:when> - <xsl:when test="@language = 'VisualBasic' or @language = 'vb' or @language = 'vb#' or @language = 'VB' or @language = 'kbLangVB'" > - <xsl:text>kbLangVB</xsl:text> - </xsl:when> - <xsl:when test="@language = 'CSharp' or @language = 'c#' or @language = 'cs' or @language = 'C#'" > - <xsl:text>CSharp</xsl:text> - </xsl:when> - <xsl:when test="@language = 'ManagedCPlusPlus' or @language = 'cpp' or @language = 'cpp#' or @language = 'c' or @language = 'c++' or @language = 'C++' or @language = 'kbLangCPP'" > - <xsl:text>kbLangCPP</xsl:text> - </xsl:when> - <xsl:when test="@language = 'JSharp' or @language = 'j#' or @language = 'jsharp' or @language = 'VJ#'"> - <xsl:text>VJ#</xsl:text> - </xsl:when> - <xsl:when test="@language = 'JScript' or @language = 'js' or @language = 'jscript#' or @language = 'jscript' or @language = 'JScript' or @language = 'kbJScript'"> - <xsl:text>kbJScript</xsl:text> - </xsl:when> - <xsl:when test="@language = 'xml'"> - <xsl:text>xml</xsl:text> - </xsl:when> - <xsl:when test="@language = 'html'"> - <xsl:text>html</xsl:text> - </xsl:when> - <xsl:when test="@language = 'vb-c#'"> - <xsl:text>visualbasicANDcsharp</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>other</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:choose> - <xsl:when test="$codeLang='other'" /> - <xsl:otherwise> - <xsl:call-template name="codeLang"> - <xsl:with-param name="codeLang" select="$codeLang" /> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:if> - - </xsl:for-each> + <xsl:template name="codelangAttributes"> + <xsl:call-template name="mshelpCodelangAttributes"> + <xsl:with-param name="snippets" select="/document/comments/ddue:dduexml/ddue:codeExamples/ddue:codeExample/ddue:legacy/ddue:content/ddue:snippets/ddue:snippet" /> + </xsl:call-template> </xsl:template> <xsl:template match="ddue:codeEntityReference" mode="abstract"> @@ -492,20 +506,6 @@ </xsl:call-template> </xsl:template> - <xsl:template name="hostProtectionSection"> - <xsl:if test="/document/reference/attributes/attribute/type[@api='T:System.Security.Permissions.HostProtectionAttribute']"> - <xsl:call-template name="section"> - <xsl:with-param name="toggleSwitch" select="'remarks'"/> - <xsl:with-param name="title"> - <include item="remarksTitle" /> - </xsl:with-param> - <xsl:with-param name="content"> - <xsl:call-template name="hostProtectionContent" /> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - </xsl:template> - <!-- Footer stuff --> <xsl:template name="foot"> @@ -535,5 +535,45 @@ </include> </div> </xsl:template> - + + <xsl:template name="seeAlsoSection"> + + <xsl:if test="$hasSeeAlsoSection"> + <xsl:call-template name="section"> + <xsl:with-param name="toggleSwitch" select="'seeAlso'"/> + <xsl:with-param name="title"> + <include item="relatedTitle" /> + </xsl:with-param> + <xsl:with-param name="content"> + <xsl:choose> + <xsl:when test="count(/document/comments/ddue:dduexml/ddue:relatedTopics/*) > 0"> + <xsl:apply-templates select="/document/comments/ddue:dduexml/ddue:relatedTopics" mode="seeAlso"> + <xsl:with-param name="autoGenerateLinks" select="'true'" /> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="subSection"> + <xsl:with-param name="title"> + <include item="SeeAlsoReference"/> + </xsl:with-param> + <xsl:with-param name="content"> + <xsl:call-template name="autogenSeeAlsoLinks"/> + </xsl:with-param> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + + </xsl:with-param> + </xsl:call-template> + </xsl:if> + </xsl:template> + + <xsl:template name="writeChangedTable"> + <xsl:if test="/document/comments/ddue:dduexml//ddue:section/ddue:title = 'Change History' and (/document/comments/ddue:dduexml//ddue:section[ddue:title = 'Change History']/ddue:content/ddue:table and /document/comments/ddue:dduexml//ddue:section[ddue:title = 'Change History']/ddue:content/ddue:table/ddue:row/ddue:entry[normalize-space(.)])"> + <xsl:apply-templates select="/document/comments/ddue:dduexml//ddue:section[ddue:title = 'Change History']"> + <xsl:with-param name="showChangedHistoryTable" select="true()" /> + </xsl:apply-templates> + </xsl:if> + </xsl:template> + </xsl:stylesheet> diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/main_sandcastle.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/main_sandcastle.xsl index 3b9b642..79962ce 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/main_sandcastle.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/main_sandcastle.xsl @@ -9,7 +9,7 @@ <xsl:variable name="summary" select="normalize-space(/document/comments/summary)" /> <xsl:variable name="abstractSummary" select="/document/comments/summary" /> - <xsl:variable name="hasSeeAlsoSection" select="boolean((count(/document/comments/seealso | /document/comments/summary/seealso) > 0) or + <xsl:variable name="hasSeeAlsoSection" select="boolean((count(/document/comments//seealso | /document/reference/elements/element/overloads//seealso) > 0) or ($group='type' or $group='member' or $group='list'))"/> <xsl:variable name="examplesSection" select="boolean(string-length(/document/comments/example[normalize-space(.)]) > 0)"/> <xsl:variable name="languageFilterSection" select="boolean(string-length(/document/comments/example[normalize-space(.)]) > 0)" /> @@ -316,9 +316,11 @@ </xsl:with-param> <xsl:with-param name="content"> <xsl:call-template name="autogenSeeAlsoLinks"/> - <xsl:for-each select="/document/comments/seealso | /document/comments/summary/seealso"> + <xsl:for-each select="/document/comments//seealso | /document/reference/elements/element/overloads//seealso"> <div class="seeAlsoStyle"> - <xsl:apply-templates select="." /> + <xsl:apply-templates select="."> + <xsl:with-param name="displaySeeAlso" select="true()" /> + </xsl:apply-templates> </div> </xsl:for-each> </xsl:with-param> @@ -380,7 +382,26 @@ </xsl:choose> </xsl:template> + <xsl:template match="see[@href]"> + <xsl:choose> + <xsl:when test="normalize-space(.)"> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> + <xsl:value-of select="." /> + </a> + </xsl:when> + <xsl:otherwise> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> + <xsl:value-of select="@href" /> + </a> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match="seealso[@href]"> + <xsl:param name="displaySeeAlso" select="false()" /> + <xsl:if test="$displaySeeAlso"> <xsl:choose> <xsl:when test="normalize-space(.)"> <a> @@ -395,6 +416,7 @@ </a> </xsl:otherwise> </xsl:choose> + </xsl:if> </xsl:template> <xsl:template match="see[@langword]"> @@ -471,6 +493,8 @@ </xsl:template> <xsl:template match="seealso"> + <xsl:param name="displaySeeAlso" select="false()" /> + <xsl:if test="$displaySeeAlso"> <xsl:choose> <xsl:when test="normalize-space(.)"> <referenceLink target="{@cref}" qualified="true"> @@ -481,12 +505,11 @@ <referenceLink target="{@cref}" qualified="true" /> </xsl:otherwise> </xsl:choose> + </xsl:if> </xsl:template> <xsl:template match="c"> - <span class="code"> - <xsl:value-of select="." /> - </span> + <span class="code"><xsl:apply-templates/></span> </xsl:template> <xsl:template match="paramref"> @@ -529,7 +552,7 @@ <!-- pass through html tags --> - <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|a|img|b|i|strong|em|del|sub|sup|br|hr|h1|h2|h3|h4|h5|h6|pre|div|span|blockquote|abbr|acronym|u|font"> + <xsl:template match="p|ol|ul|li|dl|dt|dd|table|tr|th|td|a|img|b|i|strong|em|del|sub|sup|br|hr|h1|h2|h3|h4|h5|h6|pre|div|span|blockquote|abbr|acronym|u|font|map|area"> <xsl:copy> <xsl:copy-of select="@*" /> <xsl:apply-templates /> @@ -643,55 +666,10 @@ <xsl:call-template name="memberIntroBoilerplate"/> </xsl:template> - <xsl:template name="mshelpCodelangAttributes"> - <xsl:for-each select="/document/comments/example/code"> - - <xsl:if test="not(@language=preceding::*/@language)"> - <xsl:variable name="codeLang"> - <xsl:choose> - <xsl:when test="@language = 'VBScript' or @language = 'vbs'"> - <xsl:text>VBScript</xsl:text> - </xsl:when> - <xsl:when test="@language = 'VisualBasic' or @language = 'vb' or @language = 'vb#' or @language = 'VB' or @language = 'kbLangVB'" > - <xsl:text>kbLangVB</xsl:text> - </xsl:when> - <xsl:when test="@language = 'CSharp' or @language = 'c#' or @language = 'cs' or @language = 'C#'" > - <xsl:text>CSharp</xsl:text> - </xsl:when> - <xsl:when test="@language = 'ManagedCPlusPlus' or @language = 'cpp' or @language = 'cpp#' or @language = 'c' or @language = 'c++' or @language = 'C++' or @language = 'kbLangCPP'" > - <xsl:text>kbLangCPP</xsl:text> - </xsl:when> - <xsl:when test="@language = 'JSharp' or @language = 'j#' or @language = 'jsharp' or @language = 'VJ#'"> - <xsl:text>VJ#</xsl:text> - </xsl:when> - <xsl:when test="@language = 'JScript' or @language = 'js' or @language = 'jscript#' or @language = 'jscript' or @language = 'JScript' or @language = 'kbJScript'"> - <xsl:text>kbJScript</xsl:text> - </xsl:when> - <xsl:when test="@language = 'xml'"> - <xsl:text>xml</xsl:text> - </xsl:when> - <xsl:when test="@language = 'html'"> - <xsl:text>html</xsl:text> - </xsl:when> - <xsl:when test="@language = 'vb-c#'"> - <xsl:text>visualbasicANDcsharp</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:text>other</xsl:text> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - <xsl:choose> - <xsl:when test="$codeLang='other'" /> - <xsl:otherwise> - <xsl:call-template name="codeLang"> - <xsl:with-param name="codeLang" select="$codeLang" /> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> - </xsl:if> - - </xsl:for-each> + <xsl:template name="codelangAttributes"> + <xsl:call-template name="mshelpCodelangAttributes"> + <xsl:with-param name="snippets" select="/document/comments/example/code" /> + </xsl:call-template> </xsl:template> <!-- Footer stuff --> diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/seeAlsoSection.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/seeAlsoSection.xsl new file mode 100644 index 0000000..c94e4f0 --- /dev/null +++ b/tools/Sandcastle/Presentation/vs2005/transforms/seeAlsoSection.xsl @@ -0,0 +1,148 @@ +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1" + xmlns:MSHelp="http://msdn.microsoft.com/mshelp" + xmlns:mshelp="http://msdn.microsoft.com/mshelp" + xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:msxsl="urn:schemas-microsoft-com:xslt" + > + + <msxsl:script language="C#" implements-prefix="ddue"> + <msxsl:using namespace="System" /> + <msxsl:using namespace="System.Globalization"/> + <msxsl:using namespace="System.Text.RegularExpressions" /> + <![CDATA[ + public static string ToUpper(string id) { + return id.Trim().ToUpper(System.Globalization.CultureInfo.InvariantCulture); + } + //Regular expression to check that a string is in a valid Guid representation. + private static Regex guidChecker = new Regex("[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}", RegexOptions.None); + + public static string GuidChecker(string id) { + return guidChecker.IsMatch(id).ToString(); + } + + public static string CompareDate(string RTMReleaseDate, string changedHistoryDate) { + + CultureInfo culture = CultureInfo.InvariantCulture; + DateTime dt1 = DateTime.MinValue; + DateTime dt2 = DateTime.MinValue; + + try { + dt1 = DateTime.Parse(RTMReleaseDate, culture); + } + catch (FormatException) { + Console.WriteLine(string.Format("Error: CompareDate: Unable to convert '{0}' for culture {1}.", RTMReleaseDate, culture.Name)); + return "notValidDate"; + } + + try { + dt2 = DateTime.Parse(changedHistoryDate,culture); + } + catch (FormatException) { + Console.WriteLine(string.Format("Error: CompareDate: Unable to convert '{0}' for culture {1}.", changedHistoryDate, culture.Name)); + return "notValidDate"; + } + + if (DateTime.Compare(dt2, dt1) > 0) return changedHistoryDate; + else return RTMReleaseDate; + } + + ]]> + </msxsl:script> + + <!-- Tasks --> + <xsl:variable name="HowTo" select="'DAC3A6A0-C863-4E5B-8F65-79EFC6A4BA09'" /> + <xsl:variable name="Walkthrough" select="'4779DD54-5D0C-4CC3-9DB3-BF1C90B721B3'" /> + <xsl:variable name="Sample" select="'069EFD88-412D-4E2F-8848-2D5C3AD56BDE'" /> + <xsl:variable name="Troubleshooting" select="'38C8E0D1-D601-4DBA-AE1B-5BEC16CD9B01'" /> + + <!-- Reference --> + <xsl:variable name="ReferenceWithoutSyntax" select="'F9205737-4DEC-4A58-AA69-0E621B1236BD'" /> + <xsl:variable name="ReferenceWithSyntax" select="'95DADC4C-A2A6-447A-AA36-B6BE3A4F8DEC'" /> + <xsl:variable name="XMLReference" select="'3272D745-2FFC-48C4-9E9D-CF2B2B784D5F'" /> + <xsl:variable name="ErrorMessage" select="'A635375F-98C2-4241-94E7-E427B47C20B6'" /> + <xsl:variable name="UIReference" select="'B8ED9F21-39A4-4967-928D-160CD2ED9DCE'" /> + + <!-- Concepts --> + <xsl:variable name="Conceptual" select="'1FE70836-AA7D-4515-B54B-E10C4B516E50'" /> + <xsl:variable name="SDKTechnologyOverviewArchitecture" select="'68F07632-C4C5-4645-8DFA-AC87DCB4BD54'" /> + <xsl:variable name="SDKTechnologyOverviewCodeDirectory" select="'4BBAAF90-0E5F-4C86-9D31-A5CAEE35A416'" /> + <xsl:variable name="SDKTechnologyOverviewScenarios" select="'356C57C4-384D-4AF2-A637-FDD6F088A033'" /> + <xsl:variable name="SDKTechnologyOverviewTechnologySummary" select="'19F1BB0E-F32A-4D5F-80A9-211D92A8A715'" /> + + <!-- Other Resources --> + <xsl:variable name="Orientation" select="'B137C930-7BF7-48A2-A329-3ADCAEF8868E'" /> + <xsl:variable name="WhitePaper" select="'56DB00EC-28BA-4C0D-8694-28E8B244E236'" /> + <xsl:variable name="CodeEntity" select="'4A273212-0AC8-4D72-8349-EC11CD2FF8CD'" /> + <xsl:variable name="Glossary" select="'A689E19C-2687-4881-8CE1-652FF60CF46C'" /> + <xsl:variable name="SDKTechnologyOverviewOrientation" select="'CDB8C120-888F-447B-8AF8-F9540562E7CA'" /> + + <xsl:template match="ddue:relatedTopics" mode="seeAlso"> + <xsl:param name="autoGenerateLinks" select="'false'" /> + + <xsl:if test="(ddue:link | ddue:legacyLink)[(ddue:ToUpper(@topicType_id) = $HowTo or ddue:ToUpper(@topicType_id) = $Walkthrough or ddue:ToUpper(@topicType_id) = $Sample or ddue:ToUpper(@topicType_id) = $Troubleshooting) and ddue:GuidChecker(@xlink:href) = 'True']" > + <xsl:call-template name="seeAlsoSubSection"> + <xsl:with-param name="headerGroup" select="'SeeAlsoTasks'" /> + <xsl:with-param name="members" select="(ddue:link | ddue:legacyLink)[(ddue:ToUpper(@topicType_id) = $HowTo or ddue:ToUpper(@topicType_id) = $Walkthrough or ddue:ToUpper(@topicType_id) = $Sample or ddue:ToUpper(@topicType_id) = $Troubleshooting) and ddue:GuidChecker(@xlink:href) = 'True']" /> + <xsl:with-param name="autoGenerateLinks" select="'false'" /> + </xsl:call-template> + </xsl:if> + + <xsl:if test="(ddue:link | ddue:legacyLink)[(ddue:ToUpper(@topicType_id) = $Conceptual or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewArchitecture or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewCodeDirectory or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewScenarios or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewTechnologySummary) and ddue:GuidChecker(@xlink:href) = 'True']"> + <xsl:call-template name="seeAlsoSubSection"> + <xsl:with-param name="headerGroup" select="'SeeAlsoConcepts'" /> + <xsl:with-param name="members" select="(ddue:link | ddue:legacyLink)[(ddue:ToUpper(@topicType_id) = $Conceptual or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewArchitecture or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewCodeDirectory or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewScenarios or ddue:ToUpper(@topicType_id) = $SDKTechnologyOverviewTechnologySummary) and ddue:GuidChecker(@xlink:href) = 'True']" /> + <xsl:with-param name="autoGenerateLinks" select="'false'" /> + </xsl:call-template> + </xsl:if> + + <xsl:if test="(ddue:link | ddue:legacyLink)[((ddue:ToUpper(@topicType_id) = $ReferenceWithoutSyntax or ddue:ToUpper(@topicType_id) = $ReferenceWithSyntax or ddue:ToUpper(@topicType_id) = $XMLReference or ddue:ToUpper(@topicType_id) = $ErrorMessage or ddue:ToUpper(@topicType_id) = $UIReference) and ddue:GuidChecker(@xlink:href) = 'True') or ddue:GuidChecker(@xlink:href) = 'False'] | + ddue:codeEntityReference or + $autoGenerateLinks = 'true'"> + <xsl:call-template name="seeAlsoSubSection"> + <xsl:with-param name="headerGroup" select="'SeeAlsoReference'" /> + <xsl:with-param name="members" select="(ddue:link | ddue:legacyLink)[((ddue:ToUpper(@topicType_id) = $ReferenceWithoutSyntax or ddue:ToUpper(@topicType_id) = $ReferenceWithSyntax or ddue:ToUpper(@topicType_id) = $XMLReference or ddue:ToUpper(@topicType_id) = $ErrorMessage or ddue:ToUpper(@topicType_id) = $UIReference) and ddue:GuidChecker(@xlink:href) = 'True') or ddue:GuidChecker(@xlink:href) = 'False'] | + ddue:codeEntityReference" /> + <xsl:with-param name="autoGenerateLinks" select="$autoGenerateLinks" /> + </xsl:call-template> + </xsl:if> + + <xsl:if test="(ddue:link | ddue:legacyLink)[(ddue:ToUpper(@topicType_id) != $HowTo and ddue:ToUpper(@topicType_id) != $Walkthrough and ddue:ToUpper(@topicType_id) != $Sample and ddue:ToUpper(@topicType_id) != $Troubleshooting and ddue:ToUpper(@topicType_id) != $Conceptual and ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewArchitecture and ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewCodeDirectory and + ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewScenarios and ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewTechnologySummary and ddue:ToUpper(@topicType_id) != $ReferenceWithoutSyntax and ddue:ToUpper(@topicType_id) != $ReferenceWithSyntax and ddue:ToUpper(@topicType_id) != $XMLReference and ddue:ToUpper(@topicType_id) != $ErrorMessage and ddue:ToUpper(@topicType_id) != $UIReference and + ddue:GuidChecker(@xlink:href) = 'True') or (not(@topicType_id) and ddue:GuidChecker(@xlink:href) = 'True')] or + ddue:dynamicLink[@type = 'inline'] or + ddue:externalLink" > + <xsl:call-template name="seeAlsoSubSection"> + <xsl:with-param name="headerGroup" select="'SeeAlsoOtherResources'" /> + <xsl:with-param name="members" select="(ddue:link | ddue:legacyLink)[(ddue:ToUpper(@topicType_id) != $HowTo and ddue:ToUpper(@topicType_id) != $Walkthrough and ddue:ToUpper(@topicType_id) != $Sample and ddue:ToUpper(@topicType_id) != $Troubleshooting and ddue:ToUpper(@topicType_id) != $Conceptual and ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewArchitecture and ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewCodeDirectory and + ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewScenarios and ddue:ToUpper(@topicType_id) != $SDKTechnologyOverviewTechnologySummary and ddue:ToUpper(@topicType_id) != $ReferenceWithoutSyntax and ddue:ToUpper(@topicType_id) != $ReferenceWithSyntax and ddue:ToUpper(@topicType_id) != $XMLReference and ddue:ToUpper(@topicType_id) != $ErrorMessage and ddue:ToUpper(@topicType_id) != $UIReference and + ddue:GuidChecker(@xlink:href) = 'True') or (not(@topicType_id) and ddue:GuidChecker(@xlink:href) = 'True')] | + ddue:dynamicLink[@type = 'inline'] | + ddue:externalLink" /> + <xsl:with-param name="autoGenerateLinks" select="'false'" /> + </xsl:call-template> + </xsl:if> + + </xsl:template> + + <xsl:template name="seeAlsoSubSection"> + <xsl:param name="headerGroup" /> + <xsl:param name="members" /> + <xsl:param name="autoGenerateLinks" /> + <xsl:call-template name="subSection"> + <xsl:with-param name="title"> + <include item="{$headerGroup}"/> + </xsl:with-param> + <xsl:with-param name="content"> + <xsl:if test="$autoGenerateLinks='true'"> + <xsl:call-template name="autogenSeeAlsoLinks"/> + </xsl:if> + <xsl:for-each select="$members"> + <div class="seeAlsoStyle"> + <xsl:apply-templates select="." /> + </div> + </xsl:for-each> + </xsl:with-param> + </xsl:call-template> + </xsl:template> +</xsl:stylesheet>
\ No newline at end of file diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/utilities_dduexml.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/utilities_dduexml.xsl index 24b78ca..f26805e 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/utilities_dduexml.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/utilities_dduexml.xsl @@ -278,79 +278,6 @@ </div> </xsl:template> - <xsl:template name="seeAlsoSection"> - - <xsl:if test="$hasSeeAlsoSection"> - <xsl:call-template name="section"> - <xsl:with-param name="toggleSwitch" select="'seeAlso'"/> - <xsl:with-param name="title"><include item="relatedTitle" /></xsl:with-param> - <xsl:with-param name="content"> - - <!-- Concepts sub-section --> - <xsl:if test="normalize-space(/document/comments/ddue:dduexml/ddue:relatedTopics/ddue:link) or normalize-space(/document/comments/ddue:dduexml/ddue:relatedTopics/ddue:dynamicLink[@type='inline'])"> - <xsl:call-template name="subSection"> - <xsl:with-param name="title"> - <include item="SeeAlsoConcepts"/> - </xsl:with-param> - <xsl:with-param name="content"> - <xsl:for-each select="/document/comments/ddue:dduexml/ddue:relatedTopics/*"> - <xsl:if test="name() = 'link' or (name() = 'dynamicLink' and @type = 'inline') or (name() = 'legacyLink' and not(starts-with(@xlink:href,'frlrf') - or starts-with(@xlink:href,'N:') or starts-with(@xlink:href,'T:') or starts-with(@xlink:href,'M:') or starts-with(@xlink:href,'P:') - or starts-with(@xlink:href,'F:') or starts-with(@xlink:href,'E:') or starts-with(@xlink:href,'Overload:')))"> - <div class="seeAlsoStyle"> - <xsl:apply-templates select="."/> - </div> - </xsl:if> - </xsl:for-each> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - - <!-- Reference sub-section (always one of these in an API topic) --> - <xsl:if test="(normalize-space(/document/comments/ddue:dduexml/ddue:relatedTopics/ddue:codeEntityReference) or normalize-space(/document/comments/ddue:dduexml/ddue:relatedTopics/ddue:legacyLink)) or not(/document/reference/apidata/@group = 'namespace')"> - <xsl:call-template name="subSection"> - <xsl:with-param name="title"> - <include item="SeeAlsoReference"/> - </xsl:with-param> - - <xsl:with-param name="content"> - <xsl:call-template name="autogenSeeAlsoLinks"/> - <xsl:for-each select="/document/comments/ddue:dduexml/ddue:relatedTopics/*"> - <xsl:if test="name() = 'codeEntityReference' or (name() = 'legacyLink' and (starts-with(@xlink:href,'frlrf') - or starts-with(@xlink:href,'N:') or starts-with(@xlink:href,'T:') or starts-with(@xlink:href,'M:') or starts-with(@xlink:href,'P:') - or starts-with(@xlink:href,'F:') or starts-with(@xlink:href,'E:') or starts-with(@xlink:href,'Overload:')))"> - <div class="seeAlsoStyle"> - <xsl:apply-templates select="."/> - </div> - </xsl:if> - </xsl:for-each> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - - <!-- Other Resources sub-section --> - <xsl:if test="/document/comments/ddue:dduexml/ddue:relatedTopics/ddue:externalLink"> - <xsl:call-template name="subSection"> - <xsl:with-param name="title"> - <include item="SeeAlsoOtherResources"/> - </xsl:with-param> - <xsl:with-param name="content"> - <xsl:for-each select="/document/comments/ddue:dduexml/ddue:relatedTopics/*"> - <xsl:if test="name() = 'externalLink'"> - <div class="seeAlsoStyle"> - <xsl:apply-templates select="."/> - </div> - </xsl:if> - </xsl:for-each> - </xsl:with-param> - </xsl:call-template> - </xsl:if> - - </xsl:with-param> - </xsl:call-template> - </xsl:if> - </xsl:template> - <!-- just skip over these --> <xsl:template match="ddue:content | ddue:legacy"> <xsl:apply-templates /> @@ -440,6 +367,9 @@ <xsl:when test="@language = 'xaml' or @language = 'XAML'"> <xsl:text>XAML</xsl:text> </xsl:when> + <xsl:when test="@language = 'javascript' or @language = 'JavaScript'"> + <xsl:text>JavaScript</xsl:text> + </xsl:when> <xsl:otherwise> <xsl:text>other</xsl:text> </xsl:otherwise> @@ -605,6 +535,7 @@ </xsl:template> <xsl:template match="ddue:section"> + <xsl:param name="showChangedHistoryTable" select="false()"/> <xsl:if test="descendant::ddue:content[normalize-space(.)]"> <xsl:apply-templates select="@address" /> @@ -630,6 +561,9 @@ <xsl:variable name="a19" select="count(ancestor::ddue:section)" /> <xsl:variable name="total" select="$a1+$a2+$a3+$a4+$a5+$a6+$a7+$a8+$a9+$a10+$a11+$a12+$a13+$a14+$a15+$a16+$a17+$a18+$a19" /> <xsl:choose> + <!-- This lets not to display changed table section unless the template is called --> + <xsl:when test="ddue:title = 'Change History' and not($showChangedHistoryTable)" /> + <xsl:when test="$total = 0"> <xsl:variable name="sectionCount"> <xsl:value-of select="count(preceding-sibling::ddue:section)"/> @@ -791,7 +725,7 @@ <xsl:template match="ddue:languageKeyword"> <xsl:variable name="word" select="." /> - <span data="langKeyword" value="{$word}"> + <span sdata="langKeyword" value="{$word}"> <xsl:choose> <!-- mref topics get special handling for keywords like null, etc. --> <xsl:when test="/document/reference/apidata"> @@ -1360,4 +1294,44 @@ </div> </xsl:template> + <xsl:template name="writeFreshnessDate"> + <xsl:param name="ChangedHistoryDate" /> + + <xsl:choose> + <xsl:when test="normalize-space($RTMReleaseDate) = ''" /> + <xsl:when test="normalize-space($ChangedHistoryDate) = ''"> + <include item="UpdateTitle"> + <parameter> + <xsl:value-of select="$RTMReleaseDate"/> + </parameter> + </include> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="date" select="ddue:CompareDate($RTMReleaseDate, $ChangedHistoryDate)"/> + <xsl:choose> + <xsl:when test="$date = 'notValidDate'" /> + <xsl:otherwise> + <include item="UpdateTitle"> + <parameter> + <xsl:value-of select="$date"/> + </parameter> + </include> + </xsl:otherwise> + </xsl:choose> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <!-- Process the markup added by MTMarkup tool --> + <xsl:template match="ddue:span"> + <xsl:choose> + <xsl:when test="@class='tgtSentence' or @class='srcSentence'"> + <span> + <xsl:copy-of select="@*" /> + <xsl:apply-templates /> + </span> + </xsl:when> + </xsl:choose> + </xsl:template> + </xsl:stylesheet> diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/utilities_metadata.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/utilities_metadata.xsl index 8869703..361c185 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/utilities_metadata.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/utilities_metadata.xsl @@ -44,7 +44,12 @@ </xsl:when> </xsl:choose> - <xsl:call-template name="mshelpCodelangAttributes" /> + <!-- Assembly Version--> + <xsl:if test="$api-group != 'namespace'"> + <MSHelp:Attr Name="AssemblyVersion" Value="{/document/reference/containers/library/assemblydata/@version}" /> + </xsl:if> + + <xsl:call-template name="codelangAttributes" /> <xsl:call-template name="versionMetadata" /> <xsl:call-template name="authoredMetadata" /> </xml> @@ -502,11 +507,6 @@ </xsl:choose> </xsl:template> - <xsl:template name="codeLang"> - <xsl:param name="codeLang" /> - <MSHelp:Attr Name="codelang" Value="{$codeLang}" /> - </xsl:template> - <!-- make a semicolon-separated list of the $languages--> <xsl:template name="languagesList"> <xsl:for-each select="$languages/language"> @@ -531,6 +531,11 @@ </xsl:variable> <xsl:choose> <xsl:when test="normalize-space($devlang)=''"/> + <xsl:when test="$devlang = 'VJ#'"> + <xsl:if test="boolean(/document/reference/versions/versions[@name='netfw']//version[not(@name='netfw35')])"> + <MSHelp:Attr Name="DevLang" Value="{$devlang}" /> + </xsl:if> + </xsl:when> <xsl:otherwise> <MSHelp:Attr Name="DevLang" Value="{$devlang}" /> </xsl:otherwise> @@ -784,6 +789,7 @@ </xsl:when> <!-- constructor (or constructor overload) topics get unqualified sub-entries using the type names --> <xsl:when test="($topic-group='api' and $api-subgroup='constructor' and not(/document/reference/memberdata/@overload)) or ($topic-subgroup='overload' and $api-subgroup = 'constructor')"> + <xsl:variable name="typeSubgroup" select="/document/reference/containers/type/apidata/@subgroup" /> <xsl:variable name="names"> <xsl:for-each select="/document/reference/containers/type"> <xsl:call-template name="textNames" /> @@ -793,7 +799,7 @@ <MSHelp:Keyword Index="K"> <includeAttribute name="Term" item="constructorIndexEntry"> <parameter> - <include item="{$api-subgroup}IndexEntry"> + <include item="{$typeSubgroup}IndexEntry"> <parameter> <xsl:value-of select="." /> </parameter> diff --git a/tools/Sandcastle/Presentation/vs2005/transforms/utilities_reference.xsl b/tools/Sandcastle/Presentation/vs2005/transforms/utilities_reference.xsl index 2137e5f..55a5f59 100644 --- a/tools/Sandcastle/Presentation/vs2005/transforms/utilities_reference.xsl +++ b/tools/Sandcastle/Presentation/vs2005/transforms/utilities_reference.xsl @@ -16,6 +16,7 @@ <xsl:param name="key" /> <xsl:param name="metadata" value="false" /> <xsl:param name="languages">false</xsl:param> + <xsl:param name="componentizeBy">namespace</xsl:param> <xsl:include href="utilities_metadata.xsl" /> <xsl:include href="xamlSyntax.xsl"/> @@ -421,11 +422,33 @@ <meta name="container"> <xsl:attribute name="content"> <xsl:choose> - <xsl:when test="normalize-space(/document/reference/containers/library/@assembly)"> - <xsl:value-of select="normalize-space(/document/reference/containers/library/@assembly)"/> + <xsl:when test="$componentizeBy='assembly'"> + <xsl:choose> + <xsl:when test="normalize-space(/document/reference/containers/library/@assembly)"> + <xsl:value-of select="normalize-space(/document/reference/containers/library/@assembly)"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>Namespaces</xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:when> + <!-- the default is to componentize by namespace. For non-componentized builds, the <meta name="container"> value is ignored. --> <xsl:otherwise> - <xsl:text>Namespaces</xsl:text> + <xsl:choose> + <!-- get the namespace name from containers/namespace/@api for most members --> + <xsl:when test="normalize-space(substring-after(/document/reference/containers/namespace/@api,':'))"> + <xsl:value-of select="normalize-space(substring-after(/document/reference/containers/namespace/@api,':'))"/> + </xsl:when> + <!-- use 'default_namespace' for members in the default namespace (where namespace/@api == 'N:') --> + <xsl:when test="normalize-space(/document/reference/containers/namespace/@api)"><xsl:text>default_namespace</xsl:text></xsl:when> + <!-- for the default namespace topic, use 'default_namespace' --> + <xsl:when test="/document/reference/apidata[@group='namespace' and @name='']"><xsl:text>default_namespace</xsl:text></xsl:when> + <!-- for other namespace topics, get the name from apidata/@name --> + <xsl:when test="/document/reference/apidata/@group='namespace'"> + <xsl:value-of select="normalize-space(/document/reference/apidata/@name)"/> + </xsl:when> + <xsl:otherwise><xsl:text>unknown</xsl:text></xsl:otherwise> + </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:attribute> @@ -538,6 +561,10 @@ <!-- the topic subgroup (e.g. "methods") determines the title --> <xsl:value-of select="$topic-subgroup" /> </xsl:when> + <!-- overload root titles --> + <xsl:when test="$topic-group='root'"> + <xsl:value-of select="$topic-group" /> + </xsl:when> </xsl:choose> <xsl:text>TopicTitle</xsl:text> </xsl:attribute> @@ -600,6 +627,10 @@ <!-- the topic subgroup (e.g. "methods") determines the title --> <xsl:value-of select="$topic-subgroup" /> </xsl:when> + <!-- overload root titles --> + <xsl:when test="$topic-group='root'"> + <xsl:value-of select="$topic-group" /> + </xsl:when> </xsl:choose> <xsl:text>TopicTitle</xsl:text> <!--</xsl:otherwise> @@ -630,11 +661,11 @@ <div id="mainSection"> <div id="mainBody"> - <div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"> - <include item="header" /> - </div> - - <!--<xsl:call-template name="head" />--> + <div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()"/> + + <!-- 'header' shared content item is used to show optional boilerplate at the top of the topic's scrolling region, e.g. pre-release boilerplate --> + <include item="header" /> + <xsl:call-template name="body" /> </div> <xsl:call-template name="foot" /> @@ -642,10 +673,6 @@ </xsl:template> - <!--<xsl:template name="head"> - <include item="header" /> - </xsl:template>--> - <xsl:template name="syntaxBlocks"> <xsl:for-each select="/document/syntax/div[@codeLanguage]"> @@ -927,7 +954,7 @@ <xsl:if test="element[memberdata[@visibility='private'] and proceduredata[@virtual = 'true']]"> <xsl:call-template name="memberlistSection"> <xsl:with-param name="headerGroup">ExplicitInterfaceImplementation</xsl:with-param> - <xsl:with-param name="members" select="element[memberdata[@visibility='private'] and proceduredata[@virtual = 'true']]" /> + <xsl:with-param name="members" select="element[.//memberdata[@visibility='private'] and .//proceduredata[@virtual = 'true']]" /> </xsl:call-template> </xsl:if> @@ -1111,6 +1138,21 @@ </xsl:choose> </xsl:template> + <xsl:template name="IsMemberExplicit"> + <xsl:choose> + <xsl:when test="element"> + <xsl:for-each select="element"> + <xsl:call-template name="IsMemberExplicit"/> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:if test="memberdata[@visibility='private'] and proceduredata[@virtual = 'true']"> + <xsl:text>yes</xsl:text> + </xsl:if> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template match="element" mode="memberlistRow"> <xsl:param name="showParameters" select="'false'" /> <xsl:variable name="notsupportedOnNetfw"> @@ -1140,6 +1182,9 @@ <xsl:variable name="privateMember"> <xsl:call-template name="IsMemberPrivate"/> </xsl:variable> + <xsl:variable name="explicitMember"> + <xsl:call-template name="IsMemberExplicit" /> + </xsl:variable> <!-- do not show non-static members of static types --> <xsl:if test=".//memberdata/@static='true' or not(/document/reference/typedata[@abstract='true' and @sealed='true'])"> <tr> @@ -1154,7 +1199,7 @@ <xsl:if test="normalize-space($privateMember)!=''"> <xsl:text>private;</xsl:text> </xsl:if> - <xsl:if test="memberdata[@visibility='private'] and proceduredata[@virtual = 'true']"> + <xsl:if test="normalize-space($explicitMember) != ''"> <xsl:text>explicit;</xsl:text> </xsl:if> <xsl:if test="normalize-space($staticMember)!=''"> @@ -1504,7 +1549,7 @@ <xsl:param name="library" select="/document/reference/containers/library"/> <include item="assemblyNameAndModule"> <parameter> - <span data="assembly"> + <span sdata="assembly"> <xsl:value-of select="$library/@assembly"/> </span> </parameter> @@ -1664,6 +1709,7 @@ <xsl:for-each select="ancestors/type"> <xsl:sort select="position()" data-type="number" order="descending" /> + <!-- <xsl:sort select="@api"/> --> <xsl:call-template name="indent"> <xsl:with-param name="count" select="position()" /> @@ -1696,6 +1742,7 @@ <xsl:otherwise> <xsl:for-each select="descendents/type"> + <xsl:sort select="@api" /> <xsl:call-template name="indent"> <xsl:with-param name="count" select="$ancestorCount + 2" /> </xsl:call-template> diff --git a/tools/Sandcastle/ProductionTools/AggregateByNamespace.exe b/tools/Sandcastle/ProductionTools/AggregateByNamespace.exe Binary files differindex 66f7cd8..6f387c1 100644 --- a/tools/Sandcastle/ProductionTools/AggregateByNamespace.exe +++ b/tools/Sandcastle/ProductionTools/AggregateByNamespace.exe diff --git a/tools/Sandcastle/ProductionTools/BuildAssembler.exe b/tools/Sandcastle/ProductionTools/BuildAssembler.exe Binary files differindex 2816d64..d25314f 100644 --- a/tools/Sandcastle/ProductionTools/BuildAssembler.exe +++ b/tools/Sandcastle/ProductionTools/BuildAssembler.exe diff --git a/tools/Sandcastle/ProductionTools/BuildAssemblerLibrary.dll b/tools/Sandcastle/ProductionTools/BuildAssemblerLibrary.dll Binary files differindex 8ef4359..e1da13c 100644 --- a/tools/Sandcastle/ProductionTools/BuildAssemblerLibrary.dll +++ b/tools/Sandcastle/ProductionTools/BuildAssemblerLibrary.dll diff --git a/tools/Sandcastle/ProductionTools/BuildComponents.dll b/tools/Sandcastle/ProductionTools/BuildComponents.dll Binary files differindex 3e556a0..f5be925 100644 --- a/tools/Sandcastle/ProductionTools/BuildComponents.dll +++ b/tools/Sandcastle/ProductionTools/BuildComponents.dll diff --git a/tools/Sandcastle/ProductionTools/ChmBuilder.config b/tools/Sandcastle/ProductionTools/ChmBuilder.config index 4382125..5c0b7b8 100644 --- a/tools/Sandcastle/ProductionTools/ChmBuilder.config +++ b/tools/Sandcastle/ProductionTools/ChmBuilder.config @@ -2,10 +2,23 @@ <configuration> <languages> <language id="1033" codepage="65001" name="0x409 English (United States)" /> + <language id="1028" codepage="950" name="0x404 Chinese (Taiwan)" /> + <language id="1029" codepage="1250" name="0x405 Czech" /> + <language id="1038" codepage="1250" name="0x40e Hungarian" /> + <language id="1041" codepage="932" name="0x411 Japanese" /> + <language id="1042" codepage="949" name="0x412 Korean" /> + <language id="1045" codepage="1250" name="0x415 Polish" /> + <language id="1049" codepage="1251" name="0x419 Russian" /> + <language id="1055" codepage="1254" name="0x41f Turkish" /> <language id="2052" codepage="936" name="0x804 Chinese (PRC)" /> </languages> - <!-- {0}:projectName, {1}:defaultTopic, {2}:Language --> + + <chmTitles> + <title projectName="Test">Chm Test build</title> + </chmTitles> + + <!-- {0}:projectName, {1}:defaultTopic, {2}:Language, {3}:Title --> <hhpTemplate> <line>[OPTIONS]</line> <!-- @@ -18,7 +31,7 @@ <line>Default Topic={1}</line> <line>Full-text search=Yes</line> <line>Language={2}</line> - <line>Title={0}</line> + <line>Title={3}</line> <line>[FILES]</line> <line>icons\*.gif</line> diff --git a/tools/Sandcastle/ProductionTools/ChmBuilder.exe b/tools/Sandcastle/ProductionTools/ChmBuilder.exe Binary files differindex 1896cb1..bf93e8a 100644 --- a/tools/Sandcastle/ProductionTools/ChmBuilder.exe +++ b/tools/Sandcastle/ProductionTools/ChmBuilder.exe diff --git a/tools/Sandcastle/ProductionTools/CommandLine.dll b/tools/Sandcastle/ProductionTools/CommandLine.dll Binary files differindex b569b0a..49b2409 100644 --- a/tools/Sandcastle/ProductionTools/CommandLine.dll +++ b/tools/Sandcastle/ProductionTools/CommandLine.dll diff --git a/tools/Sandcastle/ProductionTools/CopyComponents.dll b/tools/Sandcastle/ProductionTools/CopyComponents.dll Binary files differnew file mode 100644 index 0000000..00d8213 --- /dev/null +++ b/tools/Sandcastle/ProductionTools/CopyComponents.dll diff --git a/tools/Sandcastle/ProductionTools/DBCSFix.exe b/tools/Sandcastle/ProductionTools/DBCSFix.exe Binary files differindex bcebc50..294b399 100644 --- a/tools/Sandcastle/ProductionTools/DBCSFix.exe +++ b/tools/Sandcastle/ProductionTools/DBCSFix.exe diff --git a/tools/Sandcastle/ProductionTools/MrefBuilder.exe b/tools/Sandcastle/ProductionTools/MrefBuilder.exe Binary files differindex e0fe3c7..f4242e9 100644 --- a/tools/Sandcastle/ProductionTools/MrefBuilder.exe +++ b/tools/Sandcastle/ProductionTools/MrefBuilder.exe diff --git a/tools/Sandcastle/ProductionTools/SegregateByAssembly.exe b/tools/Sandcastle/ProductionTools/SegregateByAssembly.exe Binary files differindex e7632b8..22a47b3 100644 --- a/tools/Sandcastle/ProductionTools/SegregateByAssembly.exe +++ b/tools/Sandcastle/ProductionTools/SegregateByAssembly.exe diff --git a/tools/Sandcastle/ProductionTools/SegregateByNamespace.exe b/tools/Sandcastle/ProductionTools/SegregateByNamespace.exe Binary files differnew file mode 100644 index 0000000..e1055c3 --- /dev/null +++ b/tools/Sandcastle/ProductionTools/SegregateByNamespace.exe diff --git a/tools/Sandcastle/ProductionTools/SyntaxComponents.dll b/tools/Sandcastle/ProductionTools/SyntaxComponents.dll Binary files differindex 27e100b..5601a32 100644 --- a/tools/Sandcastle/ProductionTools/SyntaxComponents.dll +++ b/tools/Sandcastle/ProductionTools/SyntaxComponents.dll diff --git a/tools/Sandcastle/ProductionTools/VersionBuilder.exe b/tools/Sandcastle/ProductionTools/VersionBuilder.exe Binary files differindex cad3e4d..6e639e1 100644 --- a/tools/Sandcastle/ProductionTools/VersionBuilder.exe +++ b/tools/Sandcastle/ProductionTools/VersionBuilder.exe diff --git a/tools/Sandcastle/ProductionTools/XslTransform.exe b/tools/Sandcastle/ProductionTools/XslTransform.exe Binary files differindex cc23488..19a0221 100644 --- a/tools/Sandcastle/ProductionTools/XslTransform.exe +++ b/tools/Sandcastle/ProductionTools/XslTransform.exe diff --git a/tools/Sandcastle/ProductionTools/scbuild.ps1 b/tools/Sandcastle/ProductionTools/scbuild.ps1 index 62461c4..da26199 100644 --- a/tools/Sandcastle/ProductionTools/scbuild.ps1 +++ b/tools/Sandcastle/ProductionTools/scbuild.ps1 @@ -25,7 +25,7 @@ # -DxRoot {path} -- alternate DxRoot. Default: DxRoot environment variable. # # -Framework {version} -- build depends on framework version specified. Currently -# supported: 2.0, 3.0. Default: no framework dependencies. +# supported: 2.0, 3.0, 3.5. Default: no framework dependencies. # # -Lcid {version} -- locale ID for help file. Default: 1033 # @@ -36,6 +36,8 @@ # -Name {path-name} -- name of output file (or directory for Website builds). # Default: The name and location of the first assembly listed. # +# -ScriptSharp -- remove topics that do not apply for Script# +# # -Sources {files} -- comma separated list of files that should be added to the # output, both assemblies and related comment files. To build, you must # specify at least one assembly and comment file. @@ -77,7 +79,7 @@ param ( [Switch]$BuildHxS, [Switch]$BuildWebsite, [Switch]$Clean, - [Switch]$Test, + [Switch]$Test, # Resources, Folders, Options [String]$BuildAssemblerConfig, @@ -92,7 +94,9 @@ param ( [String]$Style, [String]$TempDir, [String]$WebBuildConfig, - [String]$WebTemplate + [String]$WebTemplate, + [Switch]$ScriptSharp + ) # @@ -169,6 +173,8 @@ function Init { InitOption BuildHxS $false InitOption BuildWebSite $false InitOption Test $false + InitOption ScriptSharp $false + if (-not ($Clean -or $BuildChm -or $BuildHxs -or $BuildWebsite -or $Test)) { FatalError "You must specify a build action: -Clean, -BuildChm, -BuildHxs, -BuildWebsite." } @@ -390,16 +396,22 @@ function BuildWebsite { # Generate reflection data if the current style does not match the style the caller is # looking for. # +# The list of dependencies is split up and seperated by a comma to be passed to mrefbuilder. +# function GenerateReflectionData { $fdirs = $($FrameworkDirs[$Framework]) if ($fdirs -is [String]) { $fdirs = @($fdirs) + } + + if($fdirs) { + foreach ($fdir in $fdirs) { + GenerateDependencyReflectionData (get-childitem -r -include "*.dll" $fdir) $TempDir\ReflectionData\Framework "" $false + } } - foreach ($fdir in $fdirs) { - GenerateDependencyReflectionData (get-childitem -r -include "*.dll" $fdir) $TempDir\ReflectionData\Framework - } - GenerateDependencyReflectionData $Dependencies "$TempDir\ReflectionData\Dependencies" - GenerateTargetReflectionData $Targets "$TempDir\ReflectionData\targets.xml" + + GenerateDependencyReflectionData $Dependencies "$TempDir\ReflectionData\Dependencies" $Dependencies $ScriptSharp + GenerateTargetReflectionData $Targets "$TempDir\ReflectionData\targets.xml" $Dependencies $ScriptSharp } @@ -408,7 +420,7 @@ function GenerateReflectionData { # dependencies. The data is used as is from MrefBuilder. No post processing occurs. The # file is generated only if the output doesn't exist already. # -function GenerateDependencyReflectionData($assemblies, $outputDir) { +function GenerateDependencyReflectionData($assemblies, $outputDir, $dependencyAssemblies, $applyScriptSharp) { if ($assemblies -is [String]) { $assemblies = ExpandWildcards $assemblies } @@ -416,7 +428,7 @@ function GenerateDependencyReflectionData($assemblies, $outputDir) { foreach ($pn in $assemblies) { $outputFile = "$outputDir\$([IO.Path]::ChangeExtension($pn.Name, '.xml'))" if (-not (test-path $outputFile)) { - GenerateTargetReflectionData $pn $outputFile + GenerateTargetReflectionData $pn $outputFile $dependencyAssemblies $applyScriptSharp copy-item -ea SilentlyContinue $([IO.Path]::ChangeExtension($pn.FullName, '.xml')) $TempDir\Comments } } @@ -429,16 +441,32 @@ function GenerateDependencyReflectionData($assemblies, $outputDir) { # assemblies. The data for all target assemblies is combined into a single file and then # post processed using different transforms depending on doc style. # -function GenerateTargetReflectionData($assemblies, $outputFile) { +# Dependencies are passed to mrefbuilder if there are any. +# +function GenerateTargetReflectionData($assemblies, $outputFile, $dependencyAssemblies, $applyScriptSharp) { if ($assemblies -is [String]) { $assemblies = ExpandWildcards $assemblies } WriteInfo "Generate reflection data for: $assemblies" $targetFiles = [String]::Join(" ", ($assemblies | foreach {"`"$_`""})) $tmpName = "$TempDir\tmp.xml" - &$MrefBuilder $targetFiles /out:$tmpName + + if ($dependencyAssemblies) { + $dependencyFiles = [String]::Join(",", ($dependencyAssemblies | foreach {"`"$_`""})) + &$MrefBuilder /dep:$dependencyFiles /out:$tmpName $targetFiles + } else { + &$MrefBuilder /out:$tmpName $targetFiles + } + + if ($applyScriptSharp) { + $tmpFixedName = "$TempDir\tmp-Fixed.xml" + ApplyFixScriptSharp $tmpName $tmpFixedName + SafeDelete $tmpName + $tmpName = $tmpFixedName + } + PostProcessReflectionData $tmpName $outputFile - SafeDelete $tmpName + SafeDelete $tmpName } # @@ -449,6 +477,15 @@ function PostProcessReflectionData { FatalError "Doc Model must define a PostProcessReflectionData function." } +# +# ScriptSharp requires an additional transform to remove unneeded elements. +# +function ApplyFixScriptSharp($tmpName, $tmpFixedName) { + &$XslTransform $tmpName ` + /xsl:$DxRoot\ProductionTransforms\FixScriptSharp.xsl ` + /out:$tmpFixedName +} + # # GenerateManifest() -- creates a manifest from the reflection data. This requires @@ -610,6 +647,7 @@ function Test { echo "+ Mixin: $Mixin" echo "+ Name: $Name" echo "+ [OutputDir]: $OutputDir" + echo "+ ScriptSharp: $ScriptSharp" echo "+ Sources: $Sources" echo "+ Style: $Style" echo "+ [Targets]: $Targets" diff --git a/tools/Sandcastle/ProductionTransforms/ApplyPrototypeDocModel.xsl b/tools/Sandcastle/ProductionTransforms/ApplyPrototypeDocModel.xsl index bdfde07..bf7d441 100644 --- a/tools/Sandcastle/ProductionTransforms/ApplyPrototypeDocModel.xsl +++ b/tools/Sandcastle/ProductionTransforms/ApplyPrototypeDocModel.xsl @@ -128,7 +128,7 @@ <xsl:template name="projectTopic"> <api id="R:{$project}"> - <topicdata group="list" subgroup="namespaces" /> + <topicdata group="root" /> <elements> <xsl:for-each select="/*/apis/api[apidata/@group='namespace']"> <element api="{@id}" /> diff --git a/tools/Sandcastle/ProductionTransforms/ApplyVSDocModel.xsl b/tools/Sandcastle/ProductionTransforms/ApplyVSDocModel.xsl index d5a3751..867dcf6 100644 --- a/tools/Sandcastle/ProductionTransforms/ApplyVSDocModel.xsl +++ b/tools/Sandcastle/ProductionTransforms/ApplyVSDocModel.xsl @@ -17,6 +17,7 @@ <xsl:key name="index" match="/reflection/apis/api" use="@id" /> + <xsl:variable name="root" select="/" /> <xsl:template match="/"> <reflection> <xsl:apply-templates select="/reflection/assemblies" /> @@ -53,6 +54,7 @@ <xsl:variable name="subsubgroup" select="apidata/@subsubgroup"/> <xsl:variable name="typeId" select="containers/type/@api"/> <xsl:variable name="isEII" select="proceduredata/@eii"/> + <xsl:variable name="eiiTypeId" select="implements/member/type/@api" /> <api> <xsl:copy-of select="@*"/> <topicdata group="api"> @@ -60,6 +62,11 @@ <!-- enum members do not get separate topics; mark them so they are excluded from the manifest --> <xsl:attribute name="notopic"/> </xsl:if> + <xsl:if test="proceduredata[@eii='true']"> + <xsl:attribute name="eiiName"> + <xsl:value-of select="concat(key('index', $eiiTypeId)/apidata/@name, '.', $name)"/> + </xsl:attribute> + </xsl:if> </topicdata> <xsl:for-each select="*"> <xsl:choose> @@ -70,6 +77,7 @@ <containers> <library> <xsl:copy-of select="library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> <noAptca/> </library> <xsl:copy-of select="namespace"/> @@ -77,16 +85,18 @@ </containers> </xsl:when> <xsl:otherwise> - <xsl:copy-of select="."/> + <containers> + <library> + <xsl:copy-of select="library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> + <xsl:copy-of select="namespace"/> + <xsl:copy-of select="type"/> + </containers> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="local-name(.)='memberdata'"> - <xsl:choose> - <xsl:when test="$isEII='true'"> - <xsl:copy-of select="."/> - </xsl:when> - <xsl:otherwise> <memberdata> <xsl:copy-of select="@*"/> <!-- if the member is overloaded, add @overload = id of overload topic, if any --> @@ -96,11 +106,21 @@ <xsl:otherwise> <xsl:variable name="siblingElements" select="key('index',$typeId)/elements"/> <xsl:variable name="siblingApiInfo" select="key('index',$siblingElements/element[not(apidata)]/@api) | $siblingElements/element[apidata]" /> - <xsl:variable name="overloadSet" select="$siblingApiInfo[not(proceduredata/@eii='true') and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + + <xsl:variable name="overloadSet" > + <xsl:choose> + <xsl:when test="$isEII='true'"> + <xsl:copy-of select="$siblingApiInfo[proceduredata/@eii='true' and implements/member/type/@api=$eiiTypeId and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$siblingApiInfo[not(proceduredata/@eii='true') and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:variable name="signatureSet"> <xsl:call-template name="GetSignatureSet"> <xsl:with-param name="name" select="$name" /> - <xsl:with-param name="overloadSet" select="$overloadSet"/> + <xsl:with-param name="overloadSet" select="msxsl:node-set($overloadSet)"/> <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> </xsl:variable> @@ -108,21 +128,32 @@ <!-- the api is overloaded, so add @overload = idOfOverloadTopic --> <xsl:attribute name="overload"> <xsl:call-template name="overloadId"> - <xsl:with-param name="typeId" select="$typeId"/> + <xsl:with-param name="typeId" select="$typeId" /> <xsl:with-param name="name" select="$name"/> + <xsl:with-param name="isEII" select="$isEII"/> + <xsl:with-param name="eiiFullName"> + <!-- for EII members, apidata/@name is just the member's base name, e.g. "OnDragDrop" + but we need the full name of the implemented member, e.g. "System#Windows#Forms#IDropTarget#OnDragDrop" --> + <xsl:if test="$isEII='true'"> + <!-- strip off any parameters from the end of the id --> + <xsl:variable name="idWithoutParams"> + <xsl:call-template name="RemoveParametersFromId"/> + </xsl:variable> + <xsl:variable name="containingTypeName" select="substring(containers/type/@api,3)"/> + <!-- remove the containing type name from the beginning of the member's name --> + <xsl:value-of select="substring-after($idWithoutParams,$containingTypeName)"/> + </xsl:if> + </xsl:with-param> <xsl:with-param name="subgroup" select="$subgroup"/> - <xsl:with-param name="subsubgroup" select="$subsubgroup"/> + <xsl:with-param name="subsubgroup" select="$subsubgroup"/> </xsl:call-template> </xsl:attribute> </xsl:if> - </xsl:otherwise> </xsl:choose> <!-- memberdata shouldn't have any children, but copy just in case --> <xsl:copy-of select="*"/> </memberdata> - </xsl:otherwise> - </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:copy-of select="."/> @@ -185,6 +216,17 @@ </descendents> </family> </xsl:when> + <xsl:when test="local-name(.)='containers'"> + <containers> + <xsl:variable name="assembly" select="library/@assembly"/> + <library> + <xsl:copy-of select="library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> + <xsl:copy-of select="namespace"/> + <xsl:copy-of select="type"/> + </containers> + </xsl:when> <xsl:otherwise> <xsl:copy-of select="."/> </xsl:otherwise> @@ -236,7 +278,15 @@ <element api="{@api}" /> </xsl:for-each> </elements> - <xsl:copy-of select="containers" /> + <containers> + <xsl:variable name="assembly" select="containers/library/@assembly"/> + <library> + <xsl:copy-of select="containers/library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> + <xsl:copy-of select="containers/namespace"/> + <xsl:copy-of select="containers/type"/> + </containers> </api> </xsl:if> @@ -257,7 +307,15 @@ <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> </xsl:for-each> - <xsl:copy-of select="containers" /> + <containers> + <xsl:variable name="assembly" select="containers/library/@assembly"/> + <library> + <xsl:copy-of select="containers/library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> + <xsl:copy-of select="containers/namespace"/> + <xsl:copy-of select="containers/type"/> + </containers> </api> </xsl:if> @@ -318,6 +376,20 @@ </xsl:template> + <!-- --> + <xsl:template name="RemoveParametersFromId"> + <xsl:variable name="memberId" select="@id | @api"/> + <xsl:variable name="paramString" select="substring-after($memberId,'(')"/> + <xsl:choose> + <xsl:when test="boolean($paramString)"> + <xsl:value-of select="substring-before($memberId,'(')"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$memberId"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <!-- overload topics --> <xsl:template name="overloadTopics"> @@ -327,28 +399,36 @@ <xsl:variable name="declaredPrefix" select="concat(substring($typeId,2), '.')"/> <xsl:for-each select="$members"> - <xsl:variable name="name" select="apidata/@name" /> + <xsl:variable name="name" select="apidata/@name"/> <xsl:variable name="memberId" select="@id | @api"/> <xsl:variable name="subgroup" select="apidata/@subgroup" /> <xsl:variable name="subsubgroup" select="apidata/@subsubgroup" /> + <xsl:variable name="eiiTypeId" select="implements/member/type/@api" /> + <xsl:variable name="isEII" select="proceduredata/@eii"/> - <!-- EII members are not treated as overloads --> - <xsl:if test="not(proceduredata/@eii='true')"> - <!-- get the set of non-EII members with same name and subgroup --> - <xsl:variable name="overloadSet" select="$members[not(proceduredata/@eii='true') and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + <xsl:variable name="overloadSet" > + <xsl:choose> + <xsl:when test="$isEII='true'"> + <xsl:copy-of select="$members[proceduredata/@eii='true' and implements/member/type/@api=$eiiTypeId and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$members[not(proceduredata/@eii='true') and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> - <!-- are there any declared members in the overload set? --> - <xsl:variable name="declaredMembers" select="$overloadSet[starts-with(substring(@id,2),$declaredPrefix)]" /> + <!-- are there any declared members in the overload set? --> + <xsl:variable name="declaredMembers" select="msxsl:node-set($overloadSet)/*[starts-with(substring(@id,2),$declaredPrefix)]" /> <!-- if more than one member in overloadSet, add an overload topic if necessary --> - <xsl:if test="(count($overloadSet) > 1) and $overloadSet[1][@id=$memberId or @api=$memberId]"> + <xsl:if test="(count(msxsl:node-set($overloadSet)/*) > 1) and msxsl:node-set($overloadSet)/*[1][@id=$memberId or @api=$memberId]"> <!-- When merging multiple versions, an overload set may have multiple members with the same signature, e.g. when one version inherits a member and another version overrides it. We want an overload topic only when there are multiple signatures. --> <!-- get the set of unique signatures for this overload set --> <xsl:variable name="signatureSet"> <xsl:call-template name="GetSignatureSet"> - <xsl:with-param name="overloadSet" select="$overloadSet"/> + <xsl:with-param name="overloadSet" select="msxsl:node-set($overloadSet)"/> <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> </xsl:variable> @@ -358,18 +438,55 @@ <!-- don't need an overload topic if all overloads are inherited and config'd to omit overload topics when all are inherited --> <xsl:when test="(not(boolean($declaredMembers)) and $IncludeInheritedOverloadTopics='false')"/> <xsl:otherwise> + <api> <xsl:attribute name="id"> <xsl:call-template name="overloadId"> - <xsl:with-param name="typeId" select="$typeId"/> + <xsl:with-param name="typeId" select="$typeId" /> <xsl:with-param name="name" select="$name"/> + <xsl:with-param name="isEII" select="$isEII"/> + <xsl:with-param name="eiiFullName"> + <!-- for EII members, apidata/@name is just the member's base name, e.g. "OnDragDrop" + but we need the full name of the implemented member, e.g. "System#Windows#Forms#IDropTarget#OnDragDrop" --> + <xsl:if test="$isEII='true'"> + <!-- strip off any parameters from the end of the id --> + <xsl:variable name="idWithoutParams"> + <xsl:call-template name="RemoveParametersFromId"/> + </xsl:variable> + <xsl:variable name="containingTypeName" select="substring(containers/type/@api,3)"/> + <!-- remove the containing type name from the beginning of the member's name --> + <xsl:value-of select="substring-after($idWithoutParams,$containingTypeName)"/> + </xsl:if> + </xsl:with-param> <xsl:with-param name="subgroup" select="$subgroup"/> - <xsl:with-param name="subsubgroup" select="$subsubgroup"/> + <xsl:with-param name="subsubgroup" select="$subsubgroup"/> </xsl:call-template> </xsl:attribute> <topicdata name="{apidata/@name}" group="list" subgroup="overload" memberSubgroup="{$subgroup}" pseudo="true" allMembersTopicId="{$allMembersTopicId}"> <xsl:if test="not(boolean($declaredMembers))"> <xsl:attribute name="allInherited">true</xsl:attribute> + <xsl:attribute name="parentTopicId"> + <xsl:call-template name="overloadId"> + <xsl:with-param name="typeId" select="$typeId" /> + <xsl:with-param name="name" select="$name"/> + <xsl:with-param name="isEII" select="$isEII"/> + <xsl:with-param name="eiiFullName"> + <!-- for EII members, apidata/@name is just the member's base name, e.g. "OnDragDrop" + but we need the full name of the implemented member, e.g. "System#Windows#Forms#IDropTarget#OnDragDrop" --> + <xsl:if test="$isEII='true'"> + <!-- strip off any parameters from the end of the id --> + <xsl:variable name="idWithoutParams"> + <xsl:call-template name="RemoveParametersFromId"/> + </xsl:variable> + <xsl:variable name="containingTypeName" select="substring(containers/type/@api,3)"/> + <!-- remove the containing type name from the beginning of the member's name --> + <xsl:value-of select="substring-after($idWithoutParams,$containingTypeName)"/> + </xsl:if> + </xsl:with-param> + <xsl:with-param name="subgroup" select="$subgroup"/> + <xsl:with-param name="subsubgroup" select="$subsubgroup"/> + </xsl:call-template> + </xsl:attribute> </xsl:if> </topicdata> <xsl:copy-of select="apidata" /> @@ -382,11 +499,23 @@ <!-- containers --> <xsl:choose> <xsl:when test="boolean($declaredMembers)"> - <xsl:copy-of select="$declaredMembers[1]/containers"/> + <containers> + <xsl:variable name="assembly" select="$declaredMembers[1]/containers/library/@assembly"/> + <library> + <xsl:copy-of select="$declaredMembers[1]/containers/library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> + <xsl:copy-of select="$declaredMembers[1]/containers/namespace"/> + <xsl:copy-of select="$declaredMembers[1]/containers/type"/> + </containers> </xsl:when> <xsl:otherwise> <containers> - <xsl:copy-of select="key('index',$typeId)/containers/library"/> + <xsl:variable name="assembly" select="key('index',$typeId)/containers/library/@assembly"/> + <library> + <xsl:copy-of select="key('index',$typeId)/containers/library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> <xsl:copy-of select="key('index',$typeId)/containers/namespace"/> <type api="{$typeId}"/> </containers> @@ -396,7 +525,6 @@ </xsl:otherwise> </xsl:choose> </xsl:if> - </xsl:if> </xsl:for-each> </xsl:template> @@ -408,7 +536,9 @@ </xsl:when> <xsl:otherwise> <xsl:variable name="elementId" select="@id"/> + <xsl:for-each select="$root"> <xsl:copy-of select="key('index', $typeId)/elements/element[@api=$elementId]"/> + </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:template> @@ -419,17 +549,19 @@ <xsl:param name="typeId"/> <xsl:choose> - <xsl:when test="count($overloadSet) = 1"> - <xsl:for-each select="$overloadSet"> + <xsl:when test="count($overloadSet/*) = 1"> + <xsl:for-each select="$overloadSet/*"> <xsl:call-template name="WriteElementNode"> <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> </xsl:for-each> </xsl:when> <xsl:otherwise> - <xsl:for-each select="$overloadSet"> + <xsl:for-each select="$overloadSet/*"> <xsl:sort select="count(parameters/parameter)"/> + <xsl:for-each select="$root"> <xsl:sort select="key('index', parameters/parameter[1]//type[1]/@api)/apidata/@name"/> + </xsl:for-each> <xsl:variable name="memberId" select="@id | @api"/> <xsl:variable name="signature"> <xsl:call-template name="GetSignature"> @@ -479,7 +611,9 @@ <xsl:copy-of select="*"/> </xsl:when> <xsl:otherwise> + <xsl:for-each select="$root"> <xsl:copy-of select="key('index', $typeId)/elements/element[@api=$primaryMemberId]/@*"/> + </xsl:for-each> </xsl:otherwise> </xsl:choose> <!-- for the secondary version groups, copy in the signatureset's latest member (if different from primary member) --> @@ -627,7 +761,10 @@ | elements/element[apidata[($subgroup='' and @subsubgroup=$subsubgroup) or ($subsubgroup='' and not(@subsubgroup) and @subgroup=$subgroup)]]"/> <!-- add a member list topic only if the type has declared members --> - <xsl:if test="count($declaredMembers) > 0"> + <!--<xsl:if test="count($declaredMembers) > 0">--> + + <!-- Fix for bug:365255, add a member list topic for all the type's members--> + <xsl:if test="count($members) > 0"> <api> <xsl:attribute name="id"> <xsl:value-of select="concat($topicSubgroup, '.', $typeId)"/> @@ -650,7 +787,15 @@ <xsl:with-param name="members" select="$members"/> <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> - <xsl:copy-of select="containers" /> + <containers> + <xsl:variable name="assembly" select="containers/library/@assembly"/> + <library> + <xsl:copy-of select="containers/library/@*"/> + <xsl:copy-of select="/*/assemblies/assembly[@name=$assembly]/assemblydata"/> + </library> + <xsl:copy-of select="containers/namespace"/> + <xsl:copy-of select="containers/type"/> + </containers> </api> </xsl:if> </xsl:template> @@ -662,43 +807,48 @@ <elements> <xsl:for-each select="$members"> - <xsl:variable name="name" select="apidata/@name" /> + <xsl:variable name="name" select="apidata/@name"/> <xsl:variable name="subgroup" select="apidata/@subgroup" /> <xsl:variable name="subsubgroup" select="apidata/@subsubgroup" /> <xsl:variable name="memberId" select="@id | @api"/> + <xsl:variable name="isEII" select="proceduredata/@eii"/> + <xsl:variable name="eiiTypeId" select="implements/member/type/@api"/> <xsl:choose> - <!-- EII members are not treated as overloads --> - <xsl:when test="proceduredata/@eii='true'"> - <xsl:call-template name="WriteElementNode"> - <xsl:with-param name="typeId" select="$typeId"/> - </xsl:call-template> - </xsl:when> - + <!-- field members cannot be overloaded, so skip the overload logic and just write the element node --> <xsl:when test="$subgroup='field'"> <xsl:call-template name="WriteElementNode"> <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> </xsl:when> - - <!-- for non-EII members, handle overloads and signature sets --> + + <!-- for members, handle overloads and signature sets --> <xsl:otherwise> - <!-- get the set of overloads: non-EII members with same name and subgroup --> - <xsl:variable name="overloadSet" select="$members[not(proceduredata/@eii='true') and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]"/> + <!-- get the set of overloads --> + <xsl:variable name="overloadSet" > + <xsl:choose> + <xsl:when test="$isEII='true'"> + <xsl:copy-of select="$members[proceduredata/@eii='true' and implements/member/type/@api=$eiiTypeId and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$members[not(proceduredata/@eii='true') and apidata[@name=$name and @subgroup=$subgroup and (@subsubgroup=$subsubgroup or (not(boolean($subsubgroup)) and not(@subsubgroup)))]]" /> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <!-- are there any declared members in the overload set? --> - <xsl:variable name="declaredMembers" select="$overloadSet[starts-with(substring(@id,2),$declaredPrefix)]" /> + <xsl:variable name="declaredMembers" select="msxsl:node-set($overloadSet)/*[starts-with(substring(@id,2),$declaredPrefix)]" /> <xsl:variable name="signatureSet"> <xsl:call-template name="GetSignatureSet"> - <xsl:with-param name="overloadSet" select="$overloadSet"/> + <xsl:with-param name="overloadSet" select="msxsl:node-set($overloadSet)"/> <xsl:with-param name="typeId" select="$typeId"/> </xsl:call-template> </xsl:variable> <!-- make sure we add to the list only once --> - <xsl:if test="$overloadSet[1][@id=$memberId or @api=$memberId]"> + <xsl:if test="msxsl:node-set($overloadSet)/*[1][@id=$memberId or @api=$memberId]"> <!-- When merging multiple versions, an overload set may have multiple members with the same signature, e.g. when one version inherits a member and another version overrides it. We want an overload topic only when there are multiple signatures. --> @@ -718,10 +868,24 @@ <element> <xsl:attribute name="api"> <xsl:call-template name="overloadId"> - <xsl:with-param name="typeId" select="$typeId"/> + <xsl:with-param name="typeId" select="$typeId" /> <xsl:with-param name="name" select="$name"/> + <xsl:with-param name="isEII" select="$isEII"/> + <xsl:with-param name="eiiFullName"> + <!-- for EII members, apidata/@name is just the member's base name, e.g. "OnDragDrop" + but we need the full name of the implemented member, e.g. "System#Windows#Forms#IDropTarget#OnDragDrop" --> + <xsl:if test="$isEII='true'"> + <!-- strip off any parameters from the end of the id --> + <xsl:variable name="idWithoutParams"> + <xsl:call-template name="RemoveParametersFromId"/> + </xsl:variable> + <xsl:variable name="containingTypeName" select="substring(containers/type/@api,3)"/> + <!-- remove the containing type name from the beginning of the member's name --> + <xsl:value-of select="substring-after($idWithoutParams,$containingTypeName)"/> + </xsl:if> + </xsl:with-param> <xsl:with-param name="subgroup" select="$subgroup"/> - <xsl:with-param name="subsubgroup" select="$subsubgroup"/> + <xsl:with-param name="subsubgroup" select="$subsubgroup"/> </xsl:call-template> </xsl:attribute> <xsl:copy-of select="msxsl:node-set($signatureSet)/*"/> @@ -740,7 +904,12 @@ <xsl:param name="name"/> <xsl:param name="subgroup"/> <xsl:param name="subsubgroup"/> + <xsl:param name="eiiFullName"/> + <xsl:param name="isEII"/> <xsl:choose> + <xsl:when test="$isEII='true'"> + <xsl:value-of select="concat('Overload:',substring($typeId,3),$eiiFullName)"/> + </xsl:when> <xsl:when test="$subgroup='constructor'"> <xsl:value-of select="concat('Overload:',substring($typeId,3),'.#ctor')"/> </xsl:when> diff --git a/tools/Sandcastle/ProductionTransforms/CreateHxt.xsl b/tools/Sandcastle/ProductionTransforms/CreateHxt.xsl new file mode 100644 index 0000000..47c4b03 --- /dev/null +++ b/tools/Sandcastle/ProductionTransforms/CreateHxt.xsl @@ -0,0 +1,91 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"> + <!-- project name something like "fxref" --> + <xsl:param name="projectName" /> + + <!-- can be assembly or namespace for HXT generation --> + <xsl:param name="createBy" /> + + <!-- Maximum project length allowed. Below is the default provided by paorear, bug 230840 --> + <xsl:param name="maxProjectNameLength" select="49" /> + + <xsl:output indent="yes" encoding="UTF-8" doctype-system="MS-Help://Hx/Resources/HelpTOC.dtd" /> + + <xsl:variable name="leftLength" select="$maxProjectNameLength div 2 - 1" /> + + <xsl:variable name="rightLength" select="$maxProjectNameLength - $leftLength - 2" /> + + <xsl:variable name="projectPrefix"> + <xsl:if test="boolean($projectName)"> + <xsl:value-of select="concat($projectName,'_')"/> + </xsl:if> + </xsl:variable> + + <xsl:template match="/"> + <HelpTOC DTDVersion="1.0"> + <xsl:choose> + <xsl:when test="$createBy = 'assembly'"> + <xsl:apply-templates select="/reflection/assemblies/assembly"> + <xsl:sort select="@name" /> + </xsl:apply-templates> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates select="/reflection/apis/api[apidata/@group='namespace']"> + <xsl:sort select="apidata/@name" /> + </xsl:apply-templates> + </xsl:otherwise> + </xsl:choose> + </HelpTOC> + </xsl:template> + + <!-- Apply the template for assembly level --> + <xsl:template match="assembly"> + <xsl:variable name="componentName"> + <xsl:call-template name="GetComponentName"> + <xsl:with-param name="initialName" select="concat($projectPrefix, @name)" /> + </xsl:call-template> + </xsl:variable> + + <HelpTOCNode NodeType="TOC" Url="{$componentName}" /> + </xsl:template> + + <!-- Apply the template for namespace level --> + <xsl:template match="api[apidata/@group='namespace']"> + + <xsl:variable name="componentName"> + + <xsl:call-template name="GetComponentName"> + <xsl:with-param name="initialName"> + <xsl:choose> + <xsl:when test="apidata/@name = ''"> + <xsl:value-of select="concat($projectPrefix, 'default_namespace')" /> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="concat($projectPrefix, apidata/@name)" /> + </xsl:otherwise> + </xsl:choose> + </xsl:with-param> + </xsl:call-template> + </xsl:variable> + + <HelpTOCNode NodeType="TOC" Url="{$componentName}" /> + + </xsl:template> + + <!-- logic to shorten component names if needed --> + <xsl:template name="GetComponentName"> + <xsl:param name="initialName" /> + <xsl:variable name="componentNameLength" select="string-length($initialName)" /> + <xsl:choose> + <xsl:when test="$componentNameLength > $maxProjectNameLength"> + <xsl:variable name="left" select="substring($initialName, 1, $leftLength)" /> + <xsl:variable name="right" select="substring($initialName, $componentNameLength - $rightLength)" /> + <xsl:value-of select="concat($left,'_',$right)" /> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$initialName" /> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + +</xsl:stylesheet> diff --git a/tools/Sandcastle/ProductionTransforms/CreateVSToc.xsl b/tools/Sandcastle/ProductionTransforms/CreateVSToc.xsl index 31842a4..8a48a3f 100644 --- a/tools/Sandcastle/ProductionTransforms/CreateVSToc.xsl +++ b/tools/Sandcastle/ProductionTransforms/CreateVSToc.xsl @@ -169,7 +169,7 @@ <!-- recurse to get declared child element topics, if any --> <xsl:for-each select="key('index', elements/*[starts-with(substring-after(@api,':'), $declaredPrefix)]/@api)"> <!-- sort the elements in a member list topic by name --> - <xsl:sort select="apidata/@name" /> + <xsl:sort select="topicdata/@eiiName | apidata/@name" /> <xsl:call-template name="AddMember"> <xsl:with-param name="declaredPrefix" select="$declaredPrefix"/> </xsl:call-template> diff --git a/tools/Sandcastle/ProductionTransforms/ReflectionToManifest.xsl b/tools/Sandcastle/ProductionTransforms/ReflectionToManifest.xsl index 3d13ab9..0e7e08a 100644 --- a/tools/Sandcastle/ProductionTransforms/ReflectionToManifest.xsl +++ b/tools/Sandcastle/ProductionTransforms/ReflectionToManifest.xsl @@ -1,21 +1,47 @@ <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.1"> - <xsl:output indent="yes" encoding="UTF-8" /> + <xsl:output indent="yes" encoding="UTF-8" /> - <xsl:key name="index" match="/reflection/apis/api" use="@id" /> + <xsl:param name="componentizeBy"/> - <xsl:template match="/"> - <topics> - <xsl:apply-templates select="/reflection/apis/api" /> - </topics> - </xsl:template> + <xsl:key name="index" match="/reflection/apis/api" use="containers/namespace/@api" /> + <xsl:key name="indexByAssembly" match="/reflection/apis/api[containers/library]" use="containers/library[1]/@assembly" /> - <!-- namespace and member topics --> - <xsl:template match="api"> + <xsl:template match="/"> + <topics> + <!-- process the root node --> + <xsl:apply-templates select="/reflection/apis/api[topicdata[@group='root']]" /> + <xsl:choose> + + <!-- sort by assembly --> + <xsl:when test="$componentizeBy='assembly'"> + <!-- loop through the assemblies and output the apis in each assembly --> + <xsl:for-each select="/reflection/assemblies/assembly"> + <xsl:apply-templates select="key('indexByAssembly',@name)" /> + </xsl:for-each> + <!-- process the namespace nodes, which may be associated with more than one assembly --> + <xsl:apply-templates select="/reflection/apis/api[apidata[@group='namespace']]" /> + </xsl:when> + + <!-- default is to sort by namespace --> + <xsl:otherwise> + <!-- process each namespace's api node, then process nodes for all the apis in the namespace --> + <xsl:for-each select="/reflection/apis/api[apidata[@group='namespace']]"> + <xsl:apply-templates select="." /> + <xsl:apply-templates select="key('index',@id)" /> + </xsl:for-each> + </xsl:otherwise> + + </xsl:choose> + </topics> + </xsl:template> + + <!-- namespace and member topics --> + <xsl:template match="api"> <xsl:if test="not(topicdata/@notopic)"> - <topic id="{@id}" /> + <topic id="{@id}"/> </xsl:if> - </xsl:template> + </xsl:template> </xsl:stylesheet> |