You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by "Kazi the P i R @ t {-" <ka...@ewarna.com> on 2001/07/19 09:55:15 UTC

mixed content in DTDs

I have a line like this in my dtd:
<!ELEMENT point (sub-point*,#PCDATA)>      
    Is this violating the mixed content rule??
 I get an error saying:
    
    A name was started with an invalid character. Line 11, Position 41 

            <!ELEMENT point (sub-point*,#PCDATA)>      
----------------------------------------^

HELP

Kazi


---------------------------------------------------------------------
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


Errors i am unfamiliar with & mixed content in DTDs - still troubled ...H E L P

Posted by "Kazi the P i R @ t {-" <ka...@ewarna.com>.
The Error:

========= Parsing file:C:/Tomcat/webapps/newProd/guide-html.xsl ==========
XSL Warning: xsl:stylesheet requires a 'version' attribute!, Location file:C:/To
mcat/webapps/newProd/guide-html.xsl, line 2, offset 81
Parse of file:C:/Tomcat/webapps/newProd/guide-html.xsl took 550 milliseconds

whereas my xsl file's xsl:stylesheet tag is like:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3c.org/1999/XSL/Transform">

The second error:
 
========= Parsing file:C:/Tomcat/webapps/newProd/guide.xml ==========
file:C:/Tomcat/webapps/newProd/searchguide.dtd; Line 11; Column 41
XSL Error: Could not parse file:C:/Tomcat/webapps/newProd/guide.xml document!
XSLT: A ')' is required in the declaration of element type "description".
Xalan: was not successful.

                        i am not really sure what the problem with that is...

Line 11 of my xsl file:    <table width="100%" border="0">
Line 11 of my dtd file:    <!ELEMENT description (#PCDATA|sub-point*)>

Hope i manage to get some heads together on this one, cause mines alone is not enuff

Kazi


  ----- Original Message ----- 
  From: kkumari 
  To: general@xml.apache.org 
  Sent: Saturday, May 19, 2001 7:17 PM
  Subject: Re: mixed content in DTDs


  I guess this is the correct format

  <!ELEMENT point (#PCDATA | sub-point )*> 

  > ----- Original Message ----- 
  > From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
  > To: "Lim Huat Heng" <hu...@ewarna.com>
  > Cc: <ge...@xml.apache.org>
  > Sent: Thursday, July 19, 2001 3:55 AM
  > Subject: mixed content in DTDs
  > 
  > 
  > > I have a line like this in my dtd:
  > > <!ELEMENT point (sub-point*,#PCDATA)>      
  > >     Is this violating the mixed content rule??
  > >  I get an error saying:
  > >     
  > >     A name was started with an invalid character. Line 11, Position 41 
  > > 
  > >             <!ELEMENT point (sub-point*,#PCDATA)>      
  > > ----------------------------------------^
  > > 
  > > HELP
  > > 
  > > Kazi
  > > 
  > > 
  > > ---------------------------------------------------------------------
  > > 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
  > > 
  > > 
  > > 
  > 
  > 
  > ---------------------------------------------------------------------
  > 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: mixed content in DTDs - the workaround.

Posted by "Kazi the P i R @ t {-" <ka...@ewarna.com>.
hello everybody,
well, i gotta thank all of you for the help first of all.

Now, let me tel tell you what i did in the end...
      As <dpenton> suggested, i changed the order of the #PCDATA and the sub-point child.
      But that resulted in another error. 
      
      Then i had to go with a workaround... by adding another element:
         
            <!ELEMENT point (description)>      
                <!ELEMENT description (sub-point*)>
                    <!ELEMENT sub-point (#PCDATA)>

Kazi.

PS. I am feeling now maybe that i didnt explain my intentions clearly in my mail...  i was trying to create xml for writing a list of notes where any certain point in the list could having nested points or 'sub-points' as i call them.
      
  ----- From: dpenton@arrowsash.com 
  To: general@xml.apache.org 
  Sent: Saturday, July 21, 2001 5:21 AM
  Subject: Re: mixed content in DTDs


  Right.  I seem to have tried to answer too late at night!  The asterisk goes where you have it for mixed content.
    ----- Original Message ----- 
    From: kkumari 
    To: general@xml.apache.org 
    Sent: Saturday, May 19, 2001 7:17 AM
    Subject: Re: mixed content in DTDs


    I guess this is the correct format

    <!ELEMENT point (#PCDATA | sub-point )*> 

    > ----- Original Message ----- 
    > From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
    > To: "Lim Huat Heng" <hu...@ewarna.com>
    > Cc: <ge...@xml.apache.org>
    > Sent: Thursday, July 19, 2001 3:55 AM
    > Subject: mixed content in DTDs
    > 
    > 
    > > I have a line like this in my dtd:
    > > <!ELEMENT point (sub-point*,#PCDATA)>      
    > >     Is this violating the mixed content rule??
    > >  I get an error saying:
    > >     
    > >     A name was started with an invalid character. Line 11, Position 41 
    > > 
    > >             <!ELEMENT point (sub-point*,#PCDATA)>      
    > > ----------------------------------------^
    > > 
    > > HELP
    > > 
    > > Kazi
    > > 
    > > 
    > > ---------------------------------------------------------------------
    > > 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
    > > 
    > > 
    > > 
    > 
    > 
    > ---------------------------------------------------------------------
    > 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: mixed content in DTDs

Posted by dp...@arrowsash.com.
Right.  I seem to have tried to answer too late at night!  The asterisk goes where you have it for mixed content.
  ----- Original Message ----- 
  From: kkumari 
  To: general@xml.apache.org 
  Sent: Saturday, May 19, 2001 7:17 AM
  Subject: Re: mixed content in DTDs


  I guess this is the correct format

  <!ELEMENT point (#PCDATA | sub-point )*> 

  > ----- Original Message ----- 
  > From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
  > To: "Lim Huat Heng" <hu...@ewarna.com>
  > Cc: <ge...@xml.apache.org>
  > Sent: Thursday, July 19, 2001 3:55 AM
  > Subject: mixed content in DTDs
  > 
  > 
  > > I have a line like this in my dtd:
  > > <!ELEMENT point (sub-point*,#PCDATA)>      
  > >     Is this violating the mixed content rule??
  > >  I get an error saying:
  > >     
  > >     A name was started with an invalid character. Line 11, Position 41 
  > > 
  > >             <!ELEMENT point (sub-point*,#PCDATA)>      
  > > ----------------------------------------^
  > > 
  > > HELP
  > > 
  > > Kazi
  > > 
  > > 
  > > ---------------------------------------------------------------------
  > > 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
  > > 
  > > 
  > > 
  > 
  > 
  > ---------------------------------------------------------------------
  > 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: mixed content in DTDs

Posted by kkumari <kk...@cinoni.com>.
I guess this is the correct format

<!ELEMENT point (#PCDATA | sub-point )*> 

> ----- Original Message ----- 
> From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
> To: "Lim Huat Heng" <hu...@ewarna.com>
> Cc: <ge...@xml.apache.org>
> Sent: Thursday, July 19, 2001 3:55 AM
> Subject: mixed content in DTDs
> 
> 
> > I have a line like this in my dtd:
> > <!ELEMENT point (sub-point*,#PCDATA)>      
> >     Is this violating the mixed content rule??
> >  I get an error saying:
> >     
> >     A name was started with an invalid character. Line 11, Position 41 
> > 
> >             <!ELEMENT point (sub-point*,#PCDATA)>      
> > ----------------------------------------^
> > 
> > HELP
> > 
> > Kazi
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> 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: mixed content in DTDs

Posted by dp...@arrowsash.com.
Sorry for the stray comma in my first post.  Should be:

<!ELEMENT point (#PCDATA,sub-point*)>
      
----- Original Message ----- 
From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
To: "Lim Huat Heng" <hu...@ewarna.com>
Cc: <ge...@xml.apache.org>
Sent: Thursday, July 19, 2001 3:55 AM
Subject: mixed content in DTDs


> I have a line like this in my dtd:
> <!ELEMENT point (sub-point*,#PCDATA)>      
>     Is this violating the mixed content rule??
>  I get an error saying:
>     
>     A name was started with an invalid character. Line 11, Position 41 
> 
>             <!ELEMENT point (sub-point*,#PCDATA)>      
> ----------------------------------------^
> 
> HELP
> 
> Kazi
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 


---------------------------------------------------------------------
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: mixed content in DTDs

Posted by dp...@arrowsash.com.
You must declare #PCDATA first in mixed content:

<!ELEMENT point (#PCDATA,sub-point*,)>      

----- Original Message ----- 
From: "Kazi the P i R @ t {-" <ka...@ewarna.com>
To: "Lim Huat Heng" <hu...@ewarna.com>
Cc: <ge...@xml.apache.org>
Sent: Thursday, July 19, 2001 3:55 AM
Subject: mixed content in DTDs


> I have a line like this in my dtd:
> <!ELEMENT point (sub-point*,#PCDATA)>      
>     Is this violating the mixed content rule??
>  I get an error saying:
>     
>     A name was started with an invalid character. Line 11, Position 41 
> 
>             <!ELEMENT point (sub-point*,#PCDATA)>      
> ----------------------------------------^
> 
> HELP
> 
> Kazi
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 


---------------------------------------------------------------------
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