|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
xsd to text via xslt ?
I'm trying to extract text from an xsd file.
E.g. The XSD is: <?xml version="1.0" standalone="yes"?> <xs:schema id="Publications" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="Publications" msdata:IsDataSet="true" msdata:Locale="en-GB" msdata:EnforceConstraints="False"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="Publications"> <xs:complexType> <xs:sequence> <xs:element name="Publication_Name" type="xs:string" minOccurs="0" /> <xs:element name="Period" type="xs:string" minOccurs="0" /> <xs:element name="Offer" type="xs:string" minOccurs="0" /> <xs:element name="Suffix" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> Using xslt : <?xml version="1.0" encoding="UTF-8" ?> <stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> <output method='text' indent='yes' doctype-public='-//W3C//DTD HTML 3.2 Final//EN'/> <template match='/'> <value-of select='xs:schema/@id'/> </template> </stylesheet> However when I run the transofrmation I get a "...prefix 'xs' is not defined...". however if I delete the xs: suffix I don't get the value of the variable. Has anyone got a solution? Kind Regards, Ticom... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > xsd to text via xslt ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|