You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2001/11/08 13:21:18 UTC

FW: Patch to org.apache.cocoon.sitemap.ContentAggregator


-----Original Message-----
From: Dariusz Kies [mailto:dariuszkies@yahoo.com]
Sent: Thursday, November 08, 2001 1:15 PM
To: cziegeler@apache.org
Subject: Patch to org.apache.cocoon.sitemap.ContentAggregator



Hello,
When I use in sitemap aggregate component like this:

<map:aggregate prefix="xs" element="schema"
ns="http://www.w3.org/2001/XMLSchema">
    <map:part src="context:/Type1.xsd" strip-root="true"/>
    <map:part src="context:/Type2.xsd" strip-root="true"/>
</map:aggregate>


I get exception:

"The element type &quot;xs:schema&quot; must be terminated by the matching
end-tag &quot;&lt;/xs:schema&gt;&quot;".


I think that where is a bug in org.apache.cocoon.sitemap.ContentAggregator:

private void endElem(String prefix, String name) throws SAXException {
  // ...
  this.contentHandler.endElement(ns, name, name);
  // ...
}


My resolution is:

private void endElem(String prefix, String name) throws SAXException {
  // ...
  String qname = (prefix == null || prefix.equals("")) ? name :
prefix+':'+name;
  this.contentHandler.endElement(ns, name, qname);
  // ...
}


Dariusz Kies
dariuszkies@yahoo.com




__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Patch to org.apache.cocoon.sitemap.ContentAggregator

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hi Dariusz,

I rewrote some parts of the ContentAggregator dealing with namespaces,
prefixes and the strip-root directive.
All these should now work - it did at least in my test-cases.
Could you please verify this? Thanks!

Carsten

>
> -----Original Message-----
> From: Dariusz Kies [mailto:dariuszkies@yahoo.com]
> Sent: Thursday, November 08, 2001 1:15 PM
> To: cziegeler@apache.org
> Subject: Patch to org.apache.cocoon.sitemap.ContentAggregator
>
>
>
> Hello,
> When I use in sitemap aggregate component like this:
>
> <map:aggregate prefix="xs" element="schema"
> ns="http://www.w3.org/2001/XMLSchema">
>     <map:part src="context:/Type1.xsd" strip-root="true"/>
>     <map:part src="context:/Type2.xsd" strip-root="true"/>
> </map:aggregate>
>
>
> I get exception:
>
> "The element type &quot;xs:schema&quot; must be terminated by the matching
> end-tag &quot;&lt;/xs:schema&gt;&quot;".
>
>
> I think that where is a bug in
> org.apache.cocoon.sitemap.ContentAggregator:
>
> private void endElem(String prefix, String name) throws SAXException {
>   // ...
>   this.contentHandler.endElement(ns, name, name);
>   // ...
> }
>
>
> My resolution is:
>
> private void endElem(String prefix, String name) throws SAXException {
>   // ...
>   String qname = (prefix == null || prefix.equals("")) ? name :
> prefix+':'+name;
>   this.contentHandler.endElement(ns, name, qname);
>   // ...
> }
>
>
> Dariusz Kies
> dariuszkies@yahoo.com
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Find a job, post your resume.
> http://careers.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org