tag:help-archives.hannonhill.com,2010-02-09:/discussions/xslt-formats/4762-xsl-passthrough-top-and-skip-tag-solution-not-working-as-advertisedCascade CMS: Discussion 2014-04-29T16:11:45Ztag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-09T12:39:40Z2014-04-09T12:39:40ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Hi Christian,</p>
<p>What sort of output are you seeing? I am curious if perhaps your
Template may need to be tweaked.</p>
<p>When you have a moment, please also provide the code for your
Template and a sample XML output generated using the Format preview
options. This will allow me to do some local testing.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-09T19:18:05Z2014-04-09T19:19:09ZXSL passthrough-top and skip tag solution not working as advertised<div><p>hi Ryan,<br>
Here's my template:</p>
<pre>
<code><xml><system-region name="DEFAULT"/></xml></code>
</pre>
<p>and here's the output - look at the last part for the
problem:</p>
<pre>
<code>{"all":0,"navigation":{ "one":[{"href":"/index.html","text":"Home"},{"href":"/onboarding/index.html","text":"Sign-up","menu":[{"href":"/onboarding/index.html","text":"Sign-up Steps"},{"href":"/onboarding/features.html","text":"Service Features"},{"href":"/onboarding/clients.html","text":"Who can use the service"},{"href":"/onboarding/other_resources.html","text":"Other Web Resources"},{"href":"/onboarding/demo-request.html","text":"Demo Site"},{"href":"/onboarding/who-uses-cms.html","text":"Cascade Adoption"}]},{"href":"/training/index.html","text":"CMS Training","menu":[{"href":"/training/intro/index.html","text":"Introduction"},{"href":"/training/basics/index.html","text":"Basics"},{"href":"/training/everyone/index.html","text":"For Everyone"},{"href":"/training/content-library/index.html","text":"Content Library"},{"href":"/training/managers/index.html","text":"For Managers"}]},{"href":"/","text":"CMS Login"},{"href":"/forms/index.html","text":"Forms","menu":[{"href":"/forms/user-mods-request.html","text":"User Modifications"},{"href":"/forms/multi-user-add-request.html","text":"Add multiple users"},{"href":"/forms/new-site.html","text":"New site request"}]},{"href":"/about/index.html","text":"About","menu":[{"href":"/about/faq.html","text":"FAQ"}]},{"href":"/articles/index.html","text":"Articles","menu":[{"href":"/articles/announcements.html","text":"Announcements"},{"href":"/articles/minutes.html","text":"Meeting minutes"}]}],"two":[]}}<xml>#protect-top &lt;!--#cascade-skip--&gt; #protect-top</xml></code>
</pre>
<p>I see that the XSL I pasted above has an extra wrapping tag,
which I was using to test, but that has been removed in this
output. Also, I've removed the tag from the template, but doing
that produces an error as well:</p>
<pre>
<code>{"all":0,"navigation":{ "one":[{"href":"/index.html","text":"Home"},{"href":"/onboarding/index.html","text":"Sign-up","menu":[{"href":"/onboarding/index.html","text":"Sign-up Steps"},{"href":"/onboarding/features.html","text":"Service Features"},{"href":"/onboarding/clients.html","text":"Who can use the service"},{"href":"/onboarding/other_resources.html","text":"Other Web Resources"},{"href":"/onboarding/demo-request.html","text":"Demo Site"},{"href":"/onboarding/who-uses-cms.html","text":"Cascade Adoption"}]},{"href":"/training/index.html","text":"CMS Training","menu":[{"href":"/training/intro/index.html","text":"Introduction"},{"href":"/training/basics/index.html","text":"Basics"},{"href":"/training/everyone/index.html","text":"For Everyone"},{"href":"/training/content-library/index.html","text":"Content Library"},{"href":"/training/managers/index.html","text":"For Managers"}]},{"href":"/","text":"CMS Login"},{"href":"/forms/index.html","text":"Forms","menu":[{"href":"/forms/user-mods-request.html","text":"User Modifications"},{"href":"/forms/multi-user-add-request.html","text":"Add multiple users"},{"href":"/forms/new-site.html","text":"New site request"}]},{"href":"/about/index.html","text":"About","menu":[{"href":"/about/faq.html","text":"FAQ"}]},{"href":"/articles/index.html","text":"Articles","menu":[{"href":"/articles/announcements.html","text":"Announcements"},{"href":"/articles/minutes.html","text":"Meeting minutes"}]}],"two":[]}}<system-region name="DEFAULT">#protect-top &lt;!--#cascade-skip--&gt; #protect-top</system-region></code>
</pre></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-09T19:31:28Z2014-04-09T19:31:28ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Thank you for providing the Template code, Christian. When you
have a moment, can you also provide a sample XML generated using
the Format preview options, or the XML generated by your Index
Block if you are not using a context page, so I can do some local
testing?</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-09T20:28:06Z2014-04-10T11:57:57ZXSL passthrough-top and skip tag solution not working as advertised<div><p>sure, I'll provide the xml, although the issue should be
repeatable without my xml specifically I think.</p>
<p>It's an index of a full site, from the root, so it's big:</p>
<p>See attachment below.</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-10T11:59:48Z2014-04-10T11:59:48ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Thank you for providing the XML, Christian. I am attaching the
XML with this discussion for reference.</p>
<p>Correct, it's not necessary, but will make testing with your
specific Format and setup easier. I will be in touch as soon as I
have additional information.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-10T12:09:43Z2014-04-10T12:09:43ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Hi Christian,</p>
<p>I believe I was able to get things working. I believe the issue
is with the Template code and the code sections within your Format.
I have attached the Template, XSLT Format, and a screenshot of the
Configuration Set I was testing with.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-10T20:38:42Z2014-04-10T20:38:42ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Ryan,<br>
Thanks, but I am not able to reproduce your results. I am using
your XSL verbatim, and the same XML, however I have edited my
template to look like yours (i've also used newlines as you have,
however these simply get pushed on through to the output, which is
not allowd in json anyway):</p>
<pre>
<code><pass-through><system-region name="DEFAULT"/></pass-through></code>
</pre>
<pre>
<code>{"all":0,"navigation":{ "one":[{"href":"/index.html","text":"Home"},{"href":"/onboarding/index.html","text":"Sign-up","menu":[{"href":"/onboarding/index.html","text":"Sign-up Steps"},{"href":"/onboarding/features.html","text":"Service Features"},{"href":"/onboarding/clients.html","text":"Who can use the service"},{"href":"/onboarding/other_resources.html","text":"Other Web Resources"},{"href":"/onboarding/demo-request.html","text":"Demo Site"},{"href":"/onboarding/who-uses-cms.html","text":"Cascade Adoption"}]},{"href":"/training/index.html","text":"CMS Training","menu":[{"href":"/training/intro/index.html","text":"Introduction"},{"href":"/training/basics/index.html","text":"Basics"},{"href":"/training/everyone/index.html","text":"For Everyone"},{"href":"/training/content-library/index.html","text":"Content Library"},{"href":"/training/managers/index.html","text":"For Managers"}]},{"href":"/","text":"CMS Login"},{"href":"/forms/index.html","text":"Forms","menu":[{"href":"/forms/user-mods-request.html","text":"User Modifications"},{"href":"/forms/multi-user-add-request.html","text":"Add multiple users"},{"href":"/forms/new-site.html","text":"New site request"}]},{"href":"/about/index.html","text":"About","menu":[{"href":"/about/faq.html","text":"FAQ"}]},{"href":"/articles/index.html","text":"Articles","menu":[{"href":"/articles/announcements.html","text":"Announcements"},{"href":"/articles/minutes.html","text":"Meeting minutes"}]}],"two":[]}}<pass-through></pass-through></code>
</pre>
<p>as you see, the tags get pushed through. Also, I notice there is
no skip-tag comment in your XSL - how is it that your output
doesn't produce an empty tag?</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-10T20:47:14Z2014-04-10T20:47:14ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Hi Christian,</p>
<blockquote>
<p>I have edited my template to look like yours (i've also used
newlines as you have, however these simply get pushed on through to
the output, which is not allowd in json anyway)</p>
</blockquote>
<p>My Template code is actually all on one line. I suspect your
browser's built in preview may be added the newlines in, try
viewing the source of the file. When you have a moment, give that a
shot and let me know if moving things to all one line in the
Template helps.</p>
<blockquote>
<p>Also, I notice there is no skip-tag comment in your XSL - how is
it that your output doesn't produce an empty tag?</p>
</blockquote>
<p>Because the Format is using <code>#protect-top</code>, the
generated content will be pushed to the top during render. Then,
the <code>#cascade-skip</code> should tell Cascade Server to
disregard everything after the tag, which would be the empty
<code><passthrough></passthrough></code> tag.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-10T20:49:44Z2014-04-10T20:49:44ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Ryan,<br>
Thanks, where is the #cascade-skip? I don't find it in your
XSL.</p>
<p>C</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-11T11:56:11Z2014-04-11T11:56:11ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Hi Christian,</p>
<p>The <code>#cascade-skip</code> tag is in the Template at the
very beginning. The <code>#protect-top</code> within the XSLT will
render the content before this tag and then the skip tag will
remove the <code><passthrough></code> tag.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-11T12:07:01Z2014-04-11T12:07:01ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Ryan,<br>
Oh I get it, duh. Sorry, you said to look at the source, and of
course there it is.</p>
<p>So, this is still an issue because the template needs to render
a variety of pages - there are a number of config sets attached to
it. Some of these are XML output. So the skiptag needs to be in the
XSL.</p>
<p>Awesome that it works at all, but the example in the literature
has the tag in the XSL, but if I put it there like in the example,
it doesn't work. Is this a legitimate bug at this point?
Wondering...</p>
<p>thanks!</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-11T12:28:20Z2014-04-11T12:28:20ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Hi Christian,</p>
<p>Let me do some more testing to see if the
<code>#cascade-skip</code> tag can be relocated into the
Format.</p>
<blockquote>
<p>Awesome that it works at all, but the example in the literature
has the tag in the XSL, but if I put it there like in the example,
it doesn't work</p>
</blockquote>
<p>Are you referring to the Cascade Skip Tags section of the Code
Sections page? If so, the example provided describes a similar
setup as mine, where the skip tag is within the Template and the
Format generates content within a <code>#protect-top</code> tag
(see the very last paragraph).</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-14T17:07:46Z2014-04-14T17:07:46ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Ryan,<br>
You are absolutely right - wishful thinking on my part - I was
seeing and XSL transform where there was a template. I certainly
hope there is a way to use it in the XSL, otherwise I'll have to
come up with another solution.</p>
<p>Maybe there is a way to work my proper xml tags into my XSL, and
go that route, so that the skip tag gets rid of the xml tag, but I
can still have a a proper XML doc.</p>
<p>thanks!</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-14T20:15:31Z2014-04-14T20:15:31ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Hi Christian,</p>
<p>I am going to keep trying, but so far I am not able to relocate
the <code>#cascade-skip</code> tags into the Format. I believe the
issue may be due to order in which the XML is validated and the
code sections are parsed in the Format and then the Template.</p>
<p>The best I have been able to get so far is the JSON followed by
<code>--></code>, which definitely isn't valid.</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-14T21:05:34Z2014-04-14T21:05:34ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Yeah, I can't get it working either. Frustrating, but I guess I
will have to live with it for now.</p>
<p>Penny - the comment there comes after the protect-top, therefore
it never makes it above the first tag, therefore it doesn't remove
it. And if it's embedded in the protect top, it renders as a
comment and never performs its "cascade-skip" tag duties.</p></div>christiancotag:help-archives.hannonhill.com,2010-02-09:Comment/324703232014-04-15T13:17:27Z2014-04-15T13:17:27ZXSL passthrough-top and skip tag solution not working as advertised<div><p>Christian,</p>
<p>After some trial and error, I believe I was able to come up with
an XSLT Format that will generate the appropriate code sections to
move the JSON to the top of the template and strip out the
<code><pass-through></code> tags.</p>
<p>When you have a moment, try the attached XSLT and let me know
how it works out.</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffith