Solved

XSLTProcessor fails when using Configuration Type 'Attribute as Stylesheet'

  • 25 July 2018
  • 4 replies
  • 15 views

Badge

Hi,

I'd like to update the attribute metadata of our feature classes in the ArcSDE Enterprise Geodatabase. The attribute names and descriptions are in an Excel-file. There is already existing metadata (e.g. a description of the feature class and publication date) that I would like to keep. So I want to update the existing metadata.

For testing purposes I created attached workspace and Excel-file. 

I use an XSLTProcessor - and not an XMLUpdater - because the number of attributes may vary between feature classes.

The XSLTProcessor needs a stylesheet as input. This stylesheet is dynamically created based upon the attribute information in the Excel-spreadsheet.

When I select 'Attribute with stylesheet' as the Configuration Type and choose the dynamically created attribute 'stylesheet', the XSLTProcessor raises an error on execution: 

XML warning: Fatal Error: invalid document structure (Occurred in an unknown entity, at line 1, column 1.)
XSLTProcessor(XSLTFactory): Unable to transform original doc with the stylesheet given. SAXParseException: invalid document structure (Occurred in an unknown entity, at line 1, column 1.)

However, when I choose 'embedded stylesheet' and copy & paste the output of the AttributeCreator_2 from the DataInspector to the 'embedded' parameter in the XSLTProcessor, everything works just fine. The data are processed correctly.

I don't understand what causes this behaviour and how I can fix this. Can you help me out?

icon

Best answer by friesewoudloper 26 July 2018, 20:55

View original

4 replies

Userlevel 1
Badge +18
Could you upload the workspace again? The link is broken.

 

 

Badge

update-arcsde-attribute-metadata-revised.fmw

This morning, after a good night's sleep, I realised that I have to merge the feature containing the stylesheet attribute with the feature containing the metadata, instead of append.

With a FeatureMerger I solved the problem. However, it leaves me with a cluttered workspace. I'd like to use VariableSetter and VariableRetriever instead. But the variable is read, before it is set. Could someone please point out to me how I can solve this?

Badge

arcsde-attribute-metadata.fmw

@stalknecht I solved the problem thanks to this blog post of @takashi:

http://fme-memorandum-takashi.blogspot.com/2013/10/join-on-parameter-of-featuremerger.html?m=1

I still use FeatureMerger, but the workspace is tidier because it's an unconditional merge.

If you have any suggestions on how to improve my workspace, I would love to hear them.

Badge +22

update-arcsde-attribute-metadata-revised.fmw

This morning, after a good night's sleep, I realised that I have to merge the feature containing the stylesheet attribute with the feature containing the metadata, instead of append.

With a FeatureMerger I solved the problem. However, it leaves me with a cluttered workspace. I'd like to use VariableSetter and VariableRetriever instead. But the variable is read, before it is set. Could someone please point out to me how I can solve this?

The aggregator is a blocking transformer, so reader order alone cannot guarantee that the VariableSetter will fire before the variableRetriever.

 

 

Have you considered having the OBJ data being read in by a featureReader, that is triggered by the xls feature? Essentially instead of a VariableSetter, a featureReader with merge attributes.

 

 

Reply