You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "George F. (JIRA)" <ji...@apache.org> on 2006/04/20 11:06:06 UTC

[jira] Created: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
-------------------------------------------------------------------------------------------------

         Key: TORQUE-3
         URL: http://issues.apache.org/jira/browse/TORQUE-3
     Project: Torque
        Type: Improvement

    Versions: 3.2    
 Environment: Windows XP, JDK 1.4 (I don't think this matters)
    Reporter: George F.
    Priority: Minor


In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.

Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
        if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
My suggestion : change this line to 
        if (databaseDTD != null)
and everything works fine.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Attachment: DTDResolver.java
                XmlToAppData.java

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/TORQUE-3?page=comments#action_12375604 ] 

Thomas Fischer commented on TORQUE-3:
-------------------------------------

The behaviour has already been changed in svn. The behaviour is now to check whether the dtd equals the current dtd name,
http://db.apache.org/torque/dtd/database_3_2.dtd
If yes, the dtd is loaded from the claspath, if not, null is returned and the dtd resolution is left to the xml parser.
So if the standard dtd uri is given, the dtd is loaded from the jar, if not, it is assumed that the user wishes to use another dtd, and he can do so.
Do you still propose to change this behaviour ? If yes, why ?

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Attachment:     (was: torque-gen-3.2-src-Patched.zip)

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor

>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/TORQUE-3?page=comments#action_12375679 ] 

Thomas Fischer commented on TORQUE-3:
-------------------------------------

I do not agree. This should work only if you download the Torque dtd, and rename it to database.dtd, and put it into the directory where you run from, because you tell the xml parser to load a file called database.dtd from the current working directory.
What probably should work (I'm not so sure about this, I do not have much experience in dtds) is this:
...
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_2.dtd"[
  <!ENTITY fieldTypes SYSTEM "torque/schema/field-types.xml">
]>
...

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Description: 
In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.

Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
        if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
My suggestion : change this line to 
        if (databaseDTD != null)
and everything works fine.

The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.


  was:
In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.

Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
        if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
My suggestion : change this line to 
        if (databaseDTD != null)
and everything works fine.



> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Kommentiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/TORQUE-3?page=comments#action_12375627 ] 

Joerg Friedrich commented on TORQUE-3:
--------------------------------------

Okay, I have to check with the svn version. What I think should be possible is this:

<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>

<!DOCTYPE database SYSTEM "database.dtd"[
  <!ENTITY fieldTypes SYSTEM "torque/schema/field-types.xml">
]>

<database name="track">

<!-- Here we include the domain definitions to account for database       -->
<!-- specific behaviour. Only those types are mapped that cause trouble   -->
<!-- across the different database systems                                -->

&fieldTypes; 

 


> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------


I have no downloaded the HEAD from the svn and rebuild the generator jar. I have run the generator on my schema file. It works all right, including the inclusion of the external schema file.

So as far aas I can see, this issue is resolved.



> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Attachment: torque-3.2-src-patched.zip
                torque-gen-3.2-src-Patched.zip

The files changed for enhanced Interbase/Firebird support

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: torque-3.2-src-patched.zip, torque-gen-3.2-src-Patched.zip
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Comment: was deleted

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Component: Generator

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>  Attachments: torque-3.2-src-patched.zip, torque-gen-3.2-src-Patched.zip
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Closed: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]
     
Thomas Fischer closed TORQUE-3:
-------------------------------

    Fix Version: 3.2.1
     Resolution: Fixed

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor
>      Fix For: 3.2.1
>  Attachments: DTDResolver.java, XmlToAppData.java
>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.
> The attachments contain another modification: with the current implementation it is not possible to include another XML file into an XML schema file. This is quite useful if schema files are very large or one wants to separate database dependencies of SQL data types into database specific mapping files using the <domain> directive. This should  be possible with the patch provided.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Aktualisiert: (TORQUE-3) Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java

Posted by "Joerg Friedrich (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-3?page=all ]

Joerg Friedrich updated TORQUE-3:
---------------------------------

    Attachment:     (was: torque-3.2-src-patched.zip)

> Generator: resolving database.dtd in org.apache.torque.engine.database.transform.DTDResolver.java
> -------------------------------------------------------------------------------------------------
>
>          Key: TORQUE-3
>          URL: http://issues.apache.org/jira/browse/TORQUE-3
>      Project: Torque
>         Type: Improvement

>   Components: Generator
>     Versions: 3.2
>  Environment: Windows XP, JDK 1.4 (I don't think this matters)
>     Reporter: Joerg Friedrich
>     Priority: Minor

>
> In class org.apache.torque.engine.database.transform.DTDResolver the DTD for the XMP schema files is retrieved via either a (1) getResourceAsStream("database.dtd") call, a (2) getInputSource("http://db.apache.org/torque/dtd/database_3_2.dtd") or a (3) getInputSource("systemId"), where systemId is typically made up of the system designator in the DOCTYPE statement inside the XML schema file prepended with the absolute path of the location of the current working directory or directory from which the generator.
> Usually the database.dtd is found in the class path (method 1), since it is delivered with the generator jar. However, as soon as we do something like this in the XML file: <!DOCTYPE database SYSTEM "database.dtd"> the generator does not work any more, unless we place a copy of database.dtd at the current working directory (thus, system reverts to (3)). This behaviour comes from this line in method resolveEntity:
>         if (databaseDTD != null  && (WEB_SITE_DTD.equals(systemId))
> since the systemId in this case looks something like this: file:///d:torque/torque-gen-3.2/database.dtd and of course does not match the WEB_SITE_DTD string.
> My suggestion : change this line to 
>         if (databaseDTD != null)
> and everything works fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org