Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
res
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

README.md

eoa2-xmldb

Experimental implementation. Aims to replace relational database/django by xml technologies

Dependencies

Scripts to control the Webserver

  • Initialize the repository

      $ git_deps
      $ ./scripts/install.py
    
  • Start the Webserver

      $ ./scripts/run.py
    
  • Create superuser for django CMS:

      $ ./scripts/exec_in_container.py 'python manage.py createsuperuser'
    

    (enter username, etc)

  • enter basic CMS pages

    in your browser, go to 'http://localhost:8002/admin/cms/page/'. Add 3 pages:

    • Introduction (Id: 'intropage')
    • Contact (Id: 'contact')
    • Imprint (Id: 'imprint')

    These are required by the system!

  • Import example publication (similar for other publications):

      $ ./scripts/exec_in_container.py 'python manage.py publication_import $INPUT_DIR/125_tei_part'
    

    (you'll need to stop and start the webserver afterwards)

  • Stop the Webserver

      $ ./scripts/stop.py
    
  • Clean up the repository

      $ ./scripts/uninstall.py
    

Other Scripts

  • see './scripts/'. All scripts accept --help.

Extend Functionality and Design using XSLT Scripts

  1. Let a complete page be rendered using an XSL stylesheet:

    • in your browser, go to the django admin interface localhost:8002/admin. In the "XSL" row, create an new "instance", e.g. named "example" of the xsl app. Enter the xml file you want to render using the stylesheet, stylesheet, and the stylesheet parameters (don't forget to enter required parameters!) (demo example: xml file: example.xml, stylesheet: example_fullpage.xsl)

    • click "Save"

    • back to localhost:8002/admin

    • under "Pages", add a new page that you want to be rendered using xsl

    • click "Save and continue editing"

    • open "Advanced Settings":

      • under "Application", select "XSL Apphook"
      • under "Application Configurations:", select the instance, you just created (e.g. "example")
      • click "Save"

    Test the created webpage. If you get an error, most likely an exception occured in the stylesheet (are you missing a required parameter?).

  2. render parts of a page using an XSL stylesheet:

    • in your browser, go to the page, on which you want some content to be rendered via an xsl script.
    • in the cms bar, click on "Edit"
    • toggle "Structure Mode"
    • add the "XSL Plugin" Enter the xml file you want to render using the stylesheet, stylesheet, and the stylesheet parameters (don't forget to enter required parameters!) (demo example: xml file: example.xml, stylesheet: example_list.xsl)
    • click "Save"

    Test the created page. If you get an error, most likely an exception occured in the stylesheet (are you missing a required parameter?).

Install new Stylesheets

- copy your stylesheet, e.g. `stylesheet.xsl` to `res/xml/stylesheets/`
- stop the webserver, if running
- `./scripts/install.py`, to synchronise `res` -> `runtime_data/res.rt`
- restart webserver, to make the xml database recognise the stylesheet

Your stylesheet can be selected for rendering via django cms now.

git_deps

For dependant packages, specify the git hash in dependencies.conf and re-run git_deps_py. It might complain about the repositor already existing. Remove the repository and run git_deps_py again.

Somewhat clumsy, I think. Why can't this just update?

About

Experimental implementation. Aims to replace relational database/django by xml technologies

Resources

License

Releases

No releases published
You can’t perform that action at this time.