XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] Schema aware creation of XML.. Question

David,

Same answer as before!  The content hinting system built into CAM does what you want.

You can also externally script that through an XML hints file format.

If you put some hints into via the editor - you can use Files / Export / Hints to store those locally - and then modify that with a XML editor.

It supports XPath matching and name part matching using Like, First, Last - so you can build hinting files that should work with a variety of target schema.

And of course - you can extend the cam-2-example.xsl  if you want to get into more features and capabilities.

Enjoy, DW

===================================

See:

 wiki.oasis-open.org/cam/CAM_Tutorials 

And the CAM toolkit:

 http://www.sourceforge.net/projects/camprocessor


Access the svn repository to retrieve the xsl source code.
 

-------- Original Message --------
Subject: Re: [xml-dev] Schema aware creation of XML.. Question
From: Stephen Green <stephengreenubl@gmail.com>
Date: Thu, May 20, 2010 5:07 pm
To: David <dlee@calldei.com>, xml-dev@lists.xml.org

You might take a look at microformats. Try mapping the data to xhtml using divs and class names. The 'schema' is then that of XHTML. There might be useful microformat tools to help. There is a developer community for microformats you can find online which produces tools, etc.
Regards
Stephen D Green

David <dlee@calldei.com> wrote:

>I'm working on a project where I want to create XML according to a
>schema, given not enough information from the data itself.
>For example suppose I have a element name and a name/value pair like
>
> element: record
> name: field
> value: "A value"
>
>I want to constantly create a specific XML element from this, say for
>example
><element field="A Value"/>
>
>Or perhaps
><element>
><field>A Value</field>
></element>
>
>
>The source data does not give me enough data to choose between these
>(and possibly other) representations.
>So how to choose ?
>
>I was thinking that if I had a schema (say WSD, DTD, RNG etc ... ) that
>defined the type of element,
>I could use the schema information to choose the correct format to create.
>I understand there may be ambiguities but am willing to work with a
>subset of data formats to limit these.
>
>Now I know if I use a Schema Aware xslt or XQuery processor, I could do
>the reverse.
>That is I could read XML and then validate it against the schema, get
>the types etc.
>But I dont know how that will help *generating* XML .
>Certainly once I generated the XML I could use xquery validate { xml
>} ... but I want the schema information *before* constructing the XML
>(not construct every possible XML values and validate until it succeeds ).
>
>How to do that ?
>
>My thoughts are that I need to use a schema reading tool, probably in
>Java, to read the schema and then use the type information from the schema
>to guide in the construction. But are there other ways ? I thought
>about reading the schema directly "as XML" (say an XSD or RNG xml
>formatted schema),
>but I think that may be very difficult becauase the schema is not fully
>expanded. There are a lot of "rules" that have to be processed for a
>schema to make sense.
>
>Any other suggestions ? Am I missing some "obvious technology" or tools
>to do this ?
>
>Any ideas very welcome.
>
>-David
>
>
>
>--
>-------------------------
>David A. Lee
>dlee@calldei.com
>http://www.calldei.com
>http://www.xmlsh.org
>
>
>_______________________________________________________________________
>
>XML-DEV is a publicly archived, unmoderated list hosted by OASIS
>to support XML implementation and development. To minimize
>spam in the archives, you must subscribe before posting.
>
>[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
>Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
>subscribe: xml-dev-subscribe@lists.xml.org
>List archive: http://lists.xml.org/archives/xml-dev/
>List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS