Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML causing problem with macro expansion?
Message
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00778493
Message ID:
00778616
Views:
15
I didn't find a solution, but a workaround. Here it is for posterity. I passed the method call and the XML string seperately, then assign the XML string to a variable, then macro expand the method call referencing the variable.


>I have a series of VFP commands store in the memo fields of a table. Some of these commands are method calls with XML parameters. To execute these commands, I am using macro expansion. If a command contains an XML parameter it fails with the error "Function name is missing )." I think this is because the XML contains periods which signal the end of the macro processing. Is this true, and what can be done about it.
>
>String that I am trying to execute is below. As you can see, there are all kinds of periods.
>
>
>oRep.Device(<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData xml:space="preserve">
>	<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
>		<xsd:element name="VFPData" msdata:IsDataSet="true">
>			<xsd:complexType>
>				<xsd:choice maxOccurs="unbounded">
>					<xsd:element name="parms" minOccurs="0" maxOccurs="unbounded">
>						<xsd:complexType>
>							<xsd:sequence>
>								<xsd:element name="deptid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="deptname">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:string">
>											<xsd:maxLength value="30"></xsd:maxLength>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="start" type="xsd:date"></xsd:element>
>								<xsd:element name="end" type="xsd:date"></xsd:element>
>								<xsd:element name="modelid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="devtypeid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="makerid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="staffid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="teamid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="serviceid">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="group1">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="group2">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="group3">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="7"></xsd:totalDigits>
>											<xsd:fractionDigits value="0"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>								<xsd:element name="labourrate">
>									<xsd:simpleType>
>										<xsd:restriction base="xsd:decimal">
>											<xsd:totalDigits value="5"></xsd:totalDigits>
>											<xsd:fractionDigits value="2"></xsd:fractionDigits>
>										</xsd:restriction>
>									</xsd:simpleType>
>								</xsd:element>
>							</xsd:sequence>
>						</xsd:complexType>
>					</xsd:element>
>				</xsd:choice>
>				<xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"></xsd:anyAttribute>
>			</xsd:complexType>
>		</xsd:element>
>	</xsd:schema>
>	<parms>
>		<deptid>41</deptid>
>		<deptname>Hemodialysis                  </deptname>
>		<start>1980-01-01</start>
>		<end>2003-01-01</end>
>		<modelid>0</modelid>
>		<devtypeid>0</devtypeid>
>		<makerid>0</makerid>
>		<staffid>0</staffid>
>		<teamid>0</teamid>
>		<serviceid>0</serviceid>
>		<group1>-1</group1>
>		<group2>-1</group2>
>		<group3>-1</group3>
>		<labourrate>28.00</labourrate>
>	</parms>
></VFPData>
>)
>
Previous
Reply
Map
View

Click here to load this message in the networking platform