XML Week splat XML XML Web 2005,2006 WS-Security End-to-End XSLT (xsd) XSLT MUST MAY Java class MUST,MAY
XSLT XSLT xsd XSLT XML xsd XPath <xsl:template match="xs:element[@name='creditcardinformation ] /xs:complextype/xs:sequence/xs:element[@ref='creditcardnumber']"> XML package Web Web Web XML-DB XSLT XSLT XSLT,XPath DOM
class MAY CreditCardInformation CreditCardNumber MUST ExpireDate (MAY1) CardHolderName (MAY2) MUST <CreditCardInformation> <CreditCardAuthority>XYZ</CreditCardAuthority> <CreditCardNumber>0123456789</CreditCardNumber> <ExpireDate>2008-12</ExpireDate> MAY1 <CardHolderName>Aramoto Michitaka</CardHolderName> </CreditCardInformation> MAY2 <CreditCardInformation> <CreditCardAuthority>XYZ</CreditCardAuthority> <xenc:encrypteddata Type= http://... <xenc:encryptionmethod Algorithm= http://... <xenc:cipherdata> <xenc:ciphervalue>fhrzmys1...</xenc:ciphervalue> </xenc:cipherdata> </xenc:encrypteddata> <ExpireDate>2008-12</ExpireDate> <CardHolderName>Aramoto Michitaka</CardHolderName> </BookingInfo>
<?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" targetnamespace="http://www.xmlconsortium.org/bukai/ouyou/demo/travel" xmlns="http://www.xmlconsortium.org/bukai/ouyou/demo/travel" elementformdefault="unqualified"> <xs:element name="creditcardinformation"> <xs:complextype> <xs:sequence> <xs:element ref="creditcardauthority" minoccurs="0"/> <xs:element ref="creditcardnumber" minoccurs="0"/> <xs:element ref="expiredate" minoccurs="0"/> <xs:element ref="cardholdername" minoccurs="0"/> </xs:sequence> </xs:complextype> </xs:element> <xs:element name="creditcardauthority" type="xs:string"/> <xs:element name="creditcardnumber" type="xs:string"/> <xs:element name="expiredate" type="xs:gyearmonth"/> <xs:element name="cardholdername" type="xs:string"/> </xs:schema> MUST MAY1 MAY2 xenc <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns="http://www.xmlconsortium.org/bukai/ouyou/demo/travel" targetnamespace="http://www.xmlconsortium.org/bukai/ouyou/demo/travel" elementformdefault="unqualified"> <xsl:import xmlns:xsl="http://www.w3.org/1999/xsl/transform" namespace="http://www.w3.org/2001/04/xmlenc#" schemalocation="xenc-schema.xsd"/> <xs:element name="creditcardinformation"> <xs:complextype> MUST <xs:sequence> <xs:element ref="creditcardauthority" minoccurs="0"/> <xs:element xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" ref="xenc:encrypteddata" minoccurs="0"/> <xs:choice minoccurs="0"> <xs:element ref="expiredate"/> <xs:element xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" ref="xenc:encrypteddata"/> </xs:choice> <xs:choice> <xs:element ref="cardholdername" minoccurs="0"/> <xs:element xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" ref="xenc:encrypteddata" minoccurs="0"/> </xs:choice> </xs:sequence> </xs:complextype> </xs:element> <xs:element name="creditcardauthority" type="xs:string"/> <xs:element name="expiredate" type="xs:gyearmonth"/> <xs:element name="cardholdername" type="xs:string"/> </xs:schema> MAY2 MAY1
XSLT (1) <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:xs="http://www.w3.org/2001/xmlschema" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" version="1.0"> <xsl:output method="xml" encoding="utf-8" indent="yes" /> <xsl:template match="/"> <xsl:apply-templates/> <xsl:template match="/xs:schema"> <xsl:copy> <!-- schema <xsl:apply-templates select="@*"/> <!-- xenc <xsl:element name="xsl:import"> <xsl:attribute name="namespace">http://www.w3.org/2001/04/xmlenc# <!-- <xsl:attribute name="schemalocation">http://www.w3.org/tr/2002/rec-xmlenc-core- 20021210/xenc-schema.xsd <xsl:attribute name="schemalocation">xenc-schema.xsd </xsl:element> <!-- <xsl:apply-templates select="node()"/> </xsl:copy> xenc XSLT (2) <!-- <xsl:template match="xs:element[@name='creditcardinformation']/xs:complextype/xs:sequence/xs:element[@ref='creditc ardnumber']"> <xsl:call-template name="xenc-element-must" /> <!-- CreditCardNumber element <xsl:template match="xs:element[@name='creditcardnumber']" /> MUST <!-- <xsl:template match="xs:element[@name='creditcardinformation']/xs:complextype/xs:sequence/xs:element[@ref='expired ate']"> <xsl:call-template name="xenc-element-may1" /> <!-- <xsl:template match="xs:element[@name='creditcardinformation']/xs:complextype/xs:sequence/xs:element[@ref='cardhol dername']"> <xsl:call-template name="xenc-element-may2" /> MAY2 MAY1
XSLT (3) MUST <!-- <xs:element ref="xxxxxxxxxx" minoccurs="m" maxoccurs="n"/> <xs:element ref="xenc:encrypteddata" minoccurs="m" maxoccurs="n"/> <xsl:template name="xenc-element-must"> <xs:element ref="xenc:encrypteddata"> <xsl:if test="@minoccurs!=''"> <xsl:attribute name="minoccurs"> <xsl:value-of select="@minoccurs" /> <xsl:if test="@maxoccurs!=''"> <xsl:attribute name="maxoccurs"> <xsl:value-of select="@maxoccurs" /> </xs:element> XSLT (4) MAY1 <!-- <xs:element ref="xxxxxxxxxx" minoccurs="m" maxoccurs="n"/> <xs:choice minoccurs="m" maxoccurs="n"> <xs:element ref="xxxxxxxxxx"/> <xs:element ref="xenc:encrypteddata"/> </xs:choice> <xsl:template name="xenc-element-may1"> <xsl:element name="xs:choice"> <xsl:if test="@minoccurs!=''"> <xsl:attribute name="minoccurs"> <xsl:value-of select="@minoccurs" /> <xsl:if test="@maxoccurs!=''"> <xsl:attribute name="maxoccurs"> <xsl:value-of select="@maxoccurs" /> <xsl:element name="xs:element"> <xsl:attribute name="ref"><xsl:value-of select="@ref" /> <!-- <xsl:apply-templates select="text() child::node()"/> </xsl:element> <xs:element ref="xenc:encrypteddata" /> </xsl:element>
XSLT (5) MAY2 <!-- <xs:element ref="xxxxxxxxxx" minoccurs="m" maxoccurs="n"/> <xs:choice> <xs:element ref="xxxxxxxxxx" minoccurs="m" maxoccurs="n"/> <xs:element ref="xenc:encrypteddata" minoccurs="m" maxoccurs="n"/> </xs:choice> <xsl:template name="xenc-element-may2"> <xsl:element name="xs:choice"> <xsl:element name="xs:element"> <xsl:attribute name="ref"><xsl:value-of select="@ref" /> <!-- <xsl:apply-templates select="@* node()"/> </xsl:element> <xs:element ref="xenc:encrypteddata"> <xsl:if test="@minoccurs!=''"> <xsl:attribute name="minoccurs"> <xsl:value-of select="@minoccurs" /> <xsl:if test="@maxoccurs!=''"> <xsl:attribute name="maxoccurs"> <xsl:value-of select="@maxoccurs" /> </xs:element> </xsl:element> </xsl:stylesheet> MUST MAY1 MAY2
demo WS-Security TravelXML 1.1.1 WTP 1.0.2 Eclipse 3.1.2 +Tomcat-Plugin Tomcat5.5.17+Axis1.3 telnet SOAP MUST&MAY MUST
(1) TravelXML1.1.1 axis1.3 wsdl2java (2) SOAP <?xml version="1.0" encoding="utf-8"?> <soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <Header:Header xmlns:header="http://schemas.xmlsoap.org/soap/envelope/"> <wsse:security Header:mustUnderstand="1" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext"> <xenc:encryptedkey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"> <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" xmlns="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/> <KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <wsse:securitytokenreference> <wsse:keyidentifier>...</wsse:keyidentifier> </wsse:securitytokenreference> </KeyInfo> <CipherData xmlns="http://www.w3.org/2001/04/xmlenc#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <CipherValue>...</CipherValue> </CipherData> <ReferenceList> <DataReference URI="#..."/> </ReferenceList> </xenc:encryptedkey> </wsse:security> </Header:Header> <soapenv:body> <AllotmentBookingReport xmlns="http://www.xmlconsortium.org/bukai/ouyou/demo/travel">... </AllotmentBookingReport> </soapenv:body> </soapenv:envelope> Web
(3) wsdl <xs:schema> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema targetnamespace="http://splat.xmlconsortium.org/ordersheet xmlns:tns="http://splat.xmlcon sortium.org/ordersheet"> <xs:complextype name="ordersheettype"> <xs:sequence> <xs:element name="creditcard" type="tns:creditcardtype" minoccurs="0" /> </xs:sequence> </xs:complextype> <xs:complextype name="creditcardtype"> <xs:sequence> <xs:element name="cardtype" type="xs:string" /> <xs:element name="cardnumber" type="xs:string" /> <xs:element name= ExpireDate" type="xs:string" /> <xs:element name="holdername" type="xs:string" /> </xs:sequence> </xs:complextype> </xs:schema> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema" targetnamespace="http://splat.xmlconsortium.org/ordersheet" xmlns:tns="http://splat.xmlconsortium.org/ordersheet"> <xs:element name="ordersheet1" type="c:ordersheettype" /> <xs:element name="ordersheet2" type="c:ordersheettype" /> </xs:schema> CardNumber XSLT xmlns:xenc= http://www.w3.org/2001/04/xmlenc# XSLT xmlns:xxx= XSLT XML name QName xmlns (must) <xsl:attribute name="xmlns:xsl" namespace="whatever">http://www.w3.org/1999/xsl/transform http://www.infoteria.com/jp/contents/xml-data/rec-xslt-19991116-jpn.htm XSL Transformations (XSLT) 1.0 W3C 1999 11 16 xenc:encrypteddata xmlns:xenc=
Web XSL MUST,MAY XPath XPath. XSLT Java1.5+Xalan2.7.0 set CLASSPATH=xalan.jar;%CLASSPATH% set CLASSPATH=xercesImpl.jar;%CLASSPATH% java org.apache.xalan.xslt.process -in xsd.xsd -out xsd.xsd -xsl xslt.xsl