DEDSL and XML tools - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

DEDSL and XML tools

Description:

Castor is a supports a large number of XML Schema capabilities. Next steps ... Enhance capabilities of Castor generated code by addition of a small number of ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 16
Provided by: davidgi9
Category:
Tags: dedsl | xml | castor | tools

less

Transcript and Presenter's Notes

Title: DEDSL and XML tools


1
DEDSL and XML tools
2
DEDSL API
  • A previous paper proposed a Java API for DEDSL
  • An implementation was produced for DEDSL PVL
    concrete syntax
  • Used JACC to develop a parser for PVL
  • DEDSL PVL rules were embedded in the code
  • User Attributes difficult to handle

3
Interface
  • Needs to provide information about
  • Descriptors
  • Attributes
  • Entities
  • Dictionary

4
Additional benefits from JAVA Interface
  • Can be used for several underlying
    implementations e.g. PVL and XML
  • Easily used in Remote Method Invocation (RMI) for
    network access to Dictionary
  • Can be used as basis for producing CORBA IDL
    which can be input to idltojava tool

5
Further considerations
  • JavaCC
  • produces SimpleNode alter this to implement
    java.swing.tree.TableNode in order to be able to
    generate good GUI
  • Provide basic parsing must provide additional
    checking etc in extra coding
  • Entities, Dictionary properties and Attributes
    are provided as SimpleNode trees which may be
    traversed

6
Interface
  • public interface DedslDictionary
  • public int getDedslNumberOfDescriptors()
  • public String getDedslDescriptorNames()
  • public SimpleNode getDedslDescriptor(String
    descriptorName)
  • public int getDedslNumberOfAttributes()
  • public String getDedslAttributeNames()
  • public SimpleNode getDedslAttribute(String
    attributeName)
  • public int getDedslNumberOfEntities()
  • public String getDedslEntityNames()
  • public SimpleNode getDedslEntity(String
    entityName)
  • public int getDedslNumberOfDictionaryProperti
    es()
  • public String getDedslDictionaryPropertyNam
    es()
  • public SimpleNode getDedslDictionaryProperty(S
    tring propName)
  • public SimpleNode getDedslEntityAttribute(
    String ent, String att)

7
Minimum set of API
  • public String getDedslDescriptorNames()
  • public String getDedslAttributeNames()
  • public String getDedslEntityNames()
  • public SimpleNode getDedslEntityAttribute(
    String ent, String att)

8
Problems
  • Difficult very difficult to support over the
    long term

9
Use of XML
  • XML hope is that COTS and Open Source tools will
    be available
  • Will thereby minimise the amount of code needed
  • Will make any tools we develop much easier to
    maintain

10
Example XML tools
  • SAX libraries
  • DOM libraries
  • Dom4J
  • JDOM
  • JAXB
  • Castor

11
METS API
  • Chose JAXB API
  • However JAXB only deals with DTDs at the moment.
  • Lots of additional code needed.

12
METS toolkit
The JAXB specification is still in early
pre-release development. Although a preliminary
early version implementation of the class
generator has been released, it only accepts as
input a subset of the XML DTD language XML
schema is not supported at all. Thus, all of the
base classes as well as the METS schema-specific
class used in the toolkit were constructed
manually, following the JAXB API specification.
13
Use of Schema
  • Schema has additional information about data
    types and specification of elements
  • Namespaces allow more flexibility
  • Code generators have more to work with

14
Castor
  • Castor generates code from XML Schema
  • Castor is a supports a large number of XML Schema
    capabilities

15
Next steps
  • Develop draft XML Schema concrete syntax for
    DEDSL
  • Should lead to WB
  • Enhance capabilities of Castor generated code by
    addition of a small number of classes to deal
    with inheritance
Write a Comment
User Comments (0)
About PowerShow.com