Subject: Re: [xsl] writing out of the current boundary of an element From: "Nima Kaviani" <nkaviani@xxxxxx> Date: Mon, 20 Nov 2006 11:52:11 -0800 |
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: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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] writing out of the curren, Florent Georges | Thread | Re: [xsl] writing out of the curren, Florent Georges |
[xsl] output method="xhtml" in 2.0, Rick Roen | Date | [xsl] Using copy-of to grab child n, Austin, Darrel |
Month |