You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by pa...@mc.duke.edu on 2001/05/18 17:05:22 UTC

Re: namespaces driving me nuts...

K.P.,

the URI's for the namespaces are arbitrary (afaik), but they have to match
everywhere they are decared or you get results like you have described.  In
particular, the URI's must be the same both in your xmlns: declaration in
your XSP file (the file using the taglib) and in your xmlns: declaration in
your logicsheet (the stylesheet that defines the taglib).  The logicsheet
is the one you've either defined in cocoon.properties for the kblib
namespace, or it is one you are applying by using the <?xml-logicsheet href
="..."?> processing instruction.

-Christopher




Please respond to cocoon-users@xml.apache.org

Sent by:  kpmajoor@warszawa.7bulls.com


To:   cocoon <co...@xml.apache.org>
cc:

Subject:  namespaces driving me nuts...


Hi everybody,

I thought I understood the point of namespaces, but right now I don't
have the slightest idea why things are getting messed up.

I got the tag libraries example working (the one from the
cocoon/docs/xsp.html file), but now I'd like to make my own taglib.
Changing
        xmlns:example="http://www.plenix.com/DTD/XSP/Example"  to
        xmlns:kblib="http://www.plenix.com/DTD/XSP/Example"
gives me no problems, it outputs the following:
---------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<page title="Time of Day">
        <p>
            To the best of my knowledge, it's now

            01/05/18 12:55:23 PM
       </p>
 </page>
<!-- This page was served in 16 milliseconds by Cocoon 1.8.2 -->


But as soon as I mess with the URI e.g:

    xmlns:kblib="http://www.7bulls.com/DTD/XSP/Example"

then it doesn't work anymore, then I get : (only the 2nd line differs)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<page title="Time of Day"
xmlns:example="http://www.7bulls.com/DTD/XSP/Example">
        <p>
            To the best of my knowledge, it's now

            <example:time-of-day format="yy/MM/dd hh:mm:ss
aa"></example:time-of-day>
       </p>
 </page>
<!-- This page was served in 58 milliseconds by Cocoon 1.8.2 -->


Can anybody tell me what I am doing wrong and how I should do the right
way?
Thank you in advance!

kp




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

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


Re: namespaces driving me nuts...

Posted by "K.P.Majoor" <kp...@7bulls.com>.
Thanks 4 ur answer, what you described was what I knew already BUT....
I just discovered that cocoon has to be restarted whenever I make a change to
the taglib.
Seems logical, but of course it took me one day to figure this out :-(  Now
that's efficiency huh?

Well anyway, thanx for your answer again, it helped me BIG time, cuz it told
me that I my assumption about the namespaces was right,
but just didn't know enough about cocoon.
I assume that restarting cocoon is not necessary if I use the <?xml-logicsheet
href=" ..." ?> PI ?

Happy xmling :-)


paint007@mc.duke.edu wrote:



> K.P.,
>
> the URI's for the namespaces are arbitrary (afaik), but they have to match
> everywhere they are decared or you get results like you have described.  In
> particular, the URI's must be the same both in your xmlns: declaration in
> your XSP file (the file using the taglib) and in your xmlns: declaration in
> your logicsheet (the stylesheet that defines the taglib).  The logicsheet
> is the one you've either defined in cocoon.properties for the kblib
> namespace, or it is one you are applying by using the <?xml-logicsheet href
> ="..."?> processing instruction.
>
> -Christopher
>
> Please respond to cocoon-users@xml.apache.org
>
> Sent by:  kpmajoor@warszawa.7bulls.com
>
> To:   cocoon <co...@xml.apache.org>
> cc:
>
> Subject:  namespaces driving me nuts...
>
> Hi everybody,
>
> I thought I understood the point of namespaces, but right now I don't
> have the slightest idea why things are getting messed up.
>
> I got the tag libraries example working (the one from the
> cocoon/docs/xsp.html file), but now I'd like to make my own taglib.
> Changing
>         xmlns:example="http://www.plenix.com/DTD/XSP/Example"  to
>         xmlns:kblib="http://www.plenix.com/DTD/XSP/Example"
> gives me no problems, it outputs the following:
> ---------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
> "http://www.w3.org/TR/REC-html40/strict.dtd">
> <page title="Time of Day">
>         <p>
>             To the best of my knowledge, it's now
>
>             01/05/18 12:55:23 PM
>        </p>
>  </page>
> <!-- This page was served in 16 milliseconds by Cocoon 1.8.2 -->
>
> But as soon as I mess with the URI e.g:
>
>     xmlns:kblib="http://www.7bulls.com/DTD/XSP/Example"
>
> then it doesn't work anymore, then I get : (only the 2nd line differs)
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
> "http://www.w3.org/TR/REC-html40/strict.dtd">
> <page title="Time of Day"
> xmlns:example="http://www.7bulls.com/DTD/XSP/Example">
>         <p>
>             To the best of my knowledge, it's now
>
>             <example:time-of-day format="yy/MM/dd hh:mm:ss
> aa"></example:time-of-day>
>        </p>
>  </page>
> <!-- This page was served in 58 milliseconds by Cocoon 1.8.2 -->
>
> Can anybody tell me what I am doing wrong and how I should do the right
> way?
> Thank you in advance!
>
> kp
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


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

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