c# - Add a wrapper div to XSL XML -


I have the following XSL translators that are being used to generate some XHTML, XHTML generated in CX as XML form Is parsed so that it can be injected into another XHTML document. The problem is that XHTML is not a root XML node exposed from XLS, only the Sibling nodes (& lt; Table> element) I tried to manually add the div, but I got the error System.Xml.Xsl.XslLoadException : The top-level element 'div' can not contain an empty namespace, how can I add it using XSL so that all divisions of a div are all & lt; Table> s?

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" deprecated-prefix = prefix = "MSXL" xmlns: msxsl = "vase: schema-microsoft -com : Xslt "xmlns: msdata =" vase: schema-microsoft-com: xml-msdata "xmlns: xs =" http://www.w3.org/2001/XMLSchema "& gt; & Lt; Xsl: output method = "xml" indent = "yes" /> & Lt; Xsl: use the key name = "group" match = "/ new data reset / query result data" = "member report group4 description" /> & Lt; Xsl: Template Match = "/ New Data Set" & gt; & Lt; Xsl: apply-select templates = "queryarceladata [generate-id () = generate-id (key (" group ", member report graph 4 description) [1])" /> & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "stock" & gt; & Lt; / XSL: Templates & gt; & Lt; Div & gt; & Lt; Xsl: Template Match = "QueryRelated Data" & gt; & Lt; Table ID = "{Member ReportGroup4Description}" & gt; & Lt; TR & gt; & Lt; Th colspan = "6" scope = "col" & gt; Div align = "left" & gt; & Lt; H1 & gt; Store # & lt; Xsl: Select Value = "Member Report Group4Description" /> & Lt; / H1> & Lt; / Div & gt; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; Tr class = "heading" & gt; & Lt; Th colspan = "2" scope = "col" & gt; Username & lt; / Th & gt; & Lt; Th scope = "colonel" & gt; Percentage watched & lt; / Th & gt; & Lt; Th scope = "colonel" & gt; Enrollment date & lt; / Th & gt; & Lt; Th scope = "colonel" & gt; Status & lt; / Th & gt; & Lt; Th scope = "colonel" & gt; Requirement end date & lt; / Th & gt; & Lt; / TR & gt; & Lt; Xsl: each selection = "key" ("group", member report graphic4 description) "& gt; & Lt; TR & gt; & Lt; Td> & Lt; Xsl: Select the value = "Member first name" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select Value = "Member Listname" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "Viewpressure" /> gt; & Lt; / Td> & Lt; Td> & Lt; Xsl: Select the value = "enrollment date" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select Value = "Status" /> & Lt; / Td> & Lt; Td> & Lt; Xsl: Select Value = "Member Report Group4Description" /> & Lt; / Td> & Lt; / TR & gt; & Lt; / XSL: for-each & gt; & Lt; / Table & gt; & Lt; / Xsl: Templates & gt; \ & Lt; / Div & gt; & Lt; / XSL: stylesheet & gt;  

You can call your & lt; Div & gt; should be added here:

  & lt; Xsl: Template Match = "/ New Data Set" & gt; & Lt; Div & gt; & Lt; Xsl: Apply-Select Template = "QueryRultadata [...]" /> & Lt; / Div & gt; & Lt; / XSL: Templates & gt;  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -