Thanks Alan. I don't like my solution. I think having to run second
transformation on a large tree with over 2000 items again would affect
performance. It would be better do it right from the beginning don't
you think? Look what I did:
Removing "Categories from Root Node"
// TRANSFORM ROOT NODE TO REMOVE "CATEGORIES "
//load the Xml doc
XslTransform myXslTrans = new XslTransform();
//load the Xsl
myXslTrans.Load (CommonLogic.Sa feMapPath("Enti tyHelper/RemoveRootNode. xslt"));
//create the output stream
StringWriter tmpS2 = new StringWriter();
//do the actual transform of Xml
myXslTrans.Tran sform(doc, null, tmpS2);
string s = tmpS2.ToString( );
s = s.Replace("{"," ");
s = s.Replace("}"," ");
s = s.Replace(Gener al.RegexSearch( s, @"<\?xml(.*?)>" ,
0), "");
s = "<siteMap>" + s + "</siteMap>";
tmpS2.Close();
Removing "Categories from Root Node"
// TRANSFORM ROOT NODE TO REMOVE "CATEGORIES "
//load the Xml doc
XslTransform myXslTrans = new XslTransform();
//load the Xsl
myXslTrans.Load (CommonLogic.Sa feMapPath("Enti tyHelper/RemoveRootNode. xslt"));
//create the output stream
StringWriter tmpS2 = new StringWriter();
//do the actual transform of Xml
myXslTrans.Tran sform(doc, null, tmpS2);
string s = tmpS2.ToString( );
s = s.Replace("{"," ");
s = s.Replace("}"," ");
s = s.Replace(Gener al.RegexSearch( s, @"<\?xml(.*?)>" ,
0), "");
s = "<siteMap>" + s + "</siteMap>";
tmpS2.Close();
Rod
Alan Silver wrote:
In article <11************ **********@h48g 2000cwc.googleg roups.com>,
rl********@gmai l.com writes
Can someone tell if Sitemap always require a starting root?
Yes
Can it have
more than one root?
No
I am having a problem trying to hide a root node
without hiding its children using a Treeview component. I know you can
do that if you use sitempadatasour ce.
So why not do that then?
But instead I am forced to use
this tranformation:
xForm.Transform (m_TblMgr.XmlDo c, xslArgs, tmpS)
where tmpS is the sitemap output.
Thank you
Rod
--
Alan Silver
(anything added below this line is nothing to do with me)