Skip to main content
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!
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
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
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
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.

 

 


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.

Reply