[silva-dev] KeyError when using XSLT renderer and own metadata sets

Benno Luthiger benno.luthiger at id.ethz.ch
Wed Sep 8 10:46:22 CEST 2004


Dear developers

After I've succesfully installed the XML/XSLT libraries necessary to use the
Silva XSLT renderer, I've tried to work with Silva in XSLT mode. However,
I've got a KeyError obviously cause by the fact that I use additional
metadata sets.
Is there an additional registration step needed for metadata sets when I use
the Silva XSLT renderer?
You find the error's traceback below.

Regards,
Benno Luthiger

_______________________________________________________________________

Benno Luthiger
WEP J 11
Swiss Federal Institute of Technology Zurich
CH-8092 Zurich

Tel: +41 1 632 57 65
_______________________________________________________________________

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 323, in _exec
  Module None, line 26, in index_html
   - <PythonScript at /silva/index_html>
   - Line 26
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.PageTemplates.ZopePageTemplate, line 222, in _exec
  Module Products.PageTemplates.PageTemplate, line 96, in pt_render
   - <ZopePageTemplate at /silva/content.html>
  Module TAL.TALInterpreter, line 189, in __call__
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 670, in do_useMacro
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 701, in do_defineSlot
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 693, in do_defineSlot
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 406, in do_optTag_tal
  Module TAL.TALInterpreter, line 388, in no_tag
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 568, in do_insertStructure_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: /silva/content.html
   - Line 124, Column 2
   - Expression: <PythonExpr getattr(here, view_method)()>
   - Names:
      {'container': <Silva Root instance silva>,
       'context': <Silva Root instance silva>,
       'default': <Products.PageTemplates.TALES.Default instance at
0x0132EEE0>,
       'here': <Silva Root instance silva>,
       'loop': <SafeMapping instance at 0209F700>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0x01308AD0>,
       'nothing': None,
       'options': {'args': (), 'view_method': 'view'},
       'repeat': <SafeMapping instance at 0209F700>,
       'request': <HTTPRequest, URL=http://localhost:8085/silva/index_html>,
       'root': <Application instance at 02056800>,
       'template': <ZopePageTemplate at /silva/content.html>,
       'traverse_subpath': [],
       'user': Luthiger}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: getattr(here, view_method)()
  Module Python expression "getattr(here, view_method)()", line 1, in
<expression>
  Module Products.Silva.SilvaObject, line 282, in view
  Module Products.SilvaViews.MultiViewRegistry, line 151, in render_view
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.FileSystemSite.FSPageTemplate, line 191, in _exec
  Module Products.FileSystemSite.FSPageTemplate, line 124, in pt_render
  Module Products.PageTemplates.PageTemplate, line 96, in pt_render
   - <FSPageTemplate at
/silva/service_views/Silva/public/Folder/render_view>
  Module TAL.TALInterpreter, line 189, in __call__
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 406, in do_optTag_tal
  Module TAL.TALInterpreter, line 388, in no_tag
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 636, in do_condition
  Module TAL.TALInterpreter, line 233, in interpret
  Module TAL.TALInterpreter, line 568, in do_insertStructure_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - Line 2, Column 0
   - Expression: <PythonExpr model.get_default().view()>
   - Names:
      {'container': <DirectoryViewSurrogate instance at 022716E0>,
       'context': <DirectoryViewSurrogate instance at 022716E0>,
       'default': <Products.PageTemplates.TALES.Default instance at
0x0132EEE0>,
       'here': <DirectoryViewSurrogate instance at 022716E0>,
       'loop': <SafeMapping instance at 0209F730>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter
instance at 0x01308AD0>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <SafeMapping instance at 0209F730>,
       'request': <HTTPRequest, URL=http://localhost:8085/silva/index_html>,
       'root': <Application instance at 02056800>,
       'template': <FSPageTemplate at
/silva/service_views/Silva/public/Folder/render_view>,
       'traverse_subpath': [],
       'user': Luthiger}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: model.get_default().view()
  Module Python expression "model.get_default().view()", line 1, in
<expression>
  Module Products.Silva.VersionedContent, line 235, in view
  Module Products.Silva.transform.renderer.xsltrendererbase, line 62, in
render
  Module Products.Silva.adapters.xmlsource, line 16, in getXML
  Module sprout.saxext.xmlexport, line 111, in exportToString
  Module sprout.saxext.xmlexport, line 100, in exportToFile
  Module sprout.saxext.xmlexport, line 88, in exportToSax
  Module Products.Silva.silvaxml.xmlexport, line 357, in sax
  Module sprout.saxext.xmlexport, line 235, in subsax
  Module Products.SilvaDocument.silvaxml.xmlexport, line 33, in sax
  Module Products.Silva.silvaxml.xmlexport, line 71, in metadata
  Module sprout.saxext.xmlexport, line 200, in startElementNS
  Module sprout.saxext.generator, line 90, in startElementNS

KeyError: 'http://ethz.ch/namespaces/metadata/eth-meta-content'




More information about the silva-dev mailing list