Skip to main content
Solved

XSLTProcessor fails when using Configuration Type 'Attribute as Stylesheet'


friesewoudloper
Forum|alt.badge.img

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?

Best answer by friesewoudloper

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.

View original
Did this help you find an answer to your question?

4 replies

stalknecht
Contributor
Forum|alt.badge.img+19
  • Contributor
  • July 25, 2018
Could you upload the workspace again? The link is broken.

 

 


friesewoudloper
Forum|alt.badge.img

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?


friesewoudloper
Forum|alt.badge.img

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.


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 26, 2018
friesewoudloper wrote:

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.

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings