- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I am using this code to Generate a data model. But here you get the data model for the whole database. Is there any way to get a data model out of a selective tables from DB
var strXslt = "nl:dbdToOdt.xsl"
var strTemplate = installDirectory("datakit/nl/dbd-template.odt")
var strOutputFile = "database-description.odt"
var sql = xtk.sqlSchema.create()
sql.Generate() //-----------> tables from whole database is taken. Can it be customized to take only a few tables
var strDbXml = db = sql.toXML().toXMLString()
var strOdt = applyXsl(strXslt, strDbXml)
strOdt = strOdt.replace(/^<\?xml .*\?>\r?\n/, '\r\n')
var mbContent = new MemoryBuffer
mbContent.fromString(strOdt, "utf-8")
var zip = new ZipFile(strTemplate)
zip.open()
zip.setEntry("content.xml", mbContent)
zip.save(strOutputFile)
Solved! Go to Solution.