You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Greg Murphy <gr...@hotmail.com> on 2001/08/16 21:26:13 UTC

Re: using XSP : element ???

This looks like a problem with the parsing not the tag, try sticking to XML 
comments inside XML files e.g.

<product>
  <xsp:attribute name="id">
    <xsp:expr>temp_bullet</xsp:expr>
    <!-- temp_bullet is a java variable of course -->
  </xsp:attribute>


>From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
>Reply-To: cocoon-users@xml.apache.org
>To: <ge...@xml.apache.org>, <co...@xml.apache.org>
>Subject: using XSP : element  ???
>Date: Thu, 16 Aug 2001 16:30:11 +0800
>
>i am trying to use the <xsp:attribute> thing to put attributes into a
>statically marked element. but ever since i put those in... i am getting an
>error messge from the browser when i try to call the page... Has anyone 
>ever
>used these xsp elements b4?? maybe you can give me some pointers on its
>use...
>
>My code:
>                 <product>
>                <xsp:attribute name="id">
>                  <xsp:expr>temp_bullet</xsp:expr>
>/*temp_bullet is a java variable of course*/
>                </xsp:attribute>
>
>
>My Error:
>
>org.xml.sax.SAXParseException: The content of elements must consist of
>well-formed character
>                 data or markup.
>      at
>org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
>      at
>org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037)
>      at
>org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocume
>ntScanner.java:625)
>      at
>org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScanne
>r.java:679)
>      at
>org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
>LDocumentScanner.java:1245)
>      at
>org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
>java:380)
>      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
>      at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:85)
>      at
>org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
>      at
>org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.jav
>a:78)
>      at org.apache.cocoon.Engine.handle(Engine.java:359)
>      at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
>      at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
>      at
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>      at org.apache.tomcat.core.Handler.service(Handler.java:286)
>      at
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>      at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7)
>      at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>      at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
>onnectionHandler.java:210)
>      at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>      at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>      at java.lang.Thread.run(Thread.java:484)
>
>
>---------------------------------------------------------------------
>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>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: using XSP : element ???

Posted by Adrian Geissel <ag...@zenark.com>.
Hi,
I use the same construct as below throughout my app.
The error message returned by the SAX parser may indicate that the XML prior
to the fragment below has a problem - I have seen this message when I have
failed to close an earlier tag - or have mistakenly included a closing tag
without a corresponding open.

Another suggestion may be to remove the whitespace between the
<xsp:attribute> and <xsp:expr> tags, although this tends to just distort
final output.

Hope this helps,
Adrian

----- Original Message -----
From: Kazi the P i R @ t {- <ka...@ewarna.com>
To: <co...@xml.apache.org>
Sent: Friday, August 17, 2001 3:48 AM
Subject: Re: using XSP : element ???


> Actually i am not using any comments in the real file... i only put it in
> when i posting the message for the readers' benefit.
>
> So the block actually looks like this:
>
>    <product>
>                <xsp:attribute name="id">
>                  <xsp:expr>temp_bullet</xsp:expr>
>             </xsp:attribute>
>            <name>
>                <xsp:expr>temp_gun</xsp:expr>
>             </name>
>     </product>
>
>
> I have been unable to get rid of the errors still (scroll down below to
take
> a look at that) ... so... HELP
>
> Kazi
>
>
> ----- Original Message -----
> From: "Greg Murphy" <gr...@hotmail.com>
> To: <co...@xml.apache.org>; <ge...@xml.apache.org>
> Cc: <ka...@ewarna.com>
> Sent: Thursday, August 16, 2001 7:26 PM
> Subject: Re: using XSP : element ???
>
>
> > This looks like a problem with the parsing not the tag, try sticking to
> XML
> > comments inside XML files e.g.
> >
> > <product>
> >   <xsp:attribute name="id">
> >     <xsp:expr>temp_bullet</xsp:expr>
> >     <!-- temp_bullet is a java variable of course -->
> >   </xsp:attribute>
> >
> >
> > >From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
> > >Reply-To: cocoon-users@xml.apache.org
> > >To: <ge...@xml.apache.org>, <co...@xml.apache.org>
> > >Subject: using XSP : element  ???
> > >Date: Thu, 16 Aug 2001 16:30:11 +0800
> > >
> > >i am trying to use the <xsp:attribute> thing to put attributes into a
> > >statically marked element. but ever since i put those in... i am
getting
> an
> > >error messge from the browser when i try to call the page... Has anyone
> > >ever
> > >used these xsp elements b4?? maybe you can give me some pointers on its
> > >use...
> > >
> > >My code:
> > >                 <product>
> > >                <xsp:attribute name="id">
> > >                  <xsp:expr>temp_bullet</xsp:expr>
> > >/*temp_bullet is a java variable of course*/
> > >                </xsp:attribute>
> > >
> > >
> > >My Error:
> > >
> > >org.xml.sax.SAXParseException: The content of elements must consist of
> > >well-formed character
> > >                 data or markup.
> > >      at
> >
>
>org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
> > >      at
> > >org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037)
> > >      at
> >
>
>org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocum
> e
> > >ntScanner.java:625)
> > >      at
> >
>
>org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScann
> e
> > >r.java:679)
> > >      at
> >
>
>org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(X
> M
> > >LDocumentScanner.java:1245)
> > >      at
> >
>
>org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner
> .
> > >java:380)
> > >      at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
> > >      at
> org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:85)
> > >      at
> > >org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
> > >      at
> >
>
>org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.ja
> v
> > >a:78)
> > >      at org.apache.cocoon.Engine.handle(Engine.java:359)
> > >      at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
> > >      at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> > >      at
> >
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> > >      at org.apache.tomcat.core.Handler.service(Handler.java:286)
> > >      at
> > >org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > >      at
> >
>
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
> 9
> > >7)
> > >      at
> > >org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> > >      at
> >
>
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Http
> C
> > >onnectionHandler.java:210)
> > >      at
> >
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> > >      at
> >
>
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> > >      at java.lang.Thread.run(Thread.java:484)
> > >
> > >
> > >---------------------------------------------------------------------
> > >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>
> > >
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
> >
> >
> > ---------------------------------------------------------------------
> > 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>
>
>



---------------------------------------------------------------------
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: using XSP : element ???

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 17.Aug.2001 -- 10:48 AM, Kazi the P i R @ t {- wrote:
> Actually i am not using any comments in the real file... i only put it in
> when i posting the message for the readers' benefit.
> 
> So the block actually looks like this:
> 
>    <product>
>                <xsp:attribute name="id">
>                  <xsp:expr>temp_bullet</xsp:expr>
>             </xsp:attribute>
>            <name>
>                <xsp:expr>temp_gun</xsp:expr>
>             </name>
>     </product>

> > >org.xml.sax.SAXParseException: The content of elements must consist of
> > >well-formed character
> > >                 data or markup.

Wild guess: id attributes may not contain spaces (they follow the same
rules like e.g. element names). Thus perhaps the following might work:

   <xsp:attribute name="id"><xsp:expr>temp_bullet</xsp:expr></xsp:attribute>

	Chris.

-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
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: using XSP : element ???

Posted by "Kazi the P i R @ t {-" <ka...@ewarna.com>.
Actually i am not using any comments in the real file... i only put it in
when i posting the message for the readers' benefit.

So the block actually looks like this:

   <product>
               <xsp:attribute name="id">
                 <xsp:expr>temp_bullet</xsp:expr>
            </xsp:attribute>
           <name>
               <xsp:expr>temp_gun</xsp:expr>
            </name>
    </product>


I have been unable to get rid of the errors still (scroll down below to take
a look at that) ... so... HELP

Kazi


----- Original Message -----
From: "Greg Murphy" <gr...@hotmail.com>
To: <co...@xml.apache.org>; <ge...@xml.apache.org>
Cc: <ka...@ewarna.com>
Sent: Thursday, August 16, 2001 7:26 PM
Subject: Re: using XSP : element ???


> This looks like a problem with the parsing not the tag, try sticking to
XML
> comments inside XML files e.g.
>
> <product>
>   <xsp:attribute name="id">
>     <xsp:expr>temp_bullet</xsp:expr>
>     <!-- temp_bullet is a java variable of course -->
>   </xsp:attribute>
>
>
> >From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
> >Reply-To: cocoon-users@xml.apache.org
> >To: <ge...@xml.apache.org>, <co...@xml.apache.org>
> >Subject: using XSP : element  ???
> >Date: Thu, 16 Aug 2001 16:30:11 +0800
> >
> >i am trying to use the <xsp:attribute> thing to put attributes into a
> >statically marked element. but ever since i put those in... i am getting
an
> >error messge from the browser when i try to call the page... Has anyone
> >ever
> >used these xsp elements b4?? maybe you can give me some pointers on its
> >use...
> >
> >My code:
> >                 <product>
> >                <xsp:attribute name="id">
> >                  <xsp:expr>temp_bullet</xsp:expr>
> >/*temp_bullet is a java variable of course*/
> >                </xsp:attribute>
> >
> >
> >My Error:
> >
> >org.xml.sax.SAXParseException: The content of elements must consist of
> >well-formed character
> >                 data or markup.
> >      at
>
>org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
> >      at
> >org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037)
> >      at
>
>org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocum
e
> >ntScanner.java:625)
> >      at
>
>org.apache.xerces.framework.XMLDocumentScanner.abortMarkup(XMLDocumentScann
e
> >r.java:679)
> >      at
>
>org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(X
M
> >LDocumentScanner.java:1245)
> >      at
>
>org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner
.
> >java:380)
> >      at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
> >      at
org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:85)
> >      at
> >org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
> >      at
>
>org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.ja
v
> >a:78)
> >      at org.apache.cocoon.Engine.handle(Engine.java:359)
> >      at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
> >      at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> >      at
> >org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
> >      at org.apache.tomcat.core.Handler.service(Handler.java:286)
> >      at
> >org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> >      at
>
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
9
> >7)
> >      at
> >org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> >      at
>
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Http
C
> >onnectionHandler.java:210)
> >      at
> >org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> >      at
>
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
> >      at java.lang.Thread.run(Thread.java:484)
> >
> >
> >---------------------------------------------------------------------
> >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>
> >
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> ---------------------------------------------------------------------
> 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>