[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: writing out of the current boundary of an element
Hi,
thanks a lot for the helps. sorry for the vagueness of my question. well here is a more precise example based on what I am working on. I have the XML file below as my input file (which is an OWL file of course): ---------------------------------------------------------- <owl:Class rdf:about="urn:KAoS#ActionHistory-Property-Condition"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class rdf:about="&actions;ActionHistory"/> <owl:Restriction rdf:about="urn:KAoS#ActionHistory-Property-ConditionRestriction0"> <owl:onProperty> <owl:ObjectProperty rdf:about="&behavior;performedBy"/> </owl:onProperty> <owl:allValuesFrom rdf:resource="urn:KAoS#QueryAction-Property-History"/> </owl:Restriction> <owl:Restriction rdf:about="urn:KAoS#ActionHistory-MinCardinalityRestriction"> <owl:onProperty rdf:resource="http://ontology.ihmc.us/ActionHistory.owl#hasRegisteredAction"/> <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" >1</owl:minCardinality> </owl:Restriction> </owl:intersectionOf> </owl:Class> ----------------------------------------- by applying my XSLT, the file above is converted to the XML file below (an R2ML rule file): <r2ml:conditions> <r2ml:PropertyAtom r2ml:propertyID="&behavior;performedBy"> <r2ml:subject> <r2ml:ObjectName r2ml:objectID="&actions;ActionHistory"/> </r2ml:subject> <r2ml:value> <r2ml:ObjectName r2ml:objectID="#var:urn:KAoS#QueryAction-Property-History/> </r2ml:value> </r2ml:PropertyAtom> <r2ml:PropertyAtom r2ml:propertyID="minCardinality"> <r2ml:subject> <r2ml:ObjectName r2ml:objectID="QueryAction"/> </r2ml:subject> <r2ml:value> <r2ml:TypedLiteral r2ml:lexicalValue="1" r2ml:datatypeID="integer"/> </r2ml:value> </r2ml:PropertyAtom> </r2ml:conditions> ------------------------ while parsing and generating the first part of the <R2ML> file above, namely "r2ml:/conditions/r2ml:PropertyAtom[1]' I get to a point where I have: <r2ml:value> <r2ml:ObjectName r2ml:objectID="#var:urn:KAoS#QueryAction-Property-History"/> </r2ml:value> while producing "r2ml:objectID="#var:urn:KAoS#QueryAction-Property-History" I have the value for the attribute "r2ml:objectID" which is equal to "#var:urn:KAoS#QueryAction-Property-History" in my generated output file and is different from the value in the original file (in the original file it is "urn:KAoS#QueryAction-Property-History"). ok at this point and after generating the value of "r2ml:objectID", I need to generate another <r2ml:property> element, having the value of "r2ml:objectID" embedded in its definition, but as a child of <r2ml:conditions>. so the final output should be like: <r2ml:conditions> <r2ml:PropertyAtom r2ml:propertyID="&rdf;type"> <r2ml:subject> <r2ml:ObjectName r2ml:objectID="#var:urn:KAoS#QueryAction-Property-History/"/> </r2ml:subject> <r2ml:value> <r2ml:ObjectName r2ml:objectID="John_Smith"/> </r2ml:value> </r2ml:PropertyAtom> <r2ml:PropertyAtom r2ml:propertyID="&behavior;performedBy"> <r2ml:subject> <r2ml:ObjectName r2ml:objectID="&actions;ActionHistory"/> </r2ml:subject> <r2ml:value> <r2ml:ObjectName r2ml:objectID="#var:urn:KAoS#QueryAction-Property-History/> </r2ml:value> </r2ml:PropertyAtom> <r2ml:PropertyAtom r2ml:propertyID="minCardinality"> <r2ml:subject> <r2ml:ObjectName r2ml:objectID="QueryAction"/> </r2ml:subject> <r2ml:value> <r2ml:TypedLiteral r2ml:lexicalValue="1" r2ml:datatypeID="integer"/> </r2ml:value> </r2ml:PropertyAtom> </r2ml:conditions> to fully understand it you need to have a background on KAoS policy language and also R2ML (a rule interchange fomat), besides OWL. in my former question I had tried to make it simpler which had resulted in the vagueness you noticed. But regardless of the semantics of the languages and considering the XML-based format of all of them, I hope you could get my question. thanks a lot for your great help and looking forward to hearing your kind suggestions, cheers, -Nima
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|