Rajendra Tripathy

Rajendra Tripathy

  • NA
  • 823
  • 453.9k

XML- XPath - Whats wrong with my query?

Jan 24 2011 4:09 AM
<?xml version="1.0"?>
<RKT xmlns="x-schema:InformationSchema.xml" xmlns:RKT="x-schema:DataTypesSchema.xml" > 
    <IOInfo>
        <RKTVersion major="1" minor="2" release="1" build="1"/>              
        <RKT:VersionInformation name="myname" vendor="myVendor" version="1.0" date="2000-08-05"/>
         <IOSchemaPaths>
                     <IOSchemaPath RKT:busCategory="12345678-ABCD-7890-86E1-00E0987270B9"  RKT:path="file://c:/mySchemaPath/" />
        </IOSchemaPaths>
         <IODeviceTypes>
            <RKT:IODeviceType>
                <RKT:VersionInformation name="myname" vendor="myVendor" version="1.0" date="2000-08-05"/>
                <RKT:SupportedLanguages>
                    <RKT:LanguageId languageId="1131"/>
                </RKT:SupportedLanguages>
                <RKT:BusCategories>
                    <RKT:BusCategory busCategory="036D1499-387B-11D4-86E1-00E0987270B9" busCategoryName="Profibus DP/V1">
                            <RKT:CommunicationTypeEntry communicationType="required"/>
                    </RKT:BusCategory>
                    <RKT:BusCategory busCategory="12345678-ABCD-7890-86E1-00E0987270B9" busCategoryName="Private Bus">
                            <RKT:CommunicationTypeEntry communicationType="supported"/>
                    </RKT:BusCategory>
                    <RKT:BusCategory busCategory="036D1498-387B-11D4-86E1-00E0987270B9" busCategoryName="HART">
                            <RKT:CommunicationTypeEntry communicationType="supported"/>
                            <RKT:PhysicalLayer physicalLayer="036D1590-387B-11D4-86E1-00E0987270B9" physicalLayerName="IEC61158-2"/>  
                    </RKT:BusCategory>
                </RKT:BusCategories>
                <RKT:DeviceIcon path="file://c:/programs/manufacturer/icons/device.ico" />
                <RKT:DeviceIcon deviceGraphicState="device" path="file://c:/dev.ico" />
                <RKT:DeviceIcon deviceGraphicState="diagnosis" path="file://c:/devdiag.ico" />
                <RKT:IODocuments>
                    <RKT:IODocument label="Online Help" help="Help for IO"  documentClassification="help" documentLanguageId="1033">
                        <RKT:DocumentFile file="c:\myIO\helpEN.chm"/>
                    </RKT:IODocument>
                    <RKT:IODocument label="Online Hilfe" help="Hilfe für IO" documentClassification="help" documentLanguageId="1031">
                        <RKT:DocumentFile file="c:\myIO\helpDE.chm"/>
                    </RKT:IODocument>

                    <RKT:IODocument label="Ordering Information" help="Order our Products" documentClassification="orderingInformation">
                        <RKT:DocumentUrl url="http://www.manufacturer.com"/>
                    </RKT:IODocument>

                    <RKT:IODocument label="Product Database" help="Find a Product" documentClassification="miscellaneous"  documentLanguageId="1033">
                        <RKT:DocumentExe file="c:\programs\manufacturer\productFinder.exe" parameters="-L1033" />
                    </RKT:IODocument>
                   
                </RKT:IODocuments>
                <RKT:DeviceBitmap deviceGraphicState="device" path="file://c:/dev.bmp" />
                <RKT:DeviceBitmap deviceGraphicState="diagnosis" path="file://c:/devdiag.bmp" />
                <RKT:DataSetFormats>
                    <RKT:Current dataSetID="036D1497-387B-11D4-86E1-00E0987270B9" description="The data set in encrypted according to the client recommendation"/>
                    <RKT:Supported dataSetID="036D1497-387B-11D4-86E1-00E0987270B9" levelOfSupport="full" description="The data set is fully supported"/>
                    <RKT:Supported dataSetID="036D1497-387B-11D4-86E1-00E0987270BA" levelOfSupport="full" description="The default value for fault action is not supported in this version"/>
                </RKT:DataSetFormats>
            <RKT:DeviceTypeVariants>
                <RKT:DeviceTypeVariant deviceTypeVariant="PM255-EX" deviceTypeVariantInfo="PM255-EX Info" orderCode="ExampleOrderCode1"/>
                <RKT:DeviceTypeVariant deviceTypeVariant="PM255-TX" deviceTypeVariantInfo="PM255-TX Info" orderCode="ExampleOrderCode2"/>
                <RKT:DeviceTypeVariant deviceTypeVariant="PM255-ZX" deviceTypeVariantInfo="PM255-ZX Info" orderCode="ExampleOrderCode3"/>
                <RKT:DeviceTypeVariant deviceTypeVariant="PM255-XX" deviceTypeVariantInfo="PM255-XX Info" orderCode="ExampleOrderCode4"/>
            </RKT:DeviceTypeVariants>
            </RKT:IODeviceType>
        </IODeviceTypes>
    </IOInfo>
</RKT>

Hi All.
I want xpath query for the above XML.. please find the line with Bold Blue color.
I need value for path="file://c:/programs/manufacturer/icons/device.ico" />
I tried to do this but getting exception (
Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function. ). Can Some one help me out with XPATH query ASAP.
Thanks in Advance.

Answers (3)