-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: using the dtd offline
PostPosted: Tue Apr 05, 2005 10:49 am 
Beginner
Beginner

Joined: Wed Oct 29, 2003 10:43 am
Posts: 38
Location: Chicago
How would I use the dtd so that I would not need to be on the internet?
Ideally I would like it to be on the classpath. Is that possible?
I mean the hibenate-mapping-dtd.xml

_________________
LET IT BE :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 12:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
I don't understand what you are asking. By default HIbernate attempts to resolve its DTDs locally via a custom EntityResolver already.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 5:33 pm 
Beginner
Beginner

Joined: Wed Oct 29, 2003 10:43 am
Posts: 38
Location: Chicago
Sorry, I used middlegen to generate the hbm.xml file and it starts out :

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http:/hibernate.sourceforge.net/hibernate.hibernate-mapping-2.0.dtd" >

I wanted to change from the http from source forge to a classpath if possible.
I guess I could set up local server. What other possiblities are there is what I am asking?

_________________
LET IT BE :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 8:05 am 
Regular
Regular

Joined: Wed Feb 02, 2005 6:33 am
Posts: 70
By default, the hibernate jar includes the DTD's described. A custom EntityResolver is used, so that when the DTD id to be retrieved, it looks for the DTD's in the local hibernate jar first, only going to the internet if it is not present.

HIbernate 3 uses a different DTD to Hibernate 2, so if you're using that, the mapping file DOCTYPE should be:

Code:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http:/hibernate.sourceforge.net/hibernate.hibernate-mapping-3.0.dtd" >


If you use the style you mentioned with hibernate 3, it will not be included in the hibernate jar, and so will have to retrieve from the internet.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 9:56 am 
Beginner
Beginner

Joined: Wed Oct 29, 2003 10:43 am
Posts: 38
Location: Chicago
thanks i used middlegen for version 2 not 3 ill change to what you said I should be ok. Do you know if the middlegen tool is ready for version 3?

how about the hbm2java tool?

_________________
LET IT BE :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.