You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Lee Fisher <l....@gmail.com> on 2014/12/25 20:40:59 UTC

location of libraries/library/module/script DTDs?

Hi,

Where can I find these DTDs:

  libraries.dtd
  library.dtd
  module.dtd
  scripting.dtd

These are used in ODF packages for the script-lb.xml, script-lc.xml, and
parcel-description.xml files. Besides the DTDs, are there any specs that
describe the format of these 3 XML files?

I haven't found them in the SDK or the source distribution.

I need them to do DTD validation of the script-related metadata in these
XML files, in addition to the RelaxNG validation of the other ODF XML
content.

I'm working on an ODF diagnostic tool, and I need to study these to
determine if there can be multiple scripts per XML file, etc.

Thanks,
Lee

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


Re: location of libraries/library/module/script DTDs?

Posted by Regina Henschel <rb...@t-online.de>.
Hi Lee,

Lee Fisher schrieb:
> Hi,
>
> Where can I find these DTDs:
>
>    libraries.dtd
>    library.dtd
>    module.dtd
>    scripting.dtd

You can search the code with http://opengrok.adfinis-sygroup.org/ and 
look into the files.

In this case you will find, that the first three are in 
main/xmlscript/dtd/. For scripting.dtd I cannot help you. It seems to be 
a namespace URI.

>
> These are used in ODF packages for the script-lb.xml, script-lc.xml, and
> parcel-description.xml files. Besides the DTDs, are there any specs that
> describe the format of these 3 XML files?

The format is in the libraries.dtd.

Kind regards
Regina

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


Re: location of scripting.dtd?

Posted by Lee Fisher <l....@gmail.com>.
Thanks very much for all the background on these scripting DTDs.



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


Re: location of scripting.dtd?

Posted by Oliver Brinzing <Ol...@gmx.de>.
Hi,

maybe this could help?

http://www.openoffice.org/framework/scripting/scriptingf1/developer-guide.html#dtd

Regards
Oliver
-- 


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


RE: location of scripting.dtd?

Posted by "Dennis E. Hamilton" <de...@acm.org>.

  -- replying below to --
From: Lee Fisher [mailto:l.office.fisher@gmail.com] 
Sent: Saturday, December 27, 2014 17:34
To: dev@openoffice.apache.org
Subject: Re: location of scripting.dtd?

> [...] The files listed below are not conventional files used in ODF
packages.
> The basic ODF files do not use DTDs and files by those names are not
> part of the standard ODF document structure. [...]

The Apache OpenOffice source code does ship sample scripts with
parcel-descriptor.xml files, which refer to scripting.dtd. Two of the
DeveloperGuide/ScriptingFramework samples have them:

  ScriptSelector/ScriptSelector/parcel-descriptor.xml
  ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml

Both refer to a scripting.dtd:

  <parcel language="Java" xmlns:parcel="scripting.dtd">

Yet scripting.dtd is mising.

<orcmid>
   That is one peculiar namespace declaration.  
   It is *not* an invocation of a DTD.  
   It is use of a relative URI (a no-no) as
   a namespace identifier.

   In a time long ago, some DTDs were installed
   in the directories of the binaries.

   That still happens, though there is probably 
   no earthly reason for them to be there.  Take
   a look at 
   OpenOffice4/share/dtd/officedocument/1_0/
   wherever you have AOO 4.1.1 installed.
   These are a throw-back to the original 
   proposal of OpenOffice.org in the creation
   of ODF 1.0, which then chose to use 
   Relax NG and namespaces instead.  

   XML files with DTDs on them, for the parts
   defined in ODF, do not have or require
   DTDs. 

   The *.mod ones are "modules" that are
   included in others by external-entity
   definitions.  Look at the office.dtd
   for examples.  The script.mod is one of
   those.
   
   These applied only to OpenOffice 1.x
   releases.  They are not for ODF as
   it was approved.

   Read the notice in office.dtd.

   I would look at script.mod, compile some
   ODT files with scripts in them, and see
   what you can surmise the grammar of 
   current script files might be in ODF
   packages.
</orcmid>

I did find some of the other DTDs I was looking for in the AOO sources,
and one that may be related:

  main/xmloff/dtd/script.mod may be (or have been) related.
  main/xmlscript/dtd has libraries.dtd, library.dtd, and module.dtd.

Still, no scripting.dtd that I can find in Apache OpenOffice SDK or
source. Perhaps this file was part of an earlier Sun/Oracle release,
that was deleted during the incubation process? (BTW, LibreOffice also
does not have this dtd.)

Thanks,
Lee

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


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


Re: location of scripting.dtd?

Posted by Lee Fisher <l....@gmail.com>.
> [...] The files listed below are not conventional files used in ODF
packages.
> The basic ODF files do not use DTDs and files by those names are not
> part of the standard ODF document structure. [...]

The Apache OpenOffice source code does ship sample scripts with
parcel-descriptor.xml files, which refer to scripting.dtd. Two of the
DeveloperGuide/ScriptingFramework samples have them:

  ScriptSelector/ScriptSelector/parcel-descriptor.xml
  ScriptingFramework/SayHello/SayHello/parcel-descriptor.xml

Both refer to a scripting.dtd:

  <parcel language="Java" xmlns:parcel="scripting.dtd">

Yet scripting.dtd is mising.

I did find some of the other DTDs I was looking for in the AOO sources,
and one that may be related:

  main/xmloff/dtd/script.mod may be (or have been) related.
  main/xmlscript/dtd has libraries.dtd, library.dtd, and module.dtd.

Still, no scripting.dtd that I can find in Apache OpenOffice SDK or
source. Perhaps this file was part of an earlier Sun/Oracle release,
that was deleted during the incubation process? (BTW, LibreOffice also
does not have this dtd.)

Thanks,
Lee

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


Re: location of libraries/library/module/script DTDs?

Posted by Lee Fisher <l....@gmail.com>.
| I'll dig up the specific filenames.

100016.odt
101028.odt
104556.odt
113481.odt
70065.odt
78691.odt
79664.odt
80654.odt
81045.odt
86470.odt

These are examples of documents have the parcel-descriptor.xml file in
the Scripts/ subdirectory of their package, which uses scripting.dtd.

I got these files second-hand, from a dump of the AOO bug database, but
I believe if you're good at the AOO bug database you could probably find
them there. I can email a zip with one/more of these documents to anyone
who wishes a copy.

Sorry, my tools isn't done dumping out a nice summary of the info yet.
:-) There are a LOT more files which use the script-lb.xml and
script-lc.xml files, which appear to be tied to StarBasic, mostly in the
Basic/* subdirectory of the package. A few of the above files have both
(Java or JavaScript scripts and StarBasic, so have all 3 XML files and
refer to all of the DTDs.

Thanks,
Lee

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


Re: location of libraries/library/module/script DTDs?

Posted by Lee Fisher <l....@gmail.com>.
> It is correct that you will find many XML based documents that refer
to DTD
> documents, actually it is a part of XML standard to do so.
>
> But that does not mean that scripts or programs use these files. They are
> often (and in case of AOO it is so) included just as a reference for
> defining which XML constructs are legal. If you google DTD there are a
> handfull of sites that offer them for both ODF and OOXML.

Thanks to multiple responders, for the pointers to more easily search
the code.

The box with the data in question is down for backup, I'll get you
specific file names and creator versions by morning.

And, again I realize scripting is outside realm of OASIS spec, yet AOO
and other clients need to read these documents which contain these scripts.

If AOO reads these and doesn't have the DTDs to validate the metdata
before running scripts, that sounds kindof scary. That's why I was
presuming I'd find the DTDs in the current AOO code, regardless of which
codebase generated the original documents.

I mainly need to know if the XML files can contain multiple scripts per
file, or there must be a separate file for each script (which I think is
the case).

All scripts I've found to date are StarBasic, Java JARs, Java BeanShell,
and JavaScript. (I haven't started parsing the MS-centric VBA OLE2 blobs
yet.) I've not found any Python-based scripts yet. I'm not sure what
other language-based scripts to be expecting, from the various ODF
implementors... :-) I heard someone asking the LibreOffice team to
support Guide-based scripting at a recent conference. :-|

I've been doing this code by reading the ODF spec, and studying data
from code output. I've not yet studied how AOO's current code handles
scripts. That's my next step. :-)

I don' t yet know which clients run the various scripts. If there is any
AOO or other org ODF script interop matrix data, I would very much
appreciate a pointer.

Thanks,
Lee

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


Re: location of libraries/library/module/script DTDs?

Posted by jan i <ja...@apache.org>.
On 25 December 2014 at 21:18, Lee Fisher <l....@gmail.com> wrote:

> I got a dump of 250MB of ODF files from the AOO bug database, via Rob,
> the ODF subset used for his recent Peach fuzzing.
>
> There are very few examples of scripts. All of the examples I've found
> to date use these XML files, which refer to these DTD files.
>
> I have not see any other script files which do not use these XML files
> and refer to these DTDs.
>
> So, these DTDs *are* referred by one ODF producer which implements scripts.
>
It is correct that you will find many XML based documents that refer to DTD
documents, actually it is a part of XML standard to do so.

But that does not mean that scripts or programs use these files. They are
often (and in case of AOO it is so) included just as a reference for
defining which XML constructs are legal. If you google DTD there are a
handfull of sites that offer them for both ODF and OOXML.

rgds
jan i.




>
> I'll dig up the specific filenames.
>
> Since these scripts came from the bug database, the're the 'wild west',
> could be generated from anywhere.
>
> I really wish I had a test suite of AOO QA documents which exercised the
> script abilities.
>
> I realize scripting is outside of the OASIS ODF spec. I would like to
> find the AOO docs that describe their implementation of scripts.
>
> Thanks,
> Lee
>
> On 12/25/2014 11:54 AM, Dennis E. Hamilton wrote:
> > The files listed below are not conventional files used in ODF packages.
> The basic ODF files do not use DTDs and files by those names are not part
> of the standard ODF document structure.  While there might be other files
> in an ODF package, usually XML files are expected to conform to [xml-names]
> and need a different schema.
> >
> > What is the file extension on the files you are examining and are there
> standard ODF components there as well, such as content.xml (the minimum
> requirement) and a META-INF/manifest.xml conforming to the ODF
> specification.
> > If it is otherwise an ODF package, the meta.xml file should reveal what
> software produced it.
> >
> > It may be that these are *OpenOffice-specific and you will find nothing
> about them in the ODF specification, so your tool may need to differentiate
> between ODF and implementation-specific content.
> >
> > Note that scripting is implementation-dependent in the ODF specification.
> >
> >  - Dennis
> >
> > -----Original Message-----
> > From: Lee Fisher [mailto:l.office.fisher@gmail.com]
> > Sent: Thursday, December 25, 2014 11:41
> > To: dev@openoffice.apache.org
> > Subject: location of libraries/library/module/script DTDs?
> >
> > Hi,
> >
> > Where can I find these DTDs:
> >
> >   libraries.dtd
> >   library.dtd
> >   module.dtd
> >   scripting.dtd
> >
> > These are used in ODF packages for the script-lb.xml, script-lc.xml, and
> > parcel-description.xml files. Besides the DTDs, are there any specs that
> > describe the format of these 3 XML files?
> >
> > I haven't found them in the SDK or the source distribution.
> >
> > I need them to do DTD validation of the script-related metadata in these
> > XML files, in addition to the RelaxNG validation of the other ODF XML
> > content.
> >
> > I'm working on an ODF diagnostic tool, and I need to study these to
> > determine if there can be multiple scripts per XML file, etc.
> >
> > Thanks,
> > Lee
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> > For additional commands, e-mail: dev-help@openoffice.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> > For additional commands, e-mail: dev-help@openoffice.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>

Re: location of libraries/library/module/script DTDs?

Posted by Lee Fisher <l....@gmail.com>.
I got a dump of 250MB of ODF files from the AOO bug database, via Rob,
the ODF subset used for his recent Peach fuzzing.

There are very few examples of scripts. All of the examples I've found
to date use these XML files, which refer to these DTD files.

I have not see any other script files which do not use these XML files
and refer to these DTDs.

So, these DTDs *are* referred by one ODF producer which implements scripts.

I'll dig up the specific filenames.

Since these scripts came from the bug database, the're the 'wild west',
could be generated from anywhere.

I really wish I had a test suite of AOO QA documents which exercised the
script abilities.

I realize scripting is outside of the OASIS ODF spec. I would like to
find the AOO docs that describe their implementation of scripts.

Thanks,
Lee

On 12/25/2014 11:54 AM, Dennis E. Hamilton wrote:
> The files listed below are not conventional files used in ODF packages.  The basic ODF files do not use DTDs and files by those names are not part of the standard ODF document structure.  While there might be other files in an ODF package, usually XML files are expected to conform to [xml-names] and need a different schema. 
>
> What is the file extension on the files you are examining and are there standard ODF components there as well, such as content.xml (the minimum requirement) and a META-INF/manifest.xml conforming to the ODF specification.
> If it is otherwise an ODF package, the meta.xml file should reveal what software produced it.
>
> It may be that these are *OpenOffice-specific and you will find nothing about them in the ODF specification, so your tool may need to differentiate between ODF and implementation-specific content.
>
> Note that scripting is implementation-dependent in the ODF specification.
>
>  - Dennis
>
> -----Original Message-----
> From: Lee Fisher [mailto:l.office.fisher@gmail.com] 
> Sent: Thursday, December 25, 2014 11:41
> To: dev@openoffice.apache.org
> Subject: location of libraries/library/module/script DTDs?
>
> Hi,
>
> Where can I find these DTDs:
>
>   libraries.dtd
>   library.dtd
>   module.dtd
>   scripting.dtd
>
> These are used in ODF packages for the script-lb.xml, script-lc.xml, and
> parcel-description.xml files. Besides the DTDs, are there any specs that
> describe the format of these 3 XML files?
>
> I haven't found them in the SDK or the source distribution.
>
> I need them to do DTD validation of the script-related metadata in these
> XML files, in addition to the RelaxNG validation of the other ODF XML
> content.
>
> I'm working on an ODF diagnostic tool, and I need to study these to
> determine if there can be multiple scripts per XML file, etc.
>
> Thanks,
> Lee
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>


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


RE: location of libraries/library/module/script DTDs?

Posted by "Dennis E. Hamilton" <de...@acm.org>.
The files listed below are not conventional files used in ODF packages.  The basic ODF files do not use DTDs and files by those names are not part of the standard ODF document structure.  While there might be other files in an ODF package, usually XML files are expected to conform to [xml-names] and need a different schema. 

What is the file extension on the files you are examining and are there standard ODF components there as well, such as content.xml (the minimum requirement) and a META-INF/manifest.xml conforming to the ODF specification.
If it is otherwise an ODF package, the meta.xml file should reveal what software produced it.

It may be that these are *OpenOffice-specific and you will find nothing about them in the ODF specification, so your tool may need to differentiate between ODF and implementation-specific content.

Note that scripting is implementation-dependent in the ODF specification.

 - Dennis

-----Original Message-----
From: Lee Fisher [mailto:l.office.fisher@gmail.com] 
Sent: Thursday, December 25, 2014 11:41
To: dev@openoffice.apache.org
Subject: location of libraries/library/module/script DTDs?

Hi,

Where can I find these DTDs:

  libraries.dtd
  library.dtd
  module.dtd
  scripting.dtd

These are used in ODF packages for the script-lb.xml, script-lc.xml, and
parcel-description.xml files. Besides the DTDs, are there any specs that
describe the format of these 3 XML files?

I haven't found them in the SDK or the source distribution.

I need them to do DTD validation of the script-related metadata in these
XML files, in addition to the RelaxNG validation of the other ODF XML
content.

I'm working on an ODF diagnostic tool, and I need to study these to
determine if there can be multiple scripts per XML file, etc.

Thanks,
Lee

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


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


Re: location of libraries/library/module/script DTDs?

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hello Lee,

On Thu, Dec 25, 2014 at 11:40:59AM -0800, Lee Fisher wrote:
> Hi,
> 
> Where can I find these DTDs:
> 
>   libraries.dtd
>   library.dtd
>   module.dtd
>   scripting.dtd

You can use http://opengrok.adfinis-sygroup.org/
Select aoo-trunk "In Projec(s)" and put the filename in "File Path",
this will tell you they are in main/xmlscript/dtd/
https://svn.apache.org/viewvc/openoffice/trunk/main/xmlscript/dtd/
(though I can't find "scripting.dtd").

If you use OpenOffice, open a document, go to the menu Tools
- Customize, modify a toolbar or the menu, and store the changes inside
the document, you'll get extra xml files, their DTDs are in
https://svn.apache.org/viewvc/openoffice/trunk/main/framework/dtd/


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina