You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by ra <ry...@gazeta.pl> on 2007/12/19 18:14:49 UTC
closed tags
How to force xalan to not closing tags, I mean I've for example tag
and after transformation it's changed to , it's not desired behaviour for
me
Output is set to xml and cannot be change to html
It's a commercial application and I don't know which xalan version is in use
but it's propably a few years old. I can modify only xsl sheet
--
View this message in context: http://www.nabble.com/closed-tags-tp14421214p14421214.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.
Re: closed tags
Posted by ra <ry...@gazeta.pl>.
David Bertoni wrote:
>
> ra wrote:
>>
>> David Bertoni wrote:
>>> ra wrote:
>>>> How to force xalan to not closing tags, I mean I've for example tag
>>>> and after transformation it's changed to , it's not desired behaviour
>>>> for
>>>> me
>>> Well, it looks like something along the way has stripped the sample
>>> markup
>>> from your post, so I'm going to have to guess what you're asking for.
>>>
>>> Xalan-J's XML serialization method can only generate well-formed markup,
>>> so
>>> you cannot generate unclosed tags, without resorting to hacks like
>>> disable-output-escaping.
>>>
>>> You'll have to post-process the serialized XML to remove whatever
>>> closing
>>> tags you don't want.
>>>
>>> Dave
>>>
>>>
>>
>>
>> Here is a sample, it should be visible
>> <xx></xx> is change to <xx/>
>> I belive both samples are well-formed but only first one is accepted for
>> example if instead of xx we put a (like anchor link)
> OK, so you meant an empty tag, not an unclosed tag. The two forms are
> considered identical in XML, so there's no way to tell the serializer to
> use one or the other. It sounds like you really need to generate XHTML
> for
> a broken browser, and that's tricky to do without a custom output method.
>
> Dave
>
>
Thanks, I try to use xhtml I hope without negative impact for the content
that already exists
BTW according to the specification empty a tag is not allowed and behaviour
of the browser is undetermined. And really IE and Firefox don't manage with
empty tag. Firebug shows that Firfox opens a tag, insert some content,
generates hundreds of links
Regards,
Arek
--
View this message in context: http://www.nabble.com/closed-tags-tp14421214p14433776.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.
Re: closed tags
Posted by Brian Minchau <mi...@ca.ibm.com>.
When generating serialized XML output both <xx></xx> and the minimized form
<xx/> are technically acceptable. Different processors (i.e. serializers)
may do different things.
In the case of Xalan-J, depending on the version, you may find that a text
node with no characters may, and I say "may", cause the non-minimized form.
For example:
ch.StartElement("","xx","xx",atts);
ch.characters(new ch[] { }, 0,0); // might cause it to think that the
element xx is not empty and close the start tag
ch.endElement("","xx","xx");
Even if this works, in the long run you can't count on this. Xalan-J won't
consider generating the minimized form, or not generating the minimized
form, a bug in XML serialization.
- Brian
David Bertoni
<dbertoni@apache.
org> To
"'Xalan J Users List'"
12/19/2007 06:43 <xa...@xml.apache.org>
PM cc
Subject
Re: closed tags
ra wrote:
>
> David Bertoni wrote:
>> ra wrote:
>>> How to force xalan to not closing tags, I mean I've for example tag
>>> and after transformation it's changed to , it's not desired behaviour
>>> for
>>> me
>> Well, it looks like something along the way has stripped the sample
markup
>> from your post, so I'm going to have to guess what you're asking for.
>>
>> Xalan-J's XML serialization method can only generate well-formed markup,
>> so
>> you cannot generate unclosed tags, without resorting to hacks like
>> disable-output-escaping.
>>
>> You'll have to post-process the serialized XML to remove whatever
closing
>> tags you don't want.
>>
>> Dave
>>
>>
>
>
> Here is a sample, it should be visible
> <xx></xx> is change to <xx/>
> I belive both samples are well-formed but only first one is accepted for
> example if instead of xx we put a (like anchor link)
OK, so you meant an empty tag, not an unclosed tag. The two forms are
considered identical in XML, so there's no way to tell the serializer to
use one or the other. It sounds like you really need to generate XHTML for
a broken browser, and that's tricky to do without a custom output method.
Dave
Re: closed tags
Posted by David Bertoni <db...@apache.org>.
ra wrote:
>
> David Bertoni wrote:
>> ra wrote:
>>> How to force xalan to not closing tags, I mean I've for example tag
>>> and after transformation it's changed to , it's not desired behaviour
>>> for
>>> me
>> Well, it looks like something along the way has stripped the sample markup
>> from your post, so I'm going to have to guess what you're asking for.
>>
>> Xalan-J's XML serialization method can only generate well-formed markup,
>> so
>> you cannot generate unclosed tags, without resorting to hacks like
>> disable-output-escaping.
>>
>> You'll have to post-process the serialized XML to remove whatever closing
>> tags you don't want.
>>
>> Dave
>>
>>
>
>
> Here is a sample, it should be visible
> <xx></xx> is change to <xx/>
> I belive both samples are well-formed but only first one is accepted for
> example if instead of xx we put a (like anchor link)
OK, so you meant an empty tag, not an unclosed tag. The two forms are
considered identical in XML, so there's no way to tell the serializer to
use one or the other. It sounds like you really need to generate XHTML for
a broken browser, and that's tricky to do without a custom output method.
Dave
Re: closed tags
Posted by ra <ry...@gazeta.pl>.
David Bertoni wrote:
>
> ra wrote:
>>
>> How to force xalan to not closing tags, I mean I've for example tag
>> and after transformation it's changed to , it's not desired behaviour
>> for
>> me
>
> Well, it looks like something along the way has stripped the sample markup
> from your post, so I'm going to have to guess what you're asking for.
>
> Xalan-J's XML serialization method can only generate well-formed markup,
> so
> you cannot generate unclosed tags, without resorting to hacks like
> disable-output-escaping.
>
> You'll have to post-process the serialized XML to remove whatever closing
> tags you don't want.
>
> Dave
>
>
Here is a sample, it should be visible
<xx></xx> is change to <xx/>
I belive both samples are well-formed but only first one is accepted for
example if instead of xx we put a (like anchor link)
--
View this message in context: http://www.nabble.com/closed-tags-tp14421214p14427178.html
Sent from the Xalan - J - Users mailing list archive at Nabble.com.
Re: closed tags
Posted by David Bertoni <db...@apache.org>.
ra wrote:
>
> How to force xalan to not closing tags, I mean I've for example tag
> and after transformation it's changed to , it's not desired behaviour for
> me
Well, it looks like something along the way has stripped the sample markup
from your post, so I'm going to have to guess what you're asking for.
Xalan-J's XML serialization method can only generate well-formed markup, so
you cannot generate unclosed tags, without resorting to hacks like
disable-output-escaping.
You'll have to post-process the serialized XML to remove whatever closing
tags you don't want.
Dave