[jdom-interest] Bug in JDOM or not ????????

Chris chris at bitmead.com
Wed Aug 20 10:08:00 PDT 2003


Ok, I realised I needed to set another flag in jtidy to get it to output 
XHTML. Now it is ok. Thanks!

Sanjeev Verma [CONTRACTOR] wrote:

>See here:
>
>http://www.w3schools.com/xhtml/xhtml_dtd.asp
>
>This is part of a XHTML tutorial. This page explains the three types of DOCTYPES 
>a XHTML page can have. Any XHTML page should have ONE AND ONLY ONE of the 
>DOCTYPES mentioned here.
>
>This should help.
>
>Regards
>
>Sanjeev
>
>
>  
>
>>Delivered-To: jdom-interest at dorothy.denveronline.net
>>From: Chris <chris at bitmead.com>
>>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) 
>>    
>>
>Gecko/20030624
>  
>
>>X-Accept-Language: en-us, en
>>MIME-Version: 1.0
>>To: "Sanjeev Verma [CONTRACTOR]" <sanjeev.verma at sun.com>
>>Cc: jdom-interest at jdom.org
>>Subject: Re: [jdom-interest] Bug in JDOM or not ????????
>>Content-Transfer-Encoding: 8bit
>>X-BeenThere: jdom-interest at jdom.org
>>X-Mailman-Version: 2.0.1
>>List-Help: <mailto:jdom-interest-request at jdom.org?subject=help>
>>List-Post: <mailto:jdom-interest at jdom.org>
>>List-Subscribe: <http://lists.denveronline.net/mailman/listinfo/jdom-interest>, 
>>    
>>
><mailto:jdom-interest-request at jdom.org?subject=subscribe>
>  
>
>>List-Id: JDOM Mailing List for General Issues and Updates 
>>    
>>
><jdom-interest.jdom.org>
>  
>
>>List-Unsubscribe: 
>>    
>>
><http://lists.denveronline.net/mailman/listinfo/jdom-interest>, 
><mailto:jdom-interest-request at jdom.org?subject=unsubscribe>
>  
>
>>List-Archive: <http://lists.denveronline.net/pipermail/jdom-interest/>
>>Date: Thu, 21 Aug 2003 02:58:50 +1000
>>
>>
>>No there's nothing like that. I'm using the jtidy utility to convert 
>>regular html into xhtml, but I don't see anything like DOCTYPE.
>>
>>Sanjeev Verma [CONTRACTOR] wrote:
>>
>>    
>>
>>>Is the DOCTYPE declared at the top of the xhtml file that you want to parse?
>>>
>>>Regards
>>>
>>>Sanjeev
>>>
>>> 
>>>
>>>      
>>>
>>>>Delivered-To: jdom-interest at dorothy.denveronline.net
>>>>From: Chris <chris at bitmead.com>
>>>>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) 
>>>>   
>>>>
>>>>        
>>>>
>>>Gecko/20030624
>>> 
>>>
>>>      
>>>
>>>>X-Accept-Language: en-us, en
>>>>MIME-Version: 1.0
>>>>To: "Sanjeev Verma [CONTRACTOR]" <sanjeev.verma at sun.com>
>>>>Cc: jdom-interest at jdom.org
>>>>Subject: Re: [jdom-interest] Bug in JDOM or not ????????
>>>>Content-Transfer-Encoding: 8bit
>>>>X-BeenThere: jdom-interest at jdom.org
>>>>X-Mailman-Version: 2.0.1
>>>>List-Help: <mailto:jdom-interest-request at jdom.org?subject=help>
>>>>List-Post: <mailto:jdom-interest at jdom.org>
>>>>List-Subscribe: 
>>>>        
>>>>
><http://lists.denveronline.net/mailman/listinfo/jdom-interest>, 
>  
>
>>>>   
>>>>
>>>>        
>>>>
>>><mailto:jdom-interest-request at jdom.org?subject=subscribe>
>>> 
>>>
>>>      
>>>
>>>>List-Id: JDOM Mailing List for General Issues and Updates 
>>>>   
>>>>
>>>>        
>>>>
>>><jdom-interest.jdom.org>
>>> 
>>>
>>>      
>>>
>>>>List-Unsubscribe: 
>>>>   
>>>>
>>>>        
>>>>
>>><http://lists.denveronline.net/mailman/listinfo/jdom-interest>, 
>>><mailto:jdom-interest-request at jdom.org?subject=unsubscribe>
>>> 
>>>
>>>      
>>>
>>>>List-Archive: <http://lists.denveronline.net/pipermail/jdom-interest/>
>>>>Date: Thu, 21 Aug 2003 02:41:44 +1000
>>>>
>>>>
>>>>So, assuming I want to do xhtml, can you tell me what I need to do? :-)
>>>>
>>>>Sanjeev Verma [CONTRACTOR] wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Hi Chris:
>>>>>
>>>>>The reason for the exception you are seeing is not because your xml is 
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>invalid, 
>>> 
>>>
>>>      
>>>
>>>>>because as you rightly said, it is! The error message says: "Reference to 
>>>>>undefined entity "&reg;"". What it means is that the DTD of this XML does 
>>>>>          
>>>>>
>not 
>  
>
>>>>>define this entity.
>>>>>
>>>>>This is XML parser behavior. Everytime it comes accross a entity, it will 
>>>>>          
>>>>>
>try 
>  
>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>to 
>>> 
>>>
>>>      
>>>
>>>>>resolve it as defined by the DTD. So, if the XML does not have a DOCTYPE 
>>>>>declaration at the beginning, or the DTD declared in the DOCTYTPE does not 
>>>>>define this entity, then this problem will occur. Check to see which is the 
>>>>>reason for failure in your case.
>>>>>
>>>>>Regards
>>>>>
>>>>>Sanjeev
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Delivered-To: jdom-interest at dorothy.denveronline.net
>>>>>>From: Chris <chris at bitmead.com>
>>>>>>User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) 
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>Gecko/20030624
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>X-Accept-Language: en-us, en
>>>>>>MIME-Version: 1.0
>>>>>>To: jdom-interest at jdom.org
>>>>>>Content-Transfer-Encoding: 8bit
>>>>>>Subject: [jdom-interest] Bug in JDOM or not ????????
>>>>>>X-BeenThere: jdom-interest at jdom.org
>>>>>>X-Mailman-Version: 2.0.1
>>>>>>List-Help: <mailto:jdom-interest-request at jdom.org?subject=help>
>>>>>>List-Post: <mailto:jdom-interest at jdom.org>
>>>>>>List-Subscribe: 
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>><http://lists.denveronline.net/mailman/listinfo/jdom-interest>, 
>>> 
>>>
>>>      
>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>><mailto:jdom-interest-request at jdom.org?subject=subscribe>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>List-Id: JDOM Mailing List for General Issues and Updates 
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>><jdom-interest.jdom.org>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>List-Unsubscribe: 
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>><http://lists.denveronline.net/mailman/listinfo/jdom-interest>, 
>>>>><mailto:jdom-interest-request at jdom.org?subject=unsubscribe>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>List-Archive: <http://lists.denveronline.net/pipermail/jdom-interest/>
>>>>>>Date: Wed, 20 Aug 2003 23:26:24 +1000
>>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>I'm parsing a file that looks like this....
>>>>>><element>
>>>>>> &reg;
>>>>>></element>
>>>>>>
>>>>>>But JDOM dies with this error....
>>>>>>
>>>>>>org.jdom.input.JDOMParseException: Error on line 2: Reference to 
>>>>>>undefined entity "&reg;".
>>>>>>
>>>>>>My understanding is that &reg; is valid XML. Certainly it is part of XHTML.
>>>>>>
>>>>>>The spec I read here.....
>>>>>>
>>>>>>http://www.w3.org/TR/xhtml1/Overview.html#issues
>>>>>>
>>>>>>Seems to indicate it is ok....
>>>>>>
>>>>>>"In both SGML and XML, the ampersand character ("&") declares the 
>>>>>>beginning of an entity reference (e.g., &reg; for the registered 
>>>>>>trademark symbol "®")."
>>>>>>
>>>>>>Is this a bug or is there something I don't understand???
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>To control your jdom-interest membership:
>>>>>>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourho
>>>>>>            
>>>>>>
>st
>  
>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>.c
>>> 
>>>
>>>      
>>>
>>>>>>  
>>>>>>
>>>>>>       
>>>>>>
>>>>>>            
>>>>>>
>>>>>om
>>>>>
>>>>>Best Regards
>>>>>
>>>>>Sanjeev Verma
>>>>>Sun ONE App Server Migration Consultant
>>>>>Web Services, Tools and Migration Tools
>>>>>Market Development Engineering
>>>>>
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>_______________________________________________
>>>>To control your jdom-interest membership:
>>>>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost
>>>>        
>>>>
>.c
>  
>
>>>>   
>>>>
>>>>        
>>>>
>>>om
>>>
>>>Best Regards
>>>
>>>Sanjeev Verma
>>>Sun ONE App Server Migration Consultant
>>>Web Services, Tools and Migration Tools
>>>Market Development Engineering
>>>
>>> 
>>>
>>>      
>>>
>>_______________________________________________
>>To control your jdom-interest membership:
>>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.c
>>    
>>
>om
>
>Best Regards
>
>Sanjeev Verma
>Sun ONE App Server Migration Consultant
>Web Services, Tools and Migration Tools
>Market Development Engineering
>
>  
>




More information about the jdom-interest mailing list