C# - Converting a RDF file to specific XML file -
we have requirement in need convert given rdf file specific xml file. have 3 inputs rdfs file, rdf file , xsd file. these need create xml file (which should conform xsd) having data of rdf file. rdf schema contains simple, complex, relation entities. relations defined in rdf different relations defined in xsd.
we see couple of ways of implementing same:
- create xslt defining logic converting rdf file xml file.
- build custom c# app. doing same (using rdf libraries linqtordf etc.)
please guide regarding option better , pointers same.
regards,
first of all: it's not "either ... or" decision. can combine xslt transformation custom c# code. said:
in experience xslt great choice, if transformation not contain logic. it's easy rename tags, flatten or rearrange hierarchies, ... using xslt, can come nasty if need "if-then-else" logic "create tag if value of ... if ... else create tag b".
the sentence
the relations defined in rdf different relations defined in xsd.
sounds complex transformation, involves quite "if-then-else" , "look up" logic. in case go more c# centric solution.
Comments
Post a Comment