Skip to main content
Question

XMLTemplater

  • December 11, 2012
  • 5 replies
  • 82 views

Hi All,

 

 

I'm trying to use the XMLTemplater to create an XML doc from database table. I'm trying to generate the template using an XSD that I know is valid.  Workbench keeps choking on specific elements I suspect because there is an 'xsd:import' pointing to a remote document. Does anyone have any experiene with this?

 

 

Thanks!
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

flavio
Contributor
Forum|alt.badge.img+1
  • Contributor
  • December 12, 2012
Hi

 

I do not use XSD ... normall it is fairly simple just to use the templater and formatter and write to a text file, example of the templater using DB attribute "TEST":

 

<sample>

 

<tag>{fme:get-attribute("TEST")}</tag>

 

</sample>

 

A good start on xml is here:

 

http://fmepedia.safe.com/articles/How_To/XML-Writing-to-Custom-Application-Schemas-XMLTemplater-Basic-Example

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • December 12, 2012
Hi Jubal,

 

I quickly tried 'Generate' in the XMLTemplater and with the SampleGenerator using a couple .xsd files which have 'xsd:import' elements in them and it seemed to work.  In one case I had to specify the element path because there was more than one top level element. Is there any way you could provide one of these .xsd files so that we can have a look at it?

 

Thanks

  • Author
  • December 12, 2012
Hi Ken,

 

 

Here is a link to the file. It references two other xsd documents on this site:

 

http://iatistandard.org/schema

 

 

I didn't specificy an element path since I'm trying to get the whole standard doc but I'll try that. Thanks!

 

-jubal

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • December 13, 2012
It looks like we aren't resolving the ref attributes - although from what I can see the referred to elements are there. I've passed this on to our XML genius back at Safe HQ. I'm going to escalate this to a support case as well.

 

 


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • December 17, 2012
Just getting back to the community about this topic - which was escalated to support.:

 

 

FME had a couple of shortcomings in the XMLSampleGenerator both of which are resolved in FME 2013 SP1 - thanks to our XML Team.   1. We didn't support a URL in the “Schema Location” parameter 2. We didn't handle schemas very well with no target namespace   A workaround in this case was possible by adding a targetNamespace to the .xsd file.