You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Torsten Knodt <to...@datas-world.de> on 2002/07/31 11:37:08 UTC

LinkSerializer not seeing links (href, src)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
I have a second problem with LinkSerializer. Sometimes I can only see href's 
(no src), sometimes I can't see any links. The cocoon examples work without 
problems.
The xhtml output validates against the DTD.
If this helps you, DOCTYPE isn't in the output of my xhtml (don't know why).

Oh yes, tested with cocoon 2.0.3 and cvs-version.

With kind regards
	Torsten Knodt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9R6/HvxZktkzSmiwRAoHoAJ97JjeyPY0mLjHNDs8qrCv6zP5IywCfVyOb
0XtaVCzjHhQ8FlhtJbnuk04=
=Hy4i
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: LinkSerializer not seeing links (href, src)

Posted by Torsten Knodt <to...@datas-world.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Vadim,
> > > > I have a second problem with LinkSerializer. Sometimes I can only
> > > > see href's (no src),
> > > Give an example (reproducible).
> > > > sometimes I can't see any links.
> > > Same here.
> > I wasn't able to reproduce the version, where only href's where
> > recognised,
> > but here's a version, which doesn't produce any links.
> > It's stripped down as much as possible. When it would work, you should
> > see a broken link to test2.html.
> > The error xsl isn't included, it's the sample.
> Thanks for the example.

> Let me clarify how link serializer works. It react only on elements
> which has "href" or "src" or "background" attributes in the *same*
> namespace as element.
First, you were right, thanks!
But is this a bug or a feature?
When I create a normal html, translate it to xhtml via tidy, and parse it with 
the FileGenerator, then it looks like my xml source. Shouldn't then 
LinkSerializer react on those links? It was valid against the right dtd.

With kind regards
	Torsten Knodt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9SobnvxZktkzSmiwRAmDaAJ9QK3zxQJMKRmQPaYWqbNqsA6WnjwCeNx64
zLLbo51KKpvQpWQdExc+Wn0=
=1VX8
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: LinkSerializer not seeing links (href, src)

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Torsten Knodt [mailto:torstenknodt@datas-world.de]
> 
> Hello Vadim,
> > > I have a second problem with LinkSerializer. Sometimes I can only
> > > see href's (no src),
> > Give an example (reproducible).
> > > sometimes I can't see any links.
> > Same here.
> I wasn't able to reproduce the version, where only href's where
recognised,
> but here's a version, which doesn't produce any links.
> It's stripped down as much as possible. When it would work, you should
see a
> broken link to test2.html.
> The error xsl isn't included, it's the sample.

Thanks for the example.

Let me clarify how link serializer works. It react only on elements
which has "href" or "src" or "background" attributes in the *same*
namespace as element.

>From your HTML (skipping unessential stuff):

<html xmlns="http://www.w3.org/1999/xhtml">
    <img src="test2.html" alt="" />
</html>

You are defining element img in XHTML namespace. I will write this as:

  'http://www.w3.org/1999/xhtml':img

Then, you are adding *non-namespaced* attribute src (default namespace
does not affect attributes, see
http://www.w3.org/TR/1999/REC-xml-names-19990114/#defaulting):

  '':src

The result is that src and img are in *different* namespaces. To make
LinkSerializer work, they must be in the same namespace. This can be
achieved by two ways:

1. Add namespace to the attribute:

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ns="http://www.w3.org/1999/xhtml">
    <img ns:src="test2.html" ns:alt="" />
</html>

2. Remove namespace from the element:

<html>
    <img src="test2.html" alt="" />
</html>


Regards,
Vadim


> With kind regards
> 	Torsten Knodt


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: LinkSerializer not seeing links (href, src)

Posted by Torsten Knodt <to...@datas-world.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Vadim,
> > I have a second problem with LinkSerializer. Sometimes I can only see
> href's
> > (no src),
> Give an example (reproducible).
> > sometimes I can't see any links.
> Same here.
I wasn't able to reproduce the version, where only href's where recognised, 
but here's a version, which doesn't produce any links.
It's stripped down as much as possible. When it would work, you should see a 
broken link to test2.html.
The error xsl isn't included, it's the sample.

With kind regards
	Torsten Knodt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9SAolvxZktkzSmiwRAndYAJ0SgE1mV0heRoaups9ovf3WJrhaVACggrs6
3DDSqIDMr/NU7e38YnQCCQg=
=EMJZ
-----END PGP SIGNATURE-----

RE: LinkSerializer not seeing links (href, src)

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Torsten Knodt [mailto:torstenknodt@datas-world.de]
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> I have a second problem with LinkSerializer. Sometimes I can only see
href's
> (no src),

Give an example (reproducible).


> sometimes I can't see any links.

Same here.

Vadim


> The cocoon examples work without problems.
> The xhtml output validates against the DTD.
> If this helps you, DOCTYPE isn't in the output of my xhtml (don't know
why).
> 
> Oh yes, tested with cocoon 2.0.3 and cvs-version.
> 
> With kind regards
> 	Torsten Knodt


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>