Attribute Value Templates

We know we can go from attributes to elements, but what about the other way around? Suppose we wanted to create a stylesheet that changed the underlying elements of a Listing into attributes? Given our original definition of a Listing

<!ELEMENT TownDescription (#PCDATA)>
<!ELEMENT Listing (ListingBroker, Type,ListPrice,Addr, YearBuilt?,Bedrooms?,Baths?,
 SpecialFeatures?, Lotsize,Description)> <!ELEMENT ListingBroker (#PCDATA)> <!ELEMENT Type (#PCDATA)> <!ATTLIST Type PropType CDATA #REQUIRED PropType (residential|commercial|land|farm|other) "residential"> <!ELEMENT Addr (#PCDATA) > <!ELEMENT YearBuilt (#PCDATA)> <!ELEMENT ...

Get XML Development with Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.