8

This certainly used to work back in early R5, but I have not tried it in a long time. I believe it even worked by including the URI or an XSLT CT/TBB. Have you tried using the href attribute rather than the invalid url attribute? Take a look at: http://www.w3schools.com/xsl//el_include.asp


5

the reason this wont save is because the namespace is missing from the richtext node, if you open the source of a component you`ll see that the component is in a namespace, meaning that anything within the richtext will need the correct namespace in order to save, below is a working example of creating a component with richtext html also uses the fields ...


5

In order to remove the namespace from the <p> element, all you have to do is apply a blank namespace attribute. The final (correct) filtering XSLT is the same as the original except for this line: <element name="p" namespace=""> Once I applied this change, I was able to get the correct output: <p>Test</p>


5

One option (may or may not suits you) I can suggest is to create a guideline for the content authors. The Guideline should states like below: If you are entering any content into a RTF field, any text which is not enclosed in an HTML tag, should be entered in the "Design" tab of the RTF field, rest all (i.e. those which are enclosed by an HTML tag) should ...


5

When you know the root node (which is the name of your RTF field basically), I was thinking something along the lines of this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"/> <xsl:template match="/ | node() | @*"> &...


4

This doesn't seem to be about XSLT, but rather about the RTF implementation. I've been trying out various options using 2013, and there's definitely some quirkiness in there. If the RTF were being treated as an XML document in the normal sense, then I'd expect the following XSLT to do what you want: <xsl:stylesheet version="1.0" xmlns:xsl="http://www....


4

You may try to put 'exclude-result-prefixes' in stylesheet header. There are so many links with explanation how to do this. I just picked up one as example. https://stackoverflow.com/questions/827600/how-can-i-prevent-these-redundant-namespaces-from-an-xslt-stylesheet


4

So why don't you put the namespace you've deleted back? // provided b is the output of your transformation var k = new XmlDocument(); k.LoadXml("<txt>" + b + "</txt>"); var t = k.DocumentElement.ChildNodes; XmlAttribute xKey = k.CreateAttribute("xmlns"); xKey.Value = "http://www.w3.org/1999/xhtml"...


4

I'd be interested to know the use-case around this, i've certainly never heard of this sort of requirement before. Not the best solution, but it would work..... Is it possible that you know all the validation changes in the RTF field?, you can simply select them for example all elements of 'h2' and replace them with the supported tag (or remove) required ...


4

Here is one I used a while ago (quite similair to the one before, but with a little extra ;o), it removes the font element and attributes like align, valign, border, cellpadding, cellspacing. It also removes all style attributes, unless they contain text-align, since that is what the default table editor uses to center align text in a cell. The last bit of ...


3

I can't find the relevant information in the documentation but if I recall correctly the Filtering XSLT of a Schema is limited to XSLT 1.0 only. The reason behind this is that the XSL transformation is being executed by the Microsoft XML Core Services (MSXML 4.0 SP3 for 2013 SP1, and MSXML 6.0 for Web 8, I think). MSXML versions 4.0 and 6.0 fully implement ...


3

Since <style> elements are officially not allowed in an HTML body element, I think the TcmXhtml.Config isn't going to help you (as you confirmed by trying already). So the best solution I can give you (it will mean extra work) is to see if you can split the RTF content up in two parts for the migration: Strip out the <style> tags (by means of ...


3

As nuno answered it here : https://stackoverflow.com/questions/9613598/how-to-add-custom-tags-to-rich-text-field-in-sdl-tridion There is a file named TcmXhtml.Config under [Tridion]\web\WebUI\Core\Controls\FormatArea\TcmXhtml, where the rtf supported tags are defined. please check if your tag is there and if not present add it.


3

A while ago, I tried this without success, and even went as far as creating an idea on the ideas site. My idea was that modular development on RTF XSLTs could be supported by using xsl:include - I also suggested that being able to include XSLT TBBs would be a good thing, although any useful mechanism would do.


3

From your comment: I have just tested this after removing my filtering XSLT and the issue remains with the same behaviour ruling out the XSLT as a cause. As this is the case, it would suggest that it is the default rich text field behaviour that is the cause of the re-formatting. To get around this, I would suggest that you have three options: Modify ...


3

As Chris points out, your XSL elements are missing the prefix. I think he's right to think this is a migration problem. What this means is that when you're creating the div, the namespace is that of XSL. To fix this, I'd suggest returning to the more normal situation, where XSL elements use a prefix to reference their namespace, and set the default ...


2

We've discovered that pressing "enter" at the end of the line will force Tridion to add a <p> tag. So we are taking a content editor education approach along with a naive implementation which checks for < at the start of the line instead of <p. This seems to be working fairly well.


2

Try writing <xhtml:div class="video-container">.... instead of creating the element. Not sure it will make a difference


2

With the disclaimer of not having tried it, this is what I suggest: Declare an xhtml namespace in your stylesheet: xmlns:xhtml="http://www.w3.org/1999/xhtml" Declare to exclude namespace prefix xhtml from result: exclude-result-prefixes="xhtml" Finally, create your p element belonging to the xhtml namespace: <element name="p" namespace="xhtml">


2

It is clearly given here that http://msdn.microsoft.com/en-us/library/ms163430(v=vs.110).aspx. This method does not support the xsl:strip-space element. If your compiled style sheet included the xsl:strip-space element, you must use the Transform overload which takes an XmlReader as the input argument.


1

White-space handling is tricky at the best of times in XSLT. In this case, it's not clear what you are actually trying to achieve, but maybe strip-space isn't what you need anyway. I'd suggest that you check out this question on Stack Overflow. The answers by Dimitre Novachev and Michael Kay are both instructive (as are pretty much all the answers given by ...


1

Is the problem actually with the XSLT, or with the stylesheet? You haven't explained what the actual undesirable result is. Are you actually getting an undesirable visual effect as a result of the span wrapping the <a>? in HTML4, the browser treats the span as an inline element, as well as the <a>. Internet Explorer 8, I believe, may treat the ...


1

Your filtering XSLT looks like You got the schema Item XML and then copied tcm:FilterXSLT part and pasted on the question. with this, we may see some more extra content. Best way is to open schema, go to Filtering XSLT tab and then copy the XSLT and paste on the question. Apart from this, your Filter XSLT should be <?xml version="1.0" encoding="UTF-...


1

I have the same issue. Rather than fixing it in code on the presentation side, we have the following XSLT which is not perfect, but addresses the case where the editor enters content without hitting enter. It encloses the content in a <p> tag if the content does not contain any of the elements which would normally automatically close it (based on ...


Only top voted, non community-wiki answers of a minimum length are eligible